Hacker News new | ask | show | jobs
by EdwardDiego 150 days ago
> YAML format errors

This is why I hate (HATE. LET ME TELL YOU HOW MUCH I'VE COME TO HATE YAML SINCE I BEGAN TO WORK WITH K8S) working with Helm charts. As an example from the Helm docs...

https://helm.sh/docs/chart_template_guide/yaml_techniques#in...

> Note how we do the indentation above: indent 2 tells the template engine to indent every line in "myfile.txt" with two spaces. Note that we do not indent that template line. That's because if we did, the file content of the first line would be indented twice.

So you end up with YAML that looks weird, and heaven help you if you refactor and now have to adjust all the `indent N` functions to a new value of N.

That said, Helm's approach of "YAML, but with Go templating" is the main source of my hatred - why they didn't take the "It's a tree, and this child node is designated to be replaced" approach is something that's always baffled me.

1 comments

YAML is meant to be written by humans. If some lunatic insists on some expression evaluation system, then it should be ${expression} where the YAML file is parsed as is without a template, and the software that reads the YAML file interprets the expression.

If you hate YAML instead of Helm for their insane choices, then enjoy barking at the wrong tree for the rest of your life.

I've been using application.yml files for 9 years without experiencing a single YAML related issue and I see no reason to switch to any other format.

https://www.baeldung.com/spring-boot-yaml-vs-properties

Did you miss this bit in my comment?

> That said, Helm's approach of "YAML, but with Go templating" is the main source of my hatred