kapicorp / kapitan

Generic templated configuration management for Kubernetes, Terraform and other things
https://kapitan.dev
Apache License 2.0
1.8k stars 197 forks source link

Support multiple markup languages in inventory #126

Closed adrianchifor closed 5 years ago

adrianchifor commented 6 years ago

The inventory only support YAML right now, but it would be cool to add support for TOML, JSON and XML (would have to serialize back to YAML to feed into reclass).

Mah1ndra commented 5 years ago

Hello @adrianchifor. I would like to work on this issue for Gsoc. Adding multiple markup lang gives flexibility to the tool and to the users. I feel this is a good issue for me to work on this project.

pranavgupta1234 commented 5 years ago

Hey @adrianchifor , I was exploring this issue and found out that in our current implementation, we have used reclass API by supplying with paths of yaml files only (in the function inventory_reclass) to generate "reclass inventory". I am thinking for in memory serialization of above formats into yaml but the object supplied to reclass is storage(which essentialy contains reclass_config with appropriate paths of yaml). Is there some other API of feeding into reclass as well ? because generating corresponding yaml files for above formats is probably not a good idea.

adrianchifor commented 5 years ago

That's a good question. We use storage_type: yaml_fs right now but as far as I'm aware there isn't a way at the moment to use memory for reclass. This change is quite tricky, high risk as it can easily break current functionality and low reward in terms of features and productivity, so I wouldn't worry too much about it.

Another thing we can look at is supporting more outputs like toml and xml, in addition to yaml and json.

Will close this issue for now in favor of https://github.com/deepmind/kapitan/issues/256