3 ms·
One very important thing to point out here is that you’re not just writing config with this YML. If you look at the example on the GitHub link it’s a workflow o
by SOLAR_FIELDS 3y ago
One very important thing to point out here is that you’re not just writing config with this YML. If you look at the example on the GitHub link it’s a workflow orchestration and execution context. There’s a code runtime involved and logic is executed in the YAML. That is where YAML falls apart.
If all you’re doing is defining configurations (example is Kubernetes manifests helm charts etc) then great. But that isn’t what this is.
To your original question, I would actually advocate using the general purpose programming language for most use cases. Learning a new DSL, like you mentioned, is overhead from both a usability and maintainability perspective. I haven’t used jsonnet before but I know that cuelang gives you some power tools around typing, config validation, templating etc. it’s essentially purpose made for configuration management and tooling so it’s probably going to be really good at that. I don’t know if it’s worth using over a suite of language specific tools like Pydantic + Jinja though because when you’re using a general purpose language like python you have a whole, much larger ecosystem of tools and libraries you also have access to and can pull from.
- thinkmassive 3y agoI agree with this for internal tools only intended to be used by a relatively small organization. Using a DSL may well be preferable for open source, and for larger organizations where not every team is proficient in your Turing-complete language of choice. Some drawbacks of plain YAML, and of tools that use string templating to render YAML: - difficult to extend features not exposed by upstream - composition is often messy, resulting in duplication - validation is often impractical (at least identifying the exact source of the error… I’m looking at you Helm!) Unrelated to OP, but you can leverage Tanka to extend helm charts with functionality not provided by upstream. https://tanka.dev/ https://tanka.dev/