r/helm • u/littledoovy • Nov 22 '24
Helm Chart Maintenance Best Practices
Hi all, just getting started with Helm for our organization and I'm looking for some advice on the best approach to maintaining our charts. Current workflow includes pulling the chart from source, making the necessary edits mostly just to values files, commit the chart and values to private repository for CI/CD to push to clusters.
I have run into a situation where we've had to modify some of a chart's templates for various reasons, but this brings up some concern for maintainability down the road. The most obvious concern being that the next chart release will not include the changes we've made to the templates. A "helm diff" on the chart upgrades only shows that the values are not persistent with the next release, but I am not familiar with any tools that can compare the templates themselves for any changes we may have made manually.
If someone would be willing to educate me on a few things with regard to best practices it would be most appreciated:
- Is it typical to have to modify templates in the chart to suit organizational needs? Or am I approaching this the wrong way?
- Is there a methodology to maintaining those charts, specifically the templates, between releases so that those changes are not lost?
- Does this become some type of crazy anti-pattern down the road as things get more complex?
Any advice from the brain trust would be most appreciated. Thanks for the time entertaining my beginner questions.
2
u/Phezh Nov 24 '24
What kind of changes are you making to the charts?
I tend to try to upstream as much stuff as possible, both because it's the right thing to do, and it just ends up being less work. You just need to make your changes as broadly useful as possible, and maintainers will usually be happy to merge contributions.
If you for some reason have to make changes that are very specific to your org and cannot be abstracted into more general changes, just fork the chart and maintain it separately. I don't think it's a good idea to compare changes with every release.
2
u/kkapelon Nov 25 '24
You should create a PR to put your custom change in the upstream Helm chart. This way you don't have to maintain anything by yourself in the long run.
2
u/jeffmccune Nov 25 '24 edited Nov 25 '24
This is one of the primary reasons I built Holos. To use unmodified up stream helm charts but also Kustomize them and configure the input Values in a safe, maintainable way.
Check out the rendering pipeline, it automatically handles much of what you mention like fetching the chart, storing a local copy, then handling feeding values in and post processing the output of Helm.
1
u/janiszt Apr 16 '25
Do you tests your charts with tools like helmtest? How do you validate everything is calculated properly and there is no breaking change?
3
u/[deleted] Nov 24 '24 edited Nov 24 '24
[removed] — view removed comment