Hacker News new | ask | show | jobs
by xyzzy_plugh 2108 days ago
Most of my colleagues find the yaml interface to be a lost cause. I tend to prefer to use the gRPC API as it's effectively the same declarative operations but you get to control it in software, which just feels right. YAML is just a crutch for specifying the API calls the client needs to make.
1 comments

You mean the Kubernetes HTTP API? That one isn’t gRPC based, right?
Ah right, guess I was thinking of the protobuf over HTTP API. In any case, I find using the protobuf types in your language of choice pretty ergonomic compared to YAML.
This is one thing that mesos/aurora got right (the "turing-complete-by-design" config files, written in Python). Templating yaml is like templating html. It works but absolutely sucks at scale if your job is to maintain it.

It's good to know that such an interface could conceivably be built for Kubernetes, using the HTTP API. Even better that it supports any programming language (since it's a network interface); I'd see that as a step-up from aurora configs, in fact.

At some point, I imagine this will become the default way that Smart Organizations build around k8s, once k8s's core API is super-stable and people develop sound frameworks in $POPULAR_LANGUAGE for declaring your configuration.

Then, we can then banish yaml to the same fate as json and xml. One can dream, at least. :)

> the "turing-complete-by-design" config files, written in Python

Funny you mention this, check out what is effectively this but for Kubernetes:

https://github.com/stripe/skycfg

Wow, this is great! Thank you for sharing.

SMART_ORGANIZATIONS=$SMART_ORGANIZATIONS:stripe

I wonder if they were inspired by aurora, it's very similar.

Would you happen to have any links to Github repos that would be an example of this?

From light googling I only see examples of building gRPC APIs and microservices.

I don't have an example offhand, but mentioned skycfg in the neighbor comment, which may be of some interest to you. I've used https://github.com/ericchiang/k8s in the past with great success.