Lee Briggs
leebriggs.co.uk · Personal blog · on HN since 2017
Lee Briggs is a DevOps engineer who writes about Kubernetes, infrastructure as code, YAML templating, and Pulumi.
What HN saysCommenters often cite his post questioning why people template YAML in arguments over Helm, Jsonnet, and Pulumi, and his Pulumi FAQ.
22HN people shared it
6linked it in comments
48stories submitted
1.6Kstory points
9 months agolast shared
2017people per year2026
Most-shared posts
- 1DevOps is a failure4 people · 311 points · first shared 2022 · 391 comments on HN
- 2Deploying Kubernetes clusters in increasingly absurd languages4 people · 157 points · first shared 2022 · 68 comments on HN
- 3Why are we templating YAML? (2019)3 people · 433 points · first shared 2024 · 654 comments on HN
- 4Why are we templating YAML?2 people · 263 points · first shared 2019 · 346 comments on HN
- 5The Fargate Illusion2 people · 112 points · first shared 2019 · 63 comments on HN
- 6Why does nobody seem to know what imperative and declarative mean?2 people · 75 points · first shared 2022 · 72 comments on HN
- 7The 300% Problem2 people · 6 points · first shared 2023 · discussion on HN
- 8Authenticating to AWS the Right Way2 people · 6 points · first shared 2022 · discussion on HN
- 9The Death of Developer Relations2 people · 5 points · first shared 2024 · 1 comments on HN
- 10Things you've heard about Pulumi that aren't true2 people · 4 points · first shared 2021 · 1 comments on HN
- 11Vb.net – The Future of Infrastructure as Code2 people · 3 points · first shared 2020 · discussion on HN
- 12In depth review of Project Calico with k8s2 people · 2 points · first shared 2017 · discussion on HN
- 13How I learned to stop worrying and love the YAML1 people · 120 points · first shared 2022 · 140 comments on HN
- 14Why the hell is your Kubernetes API public?1 people · 54 points · first shared 2024 · 43 comments on HN
- 15Choosing an Infrastructure as Code Solution1 people · 6 points · first shared 2022 · discussion on HN
What HN people wrote when they linked it
derefr · 2019-04-13
There's a linked article discussing the shortcomings of YAML, as well: https://arp242.net/weblog/yaml_probably_not_so_great_after_all.html
Reading the two screeds together, though, I think the author has ignored one key idea of both JSON and YAML as formats: their use-cases are complementary, and the "problems" with each of these two formats only arises when you're using one for the use-case best suited to the other.
YAML's use-case is for human-written configuration. That's why it has so many weird ways to write things: to allow humans to write some data down in a way that works best to communicate said data to other humans, in a way that machines can coincidentally read. (See also: AppleScript.)
And that's also why YAML is "so powerful that it's basically inherently insecure." You shouldn't be executing untrusted YAML any more than you should be executing an untrusted bash script. YAML is a language for the deploying sysadmins of a piece of software to configure said software with; it's not a language for the tenants of a system to communicate their needs to the system with.
JSON's use-case is for building machine data generators and parsers in a distributed system (like the web) where it is very important that the data be easily introspected by humans, and that humans will also be able to modify or otherwise "poke at" said data, in flight, using simple text-based tools. But the intention isn't that humans will ever author JSON "at scale." JSON is like HTTP/1.0: it's…
trashburger · 2024-09-09
https://leebriggs.co.uk/blog/2019/02/07/why-are-we-templating-yaml
Something like Jsonnet would serve one better, I think. The only part that kinda sucks is the "package management" but that's a small price to pay to avoid the YAML insanity. Helm is fine for consuming third-party packages.
jaxxstorm · 2021-12-02
Pulumi isn't "built on terraform", that's a common misconception. See here: https://www.leebriggs.co.uk/blog/2021/11/06/pulumi-faqs.html
lamontcg · 2024-02-04
People keep hacking up YAML with templating to produce a configuration language which is a bad solution (see for example https://leebriggs.co.uk/blog/2019/02/07/why-are-we-templating-yaml). The problem is that the people who are using templated YAML don't really want to learn a full-blown language since the vast majority of them never, ever want to write a compiler or a highly concurrent HTTP server. They definitely don't care about functional programming or want to know what a monad is or want to have to learn about first class functions and closures or async/await. They just want a pretty trivial language that you can learn in a weekend or two. The kind of necessary complexity that you might 'add' to such a language before anything else is making it side-effect free so that you can't alter the running state of the system in the language and the purpose is to render a YAML/JSON/TOML config to feed as declarative config into tools like terraform. That focus is much different from a programming language which gives you the ability to execve() arbitrary commands and comes with concurrency primitives that templated-YAML users just don't care about at all.
When you look at it from the perspective of someone who already knows a computer language well it doesn't seem useful, but the point is to address the users who don't know any computer languages particularly well.
And 24 years ago I thought we needed to just use general purpose computer languages and turn system…
AaronFriel · 2023-08-15
Pulumi has a few languages other than YAML and Pulumi is declarative[1], and the programs you write are only as complex as you want them to be. This python program declares an S3 bucket and declares ten objects to exist in it.
from pulumi_aws import s3
bucket = s3.Bucket('bucket')
for i in range(10):
s3.BucketObject(
f'object-
{i}',
s3.BucketObjectArgs(
bucket=bucket.id,
key=str(i),
)
)
Even so, Pulumi YAML has a "compiler" option, so if you want to write CUE or jsonnet[1], or other[2] languages, it definitely supports that.
Disclaimer: I led the YAML project and added the compiler feature at the request of some folks internally looking for CUE support :)
[1] https://www.pulumi.com/blog/pulumi-is-imperative-declarative-imperativ…
[2] https://www.pulumi.com/blog/extending-pulumi-languages-with-yaml-cue-j…
[3] https://leebriggs.co.uk/blog/2022/05/04/deploying-kubernetes-clusters-…
twic · 2018-05-07
This is more or less what Calico does:
https://docs.projectcalico.org/v3.1/introduction/
http://leebriggs.co.uk/blog/2017/02/18/kubernetes-networking-calico.ht…
In a Calico setup, every container (or VM - they use the term "workload" to abstract over the two) has an IP address, and talks to other containers in the usual way. AIUI, Calico does a couple of things to make that work at Cloud Scale (tm): it pushes firewall rules into the kernel, to make sure each container can only communicate with the other containers it's supposed to, and it propagates routes around, so each host knows where to send packets destined for containers on other hosts.
The routing bit is important because Calico is designed to run as a flat IP space on top of a non-flat ethernet space, ie one where the access switches are connected by routers rather than more switches. That's useful because scaling a flat ethernet network up to a huge size is apparently hard (network engineers start telling horror stories about Spanning Tree Protocol etc).
Calico still has more moving parts than i'm personally comfortable with, but it seems broadly sensible.