r/programming • • Jan 12 '23

The yaml document from hell

https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell
1.5k Upvotes

288 comments sorted by

View all comments

Show parent comments

51

u/trialbaloon Jan 12 '23

I hate that yaml is being used for what is essentially a shitty DSL. At the level of complexity yaml is being used for just use a real programming language. It's been the gold standard for expressing things to a computer for decades, don't cripple it with yaml.

19

u/fear_the_future Jan 12 '23

I think the worst thing about Kubernetes is that it works, preventing other systems with a more thoughtful design from gaining any mindshare and ultimately hindering the progress of society at large.

15

u/supreme_blorgon Jan 13 '23

other systems with a more thoughtful design

Honest question, what would those be? I'm relatively new to the industry and we use kubernetes and we're stuck in YAML hell. It's fucking awful and I'm blown away that this is how we work with the kubernetes I've heard so much about over the years.

Is there some reason we're stuck managing kubernetes with YAML files? Could we not use something else at least a little more reasonable, like TOML?

3

u/fear_the_future Jan 13 '23

Personally, I would always use a LISP for configuration: It's very easy to parse and automate, has simple syntax that anyone can understand, you can write a DSL for people who are happy with yaml, it supports all the necessary syntactic constructs of a real programming language when needed, there is an existing ecosystem of lightweight libraries and you can add type checking if you want to.

But the YAML-problem of Kubernetes is pretty easy to fix. You can just write your own LISP-to-YAML converter. There are more fundamental problems, for example the centralized control plane, the lack of explicit dependencies between controllers, the complicated network stack and the fact that the entire ecosystem is based on the worst programming language in recent times, with all the maintenance issues that entails.

The choice of YAML is merely a symptom of the pervasive inability of Google developers specifically to understand good software design. The whole company is an echo chamber where everybody refuses to learn anything originating outside the chamber.