Upgrading a Helm chart to the latest version

Upgrading a Helm chart to the latest version

Remember that you have added a commented out link for every new chart in the main requirements.yaml linking to the relevant Chart.yaml in their repo?

Yes?? It is time to use them, continue reading!

No?? Then you have missed the first article of this series Add a new chart in Kubernetes using Helm package manager! Please read this first!

So, now that you have the links mentioned above you have to use them! Every now and then, follow these links to the Chart.yaml files and check the latest version.

If the chart is updated then follow these steps:

Keep in mind that when the writer makes any change in any of the chart's files, they are obliged to bump up the version number of the chart in the Chart.yaml. So any commit with changes in the charts files will also change Chart.yaml. This detail will be super important on the next step.

  • In the chart repo, open Chart.yaml and click on the History

Chart.yaml1.png

  • And now comes the difficult part. Check each one of the commits. Read thoroughly the code changes and evaluate if any of the changes in templates or params affect your existing configuration. If you are in question, remember to check the values.yaml for the specific parameter. Most of the times, the writers leave a commented out example of usage.

Screenshot 2020-01-29 at 15.51.18.png

  • If you are confident that the changes do not affect you, change the version in requirements.yaml and run helm dependencies update (read more about this command here). When you do so, requirements.lock file will be updated with the latest versions picked after your changes in requirements.yaml. Verify these version changes are the one you expected.

  • Use helm template or helm diff ((read more for this plugin here)) to render the changes in templates and understand that the changes are the ones you would expect to see.

  • Customise the changed/added configurable params to your needs and validate again the result using helm template or helm diff.

And there you are, ready to deploy the changes to your Kubernetes cluster!

All About That Bass - Postmodern Jukebox European Tour Version