3 ms·
helm + go-templating in YAML is pure madness. I've found k8s more manageable with straight manifests, or tooling to generate the manifests from some other sour
by jasonjayr 3y ago
helm + go-templating in YAML is pure madness.
I've found k8s more manageable with straight manifests, or tooling to generate the manifests from some other source.
I do need to give jsonnet a hard look, as I hear it's less crazy than yaml+templates
- vbezhenar 3y agoYou definitely don't have to use helm and go-templating for small projects. I never used it (other than from the user side to install 3-rd party software). Just ordinary yamls is absolutely fine. Kustomize might be useful for configmaps and secrets, but that's a small layer of complexity. What I want to try to generate yamls is to write typescript code. Emitting JSON is natural in typescript. Adding types for schema compliance is doable. And then you've got full typescript power on top of it to remove any kind of duplication.
- jasonjayr 3y agoI agree with that approach, and it's one I want to try as well. I'm an old Perl guy, but the transition to being a JS/TS native to use modern interfaces + toolings has proven a pretty straightforward path, especially with nodejs systems side for scripts and what not. The 'declarative' nature of YAML + configuration for defining infrastructure is definitely a good thing, but the tooling for producing those declarations are in a very rough state. I think a "TS => YAML => git => deploy" workflow for deployments could make using K8S a breeze, especially if there is a sensible library in TS that could provide the base classes for manifests, that could be subclassed or wrapped with defaults + definitions for the local environment
- tao_at_garden 3y agoThere's a number of solutions. One is to use a maintained Helm Library Chart that exposes all the values most could ever want like The Helmet [1]. The other is to move over to something like Timoni that is analogous to Helm but with better templating [2]. [1] https://github.com/companyinfo/helm-charts/tree/main/charts/helmet https://github.com/companyinfo/helm-charts/tree/main/charts/... [2] https://timoni.sh/comparison/ https://timoni.sh/comparison/