dhall-kubernetes
dhall-kubernetes copied to clipboard
Comparison with other solutions
As noted in #9, we should probably write down a comparison with other solutions in the readme. So far on the list:
- Helm
- Jinja
Another one that is very close to this project: https://github.com/xtruder/kubenix
https://github.com/ksonnet/ksonnet-lib/blob/master/README.md
Is a code generator of jsonnet. We could look at how they handle edge cases
They wrap it up in a tool called https://github.com/ksonnet/kubecfg/blob/master/README.md
https://github.com/stripe/skycfg/blob/master/README.md
https://gravitational.com/blog/kubernetes-kustomize-kep-kerfuffle/
https://kustomize.io
And a great essay on all the different directions of config management: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/declarative-application-management.md
They also made a list of all competing products (holy shit. So much) https://docs.google.com/spreadsheets/d/1FCgqz1Ci7_VCz_wdh8vBitZ3giBtac_H8SBw4uxnrsE/edit#gid=0
https://www.pulumi.com/
FYI: while exploring this space, I read that Heptio has shifted focus away from ksonnet and the Github project will be archived. It is to be seen whether the community will pick it up. More information here.
Prior to the acquisition, Heptio had been shifting focus and resources away from ksonnet; with the acquisition, we felt it was the right time to rethink our investment in ksonnet. As a result, work on ksonnet will end and the GitHub repositories will be archived. It’s extremely difficult to step back from a project we have worked so hard on, but we’re excited about our new ideas and vision for changing how developers experience the Kubernetes and cloud native ecosystems. The problems that ksonnet aimed to solve are still challenges for Kubernetes users and we will be putting our energy into opportunities to contribute to existing or new projects in this space.
Kustomize is an interesting one because it takes any YAML and applies changes to it (there are some annoying limitations). From our limited experience, it does a great job mixing in orthogonal aspects such as environment specific changes that should not be part of the base application YAML.
Kustomize does not, however, help you create abstractions: you still need to create the YAML files somehow (no reuse and too much boiler plate). It turns out that using something like helm template with kustomize seems to fit the bill better.
With helm template you get the helm package management and all the existing packages already there. You also get the Helm chart and values abstraction, which in Ksonnet would be equivalent to a prototype + parameters to generate component YAML. So, with helm template and kustomize you get the abstraction and reuse to create YAML files and with kustomize you get the ability to overlay/mix in orthogonal aspects (e.g. ALB Ingress Controller annotations that are specific an environment).
In fact, if helm template + kustomize were a single tool, that would be quite nice. Add static typing/validation and you have a winner ...
Could Dhall-kubernetes be this single tool? I don't know, but it does look interesting.
Considering that I don't know much about Dhall(-kubernetes), my two questions are:
- Can Dhall-kubernetes consume plain YAML manifests for integrating with existing ones in the wild?
- Can it be use to provide overlays that modify existing resources even when these were not abstracted to be extended (like
kustomize)?
-
Alas dhall can not currently import JSON or YAML. It's an often requested feature though https://github.com/dhall-lang/dhall-lang/issues/121
-
In theory yes. Dhall the language supports a record merge operator that merges two records together.
> {a = 3 } // { b = 4 }
{ a = 3, b = 4 }
However there are some caveats that don't make it very ergonomic yet in dhall-kubernetes due to how we structure schemas. However I have an issue open for that as well to make dhall-kubernetes more kustomize-like https://github.com/dhall-lang/dhall-kubernetes/issues/46
@arianvp FYI, this page does an excellent job documenting the usecases and approaches.
Yep! Saw that one already (I think I linked it in this thread already somewhere). But still thanks!
Once I have some more time on my hands and have tackled #46 I want to write down some more in depth stuff about how dhall-kubernetes is a good idea and what its strengths are, and I think the link you just posted is some really good reference material to look at to achieve that goal
cue seems to also have some support for Kubernetes: https://cuelang.org/docs/integrations/k8s/
https://tanka.dev/
how many of these mentioned tools do support side-effect-free content-addressable configurations over URLs?
how many of these mentioned tools do support side-effect-free content-addressable configurations over URLs?
Kubenix (nix)