Comment by XorNot
20 hours ago
I'll die on the hill that Helm charts are more of a problem because text/templating is a weird looking templating language then anything else.
20 hours ago
I'll die on the hill that Helm charts are more of a problem because text/templating is a weird looking templating language then anything else.
Or to be more specific, issue isn't text/templating as such. It is a fine templating language for text.
But to use a text templating language to generate YAML, which is not only structured, making it a bad match for character based templating with no knowledge of syntax, but indentation-based, making the combination almost seem like a joke.
Helm charts must be the worst engineering solution I have seen in popular use. First time I saw it I didn't believe it, that this was something people did, for real.
I wouldn't say text/template is terribly weird per se, and it's quite reminiscent of Jinja. But what is awful is using a text templating language to generate yaml with the correct level of indentation, and that's where 75% of Helm's problems lie; the other 25% is putting too much logic in templates while working with the clumsy workarounds to text/template having no capability of defining custom functions.
You actually can define custom functions as named templates, but they're definitely not pretty, and would almost certainly push you towards the "just allow us to write code using a normal programming language" side of the argument.