Kubernetes
Upgrade an installation made with the Helm chart
- Before you upgrade
- From 7.2 to 7.3
- 1. Find the new chart version
- 2. Upgrade the release
- 3. Check the upgrade
- Roll back
Each chart version deploys one AnsibleForms release. An upgrade installs a newer chart version with your existing values; the data on the persistent volumes is preserved. An upgrade that changes nothing leaves the pods untouched.
Before you upgrade
Prepare the upgrade so that you can go back if something goes wrong:
- Take a backup under Settings → Backups. The new release upgrades the database schema at its first start.
- Read the changelog for the releases between your version and the new one.
- Moving to a new major version? Follow Upgrading to v7 first.
- Read the chart’s changelog for changes to the values.
- With generated credentials (
secrets.generate), back up the<release>-secretsSecret:ENCRYPTION_SECRETcannot be recovered. - Coming from 7.2? The RTE in the server pod changes mode: see From 7.2 to 7.3.
From 7.2 to 7.3
Chart 7.3.0 moves the RTE next to the app out of database mode, deprecated in 7.3.0 and removed in 8.0.0. The app dials it on 127.0.0.1 and keeps one WebSocket open (RTE_MODE=inbound, see Modes):
- The RTE container no longer gets
DB_HOST,DB_USER,DB_PASSWORD,ENCRYPTION_SECRETorRTE_URL, and takes the job’s files from the shared volume (RTE_FILES=local) - The chart’s config seed declares an RTE credential with the token and the address, and the runner,
rte_mode: inbound, that signs in with it. With the chart’s seed, nothing is to do - With
containers.rte.seedRunner: false, or a config seed of your own (CONFIG_SEED_PATH), the RTE no longer adds itself as a runner. Declare it yourself, in your seed or under Connections → Runners: an RTE credential withhttp://127.0.0.1:<port>and the token, and a runner of type RTE withrte_mode: inboundthat names it. The notes Helm prints after the upgrade show how
The chart also installs a Runner on its own since 7.3.0, with runner.enabled (see A Runner on Kubernetes).
1. Find the new chart version
Refresh the chart repository and list the available chart versions:
helm repo update
helm search repo ansibleforms/ansibleforms --versions
2. Upgrade the release
Run the same helm upgrade command as at installation, with your values file and the new chart version:
helm upgrade --install ansibleforms ansibleforms/ansibleforms \
--namespace ansibleforms \
--values my_values.yaml \
--version 7.0.0
With the OCI registry, use oci://ghcr.io/ansibleforms/charts/ansibleforms as the chart.
3. Check the upgrade
Wait for the new pods, then run the chart’s test, which checks both the web server and the database connection:
kubectl -n ansibleforms get pods -w
helm test ansibleforms --namespace ansibleforms --logs
In AnsibleForms, Help → About shows the version that is running, and Settings → Status shows the health of the database, the schema and the other systems AnsibleForms depends on.
Roll back
Helm keeps the history of the release. To go back to the previous revision:
helm history ansibleforms --namespace ansibleforms
helm rollback ansibleforms --namespace ansibleforms
If it does not start on the upgraded database, restore your backup (see the chart’s README).