Re:Why the fuck are we templating YAML? (2019)
by thinkmassive on Tuesday January 23, 2024 @02:05PM
(#39108036)
> I have definitely done some terrible things like "sed -e s/$FOO/foo/g" to implement templating
Next time you reach for this, check out envsubst for a slightly improved solution that’s somewhat standard (at least common).
On the topic of templating or modifying helm charts using jsonnet, you might find Tanka helpful:
Re:Why the fuck are we templating YAML? (2019)
by dewbrite on Tuesday January 23, 2024 @09:09PM
(#39112764)
> But yeah, I think Helm will be the death of Kubernetes. Some competing computer allocator container runner thingie will have some decent language for configuration, and it will just take over overnight. Mark my words!
I want to believe this.
Everywhere I've worked we're still rawdogging tf/hcl and helm though, because change is scary.
At least I get some relief in my personal projects. :')
It's truly "worse is better" gone wrong. I have definitely done some terrible things like "sed -e s/$FOO/foo/g" to implement templating... and that's probably how Helm started. The result is a mess.
I personally grew up on Kustomize before it was in kubectl, and was always exceedingly happy with it. (OK, it has a lot of quirks. But at least it saves you time because it actually understands the semantics of the objects you are creating.)
I like Jsonnet a lot better. As part of our k8s app, we ship an Envoy deployment to do all of our crazy traffic routing (basically... maintaining backwards compatibility with old releases). Envoy configs are... verbose..., but Jsonnet makes it really easy to work on. (The code in question: https://github.com/pachyderm/pachyderm/blob/master/etc/gener...)
I'm seriously considering transpiling jsonnet to the Go template language and just implementing everything with Jsonnet. At least that is slightly maintainable, and nobody will ever know because "helm install" will Just Work ;)
But yeah, I think Helm will be the death of Kubernetes. Some competing computer allocator container runner thingie will have some decent language for configuration, and it will just take over overnight. Mark my words!