4 ms·
Consider instead writing a small program in your favorite programming language that generates the YAML, and then piping the output of that into `kubectl apply`.
by kjgkjhfkjf 8y ago
Consider instead writing a small program in your favorite programming language that generates the YAML, and then piping the output of that into `kubectl apply`.
- jazoom 8y agoWhy would I want to write my own Kustomize when this one already exists?
- Benjamin_Dobell 8y agoYeah, I replaced a custom resource patching solution with Kustomize. I was very concerned my custom solution would inhibit on-boarding, and wasn't thrilled with Helm. Back in November I was pretty happy when I stumbled across Kustomize, it claimed to do exactly what I wanted it to do. In reality there were a few hiccups, but it's certainly moving in the right direction. Granted, I still do have a bunch of "opinionated" scripts, but they delegate the heavy lifting to Kustomize, and all the configuration itself is just stock-standard k8s resources.
- nahname 8y agoRecently refactored some of our yaml/erb and it worked out quite well for us. With the addition of fixtures to show current vs next form of the entire yaml, it has made altering our cluster much easier to follow and keep changes consistent.
- bryanlarsen 8y agoWe just switched from a mess of incomprehensible kustomize to this, much nicer. Jkcfg.github.io makes this a lot easier. JavaScript may not be anyone's favorite, but everyone knows it.
- state_less 8y agoThanks for the pointer to jkcfg. Our helm chart templates are getting too complex for the tooling and it's making me wish we were using a more powerful programming environment. One where we could reuse code more easily across projects. We could still write our configuration code in a declarative style, that's a matter of code structure. I do like helm's interface around packages: install, upgrade and test. I like that packages have a tree structure that you can compose (if you opt to do so). It'd be nice to extend the interface further to have other common actions you could apply to a more advanced package (e.g. backup, restore, chaos test, add tenant, remove tenant, etc).