dhall-kubernetes icon indicating copy to clipboard operation
dhall-kubernetes copied to clipboard

Comparison with other solutions

Open f-f opened this issue 7 years ago • 14 comments

As noted in #9, we should probably write down a comparison with other solutions in the readme. So far on the list:

  • Helm
  • Jinja

f-f avatar Jun 04 '18 09:06 f-f

Another one that is very close to this project: https://github.com/xtruder/kubenix

arianvp avatar Dec 24 '18 12:12 arianvp

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

arianvp avatar Jan 21 '19 09:01 arianvp

https://github.com/stripe/skycfg/blob/master/README.md

arianvp avatar Jan 26 '19 21:01 arianvp

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

arianvp avatar Jan 30 '19 11:01 arianvp

https://www.pulumi.com/

arianvp avatar Feb 14 '19 20:02 arianvp

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.

ydewit avatar Feb 28 '19 11:02 ydewit

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:

  1. Can Dhall-kubernetes consume plain YAML manifests for integrating with existing ones in the wild?
  2. Can it be use to provide overlays that modify existing resources even when these were not abstracted to be extended (like kustomize)?

ydewit avatar Feb 28 '19 18:02 ydewit

  1. 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

  2. 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 avatar Feb 28 '19 19:02 arianvp

@arianvp FYI, this page does an excellent job documenting the usecases and approaches.

ydewit avatar Feb 28 '19 20:02 ydewit

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

arianvp avatar Feb 28 '19 22:02 arianvp

cue seems to also have some support for Kubernetes: https://cuelang.org/docs/integrations/k8s/

wallyqs avatar Sep 04 '20 21:09 wallyqs

https://tanka.dev/

zzztimbo avatar Oct 20 '20 18:10 zzztimbo

how many of these mentioned tools do support side-effect-free content-addressable configurations over URLs?

avanov avatar Jun 19 '22 22:06 avanov

how many of these mentioned tools do support side-effect-free content-addressable configurations over URLs?

Kubenix (nix)

adrian-gierakowski avatar Jun 19 '22 23:06 adrian-gierakowski