r/kubernetes
•
u/piotr1215
k8s operator
•
Jul 23 '24
•
1
Finally, a viable Helm Replacement
I have a love-hate relationship with Helm. It’s straightforward for simple use cases, but creating Helm charts can be quite complex. Despite its utility, Helm has limitations and well-known issues.
Nelm, a part of the Werf project, is emerging as a promising alternative to Helm. It is a fully backwards compatible reimplementation of Helm, with improvements aimed at making it more robust and feature-rich.
This doesn't address the main issue of helm charts and go templating syntax, but I think it's a move in the right direction.
https://medium.com/@piotrzan/finally-a-viable-helm-replacement-388d538f9e1f
7
u/miran248 k8s operator Jul 23 '24
So.. what exactly are you solving here?
I don't like the templating part of helm, helm itself is ok.
Charts are usually extremely verbose, hard to reason about and maintain.
They also have their own apis, meaning you need to understand not only the underlying apis but also the charts themselves, before you can actually use them!
What i'd like to see is smaller, simpler crds for deployments (and everything else, really), two levels of nesting max!
Affinities, taints, containers, pods, resources, probes, .. every domain should have its own crd - as a result charts (and other solutions) would be much more focused, each doing only one thing instead of everything imaginable..
3
u/piotr1215 k8s operator Jul 23 '24
In the blog, I mention several specific improvements that nelm brings to the table.
Templating part of helm is an interesting problem. On one hand it's tightly coupled to Go templating and on the other is widely adopted by the community. Changes to the helm charts structure, if not backwards compatible, will be unlikely. Your wishlist of simpler CRDs, limited nesting etc, is great and I would like it too, but this will not happen. One possible improvement is to add more abstraction layers over helm charts or automate their creation, and both approaches have their tools.
For better or worse we are stuck with helm charts as a packaging mechanism.
3
u/aigrychev Jul 23 '24
Developing and maintaining Helm charts is indeed a headache, and an alternative approach is needed (which is already in the plans of Nelm). However, this is manageable, unlike many issues and limitations with the Helm deployment process.
Helm’s deployment process has significant problems. It doesn’t always achieve the expected state (3WM in Helm 3 is far from perfect, and changes in this area might be only expected in the next major release) and lacks any feedback (logs, resource conditions, events, and so on).
In Nelm, we strive to solve the fundamental problems of Helm and provide users with additional capabilities.
4
u/miran248 k8s operator Jul 23 '24
Oh, so you're focusing on a totally different area, cool!
Personally i always use argocd which then handles 3rd party charts and kustomizations (which sometimes includehelm templateoutputs).
I treat helm as necessary evil and try to get away from it the moment it's possible. Personal manifests are all kustomizations. Never deployed anything with helm directly.4
u/aigrychev Jul 23 '24
Yes, that’s correct. Our focus is currently on creating a solid and feature-rich deployment process. We want users to have the flexibility to use both Pull and Push models for deployment, all while using a single configuration. In our view, the Push model is more convenient for application development and the setup of various review/dev environments.
11
u/maiznieks Jul 23 '24 edited Jul 24 '24
Hmm, nope. Go templating is still there.
5
u/aigrychev Jul 23 '24 edited Jul 23 '24
Indeed, Go templating is still there. Our main focus is currently on improving the deployment process, but we have plans to add alternatives in the nearest future.
2
u/davidmdm Jul 24 '24 edited Jul 24 '24
Shamelessly plugging my own sales-pitch here, since you are not a fan of Go Templating, what would you think about using straight Go? Or any other general purpose language to define your chart/package?
That's what yoke tries to do. It's also supports existing helm charts.
7
u/thockin k8s maintainer Jul 24 '24
And here I thought the problem with helm was that it forces you to define a bespoke API (the values file) which eventually has exactly as many fields as (or more than) the thing it is "abstracting", only with less structure, documentation, or tooling.
5
u/ilya-lesikov Jul 24 '24
That's one of the problems. I don't see many issues with values.yaml file as a module/chart configuration format, but it is true that with the more generic charts it all becomes complex and ugly.
Enforcing particular structure of values.yaml files to do some magic on our part does not seem feasible. I think the only solution here could be a more dynamic approach to manifest generation, which can be achieved with general-purpose languages or maybe some specialized languages instead of Go templating.
2
u/thockin k8s maintainer Jul 24 '24
Kustomize has its flaws, but (IMO) it's better in that it doesn't try to be a generic template.
3
u/Long-Ad226 Jul 24 '24
IMO the only viable helm replacement is kustomize
3
u/aigrychev Jul 24 '24
Helm is not just about Charts with Go templates; it’s also about release management. The current development phase of Nelm focuses more on the deployment process itself. However, adding kustomize-like capabilities (patching step) and also an alternative mechanism for organizing Charts are in our plans.
2
u/Long-Ad226 Jul 24 '24
How can Helm Help with releases based on conventional commits and semver like example releaseplease does? I never heard of that
1
u/aigrychev Jul 24 '24
Helm does not offer any versioning strategies or automate this process. However, Helm allows users to manage application releases by providing the ability to deploy, upgrade, and rollback versions of their applications.
1
u/Long-Ad226 Jul 24 '24
Thats the Job of argocd and one of the reasons why it only uses Helm as template mechnism. Helm releases with those Release Secrets are awful.
1
u/aigrychev Jul 24 '24
I agree, the 1MB limit on Secrets can indeed be painful at times. Regarding ArgoCD, the Pull model is excellent for infrastructure components, but during active application development, we still prefer the Push model (especially for temporary review/dev environments).
Our focus is currently on creating a solid and feature-rich deployment process. We want users to have the flexibility to use both Pull and Push models for deployment, all while using a single configuration.
1
u/Long-Ad226 Jul 24 '24
I dont get what you mean with pull and push model in reference to that, but creating temporary environments with argocd is usually just creating a new branch in the correct repo via cicd and delete this branch with its argocd application when its not needed anymore.
Argocd applies Manifests to the cluster and keeps them in sync, Tekton or Argo Workflows updates, creates and deleteds Manifests in repo (which argocd then applies or deletes) its simple as that, there is no place for helm imo.The 1 MB Limit is nothing compard to the situation that your actual helm release is broken and you can't update the helm release because someone forgot:
"The Helm documentation describes the problem when Helm releases that are already deployed with APIs that are no longer supported. If the Kubernetes cluster (containing such releases) is updated to a version where the APIs are removed, then Helm becomes unable to manage such releases anymore. It does not matter if the chart being passed in the upgrade contains the supported API versions or not."
luckily der is a tool for that situation: https://github.com/helm/helm-mapkubeapis#background-to-the-issue
2
u/aigrychev Jul 24 '24 edited Jul 24 '24
Yes, and this is far from the only problem related to how Helm handles releases and the 3-Way Merge (3WM) mechanism. In Nelm, we have changed this mechanic and moved to Server-Side Apply (SSA). This transition provides a more reliable and robust way to manage updates and ensures better compatibility and control over resource changes.
We find the Push model more convenient for application development because it offers more immediate feedback and control during the active development phase and users do not need anything in the cluster.
UPD:
To clarify what I mean by deployment models:
Pull Model: Any operator (such as ArgoCD or Flux) continuously syncs the desired state from the source (git repository or container registry) to the cluster.
Push Model: This is where the user or the CI/CD pipeline directly applies changes to the cluster.
1
u/Long-Ad226 Jul 24 '24
"This is where the user or the CI/CD pipeline directly applies changes to the cluster."
Sorry but noone should do that, thats just wrong in 2024, this is completly out of gitops and nothing what cicd does should be out of gitops as today
Also refering to push vs pull model in this case is wrong imo, because you push too with cicd with argocd, you just dont 'push' directly to the cluster, you push into git repos
2
u/aigrychev Jul 24 '24
GitOps is not a silver bullet. The choice between Pull, Push, or hybrid models depends on specific needs and requirements.
→ More replies (0)
2
u/phobicbounce Jul 23 '24
Is anyone using cdk8’s?
1
Jul 23 '24
[removed] — view removed comment
2
u/e_safak Aug 11 '24
It looks dead. I only see bot commits in the past few months: https://github.com/cdk8s-team/cdk8s/commits/master/
0
u/dashingThroughSnow12 Jul 23 '24
Sure it is fully backwards compatible……
5
u/ilya-lesikov Jul 24 '24
With the amount of changes we introduce (e. g. the deployment subsystem made from scratch with a lot of new features) it's not easy to provide 100% backwards compatibility, but we strive for it. The goal is to deploy 99 out of 100 Helm charts with Nelm with 0 changes to the charts, and I'd say we are pretty close to that.
1
u/dashingThroughSnow12 Jul 24 '24
So you are close to almost compatible? Why not put that claim instead?
I’m saying, I’m not picking on you. I just dislike this industry’s lax definition of compatible, superset, etcetera.
2
u/dshurupov k8s contributor Jul 25 '24
I don't think that the Nelm project itself claimed being fully backwards compatible anywhere.
80
u/RepulsiveRaisin7 Jul 23 '24
Hardly a reimplementation, it calls Helm directly https://github.com/werf/nelm/blob/2b873c2734f500c6eee4292935ea729bf1ef5523/pkg/action/uninstall.go#L165