4 ms·
What about something like https://github.com/dhall-lang/dhall-kubernetes https://github.com/dhall-lang/dhall-kubernetes ?
by anaphor 7y ago
What about something like https://github.com/dhall-lang/dhall-kubernetes https://github.com/dhall-lang/dhall-kubernetes ?
- gouthamve 7y agoInteresting, this is similar to jsonnet. Does it support deep merging? For example, in our case we do `default_deployment.libsonnet` to which we add arbitrary overrides like `default_deployment + dev` or `default_dep + us_central1_overrides` depending on the cluster. And in these case we don't need to pre-specify what can be overriden in the `default_deployment` which makes it really powerful (also can come bite you in the arse though).
- anaphor 7y agoI'm not sure how it would work with this, since I've never used it, but Dhall does have some kind of recursive merge operator that might work https://docs.dhall-lang.org/references/Built-in-types.html#id127 https://docs.dhall-lang.org/references/Built-in-types.html#i.... You might have to overload it somehow to make it work the way you're describing though.
- mixedCase 7y agoAs far as I understand Dhall, you have the choice between writing specific types in order to have a safe, actually decent to use interface (which is kind of the point of Dhall), or you can just use a key-value map in order to cut corners while writing. But honestly, if you're going for the latter, might as well just use Kustomize and accept the chaos.