Why Nostr? What is Njump?
2023-06-22 00:26:32

varx/tech on Nostr: Today I have experienced the horror that is #Helm. Helm chart templates make ...

Today I have experienced the horror that is #Helm.

Helm chart templates make #Kubernetes manifests by string-templating #YAML.

YAML has one of the most unfriendly syntaxes of any textual data structure language I've ever seen. There's a whole website just dedicated to the nine different ways you can write a multiline string.

And Helm just... string-interpolates values into it. The most fragile syntax in the world, and you're just going to inject raw bytes straight into it. The only tool provided to alleviate this is the `quote` function, which... doesn't actually do what you want.

Currently at work I'm trying to figure out how to insert an arbitrary string value into another string, which is a pretty normal thing to do. And four attempts later, nothing works. The most common "solution" on the web appears to be to use `{{ ... | indent 12 }}` where 12 has to match the template's current indentation level. Good luck if you ever want to reindent anything!
Author Public Key
npub13cavz8sul0get8lllzwszm7j5mq4n3ygpn60uqn54su99csl9wyqeu3sx0