Is MPS appropriate for this?

I have what I think is a simple task but I'm not sure how I would do it in MPS and whether it is an appropriate tool.

I want to model my kubernetes cluster with my own record types defining a structure of maps and lists related to kubernetes pods and services, etc.

Then I want to take that model and generate yaml files which are valid kubernetes spec files. Some of the elements of my structure will map into multiple output files. For instance if I want to define a service for a pod I would ask for a port and a virtual host and then I can generate the spec files and link them up appropriately with my application logic.

I can imagine having my own little language that just defines what I need, that can then generate the yaml files via some logic in Java or Kotlin and then writing the files out to the filesystem and committing them with git.

Does this sound reasonable or am I better off writing a little web app to do the same kind of thing? Is it common to generate source code files that then get checked in to git, or is that usually hidden under a build process of some sort?

Thanks,

Monty

0
1 comment

In my opinion MPS is fine for this task.

MPS supports git. You can check in your MPS models in your VCS.

Please mind that you will need some time to get familiar with MPS.

0

Please sign in to leave a comment.