News for hackers. Stuff that matters.
Re:How we use HashiCorp Nomad by speedgoose on Saturday June 06, 2020 @12:46PM (#23440445)
Indeed. Helm offers great features but it suffers from the kubernetes unnecessary complexity and by using golang templates in YAML.

When I started with kubernetes I converted my small Docker compose files to kubernetes files. Later I rewrote everything in helm charts. Now it's almost more YAML and golang templates lines than business logic lines in my applications.

I'm considering to go back to Docker compose files. It's simple, readable, and easy to maintain.

Re:How we use HashiCorp Nomad by q3k on Saturday June 06, 2020 @12:48PM (#23440465)
Highly recommend trying Jsonnet (via https://github.com/bitnami/kubecfg and https://github.com/bitnami-labs/kube-libsonnet) as an alternative. It makes writing Kubernetes manifests much more expressive and integrates better with Git/VCS based workflows. Another language like Dhall or CUE might also work, but I'm not aware of a kubecfg equivalent for them.

Jsonnet in general is a pretty damn good configuration language, not only for Kubernetes. And much more powerful than HCL.

Re:How we use HashiCorp Nomad by threentaway on Saturday June 06, 2020 @02:58PM (#23441477)
If you like those, I'd take a look at Grafana's Tanka [0]. It also uses jsonnet but has some additional features such as showing a diff of your changes before you apply, easy vendored libraries using jsonnet-bundler, and the concept of "environments" which prevents you from accidentally applying changes to the wrong namespace/cluster.

[0] https://github.com/grafana/tanka

Re:How we use HashiCorp Nomad by q3k on Saturday June 06, 2020 @03:41PM (#23441713)
I looked at it, I don't like it for the same reason as I dislike many other tools in this space: it imposes its own directory structure, abstraction (environments) and workflow. I'm a fan of the kubecfg-style approach, where it lets you use whatever sort of structure makes sense for you and your project.

It's a 'framework' vs 'library' thing, but in the devops context.

Re:How we use HashiCorp Nomad by dilyevsky on Sunday June 07, 2020 @03:45AM (#23445552)
I worked on this at previous gig - https://github.com/cruise-automation/isopod

Same use-case but uses Starlark dsl instead of jsonnet

Re:How we use HashiCorp Nomad by kraig on Saturday June 06, 2020 @01:11PM (#23440655)
Funny, I thought jsonnet was an even worse experience than templating yaml
Re:How we use HashiCorp Nomad by p_l on Saturday June 06, 2020 @05:18PM (#23442303)
The problem with templating YAML is that you're templating text, in a very sensitive to whitespace syntax. By definition, Jsonnet avoids that because it operates on the data structure, not on their stringified representation.
Re:How we use HashiCorp Nomad by q3k on Saturday June 06, 2020 @01:21PM (#23440738)
My experience with jsonnet varied: there's good jsonnet code, and there's bad one, too. Just like with any programming language, you have to apply good software engineering practices. Text templated YAML, however, is terrible by design.
Re:How we use HashiCorp Nomad by AlphaSite on Saturday June 06, 2020 @03:36PM (#23441690)
Ive found the whole k14s eco system is pretty great to (ytt + kbld + kapp).
Re:How we use HashiCorp Nomad by q3k on Saturday June 06, 2020 @03:43PM (#23441727)
ytt is even more templating-yaml-with-yaml, so it all ends up being a bargain bin Helm. There's no reason to do this over just serializing plain structures into YAML/JSON/...
Re:How we use HashiCorp Nomad by AlphaSite on Saturday June 06, 2020 @05:21PM (#23442325)
It avoids the whole set of issues you get with templating yaml with helm since its structure aware.

Also you can actually write pure code libraries in starlark (basically a subset of Python)

Re:How we use HashiCorp Nomad by q3k on Saturday June 06, 2020 @06:42PM (#23442964)
I'm aware, but I just don't understand the point of it. How is it in any way better than a purpose-specific configuration language like Dhall/CUE/Jsonnet? What's the point of having it look like YAML at all?
Re:How we use HashiCorp Nomad by sandGorgon on Saturday June 06, 2020 @03:35PM (#23441679)
We just moved to the kubernetes ecosystem - specifically for integration with spot instances of AWS (and cut our costs by 60%).

But I hate the UX of kubernetes. Compose was beautiful.

I have hope - since compose files have become an independent specification. https://www.docker.com/blog/announcing-the-compose-specifica...

Kubernetes distro built around the compose file specification would be a unicorn.