Upgrading a chart
Read the release notes first
Each chart version is described in release notes in the Mamluk console, available to licensed organisations. They state what the version changes, and whether any of your values must change with it.
Upgrade
helm repo update
helm upgrade orders-db tersane/mysql \
--namespace data \
--version <chart version> \
-f orders-db.values.yaml
Pass the same values file you installed with, after making any change the
release notes require. Avoid --reuse-values: it carries forward whatever was
last applied, including values that were never written down, and it does not
pick up a default the new chart version has changed.
What an upgrade runs
Some charts run a job on every installation and upgrade. The mysql chart’s
reconcile job, for example, brings the databases and users in the instance into
line with mysql.databases in your values. A database removed from that list
is dropped, if the chart created it. Read a chart’s page for what its jobs do
before removing anything from a values file.
What an upgrade cannot change
Kubernetes does not allow some parts of a StatefulSet to change after it is created, and a chart cannot work around that. Decide these before installation:
- Storage. The storage class and the volumes a StatefulSet claims are fixed when it is created.
- MySQL encryption. The
mysqlchart’s keyring volume cannot be added to an instance that was installed without it, and volume encryption is a property of the storage class the volumes were created with.
Changing one of these means a new release, with the data restored into it from a backup.
Roll back
helm history orders-db --namespace data
helm rollback orders-db <revision> --namespace data
A rollback restores the chart’s templates and the values of the earlier revision. It does not restore data: a schema change, a dropped database or a deleted volume is not reversed by a rollback. Restore data from a backup, as each data chart’s page describes.