Upgrade from v9 to v10
This guide describes the steps to perform an upgrade of the component from version v9 to v10.
Parameter changes
-
charts.keycloakxchanged from1.3.2to1.6.0, the Keycloak image is updated from17.0.2to18.0.2. -
charts.postgresqlchanged from10.16.2to11.6.15, the Postgresql version remains the same version11.14.0-debian-10-r28. -
postgresql_helm_valuesauthentication parameters have been moved topostgresql_helm_values.authreflecting the Helm chart upgrade to 11. -
postgresql_helm_values.securityContext.enabledchanged topostgresql_helm_values.primary.securityContext.enabled. -
postgresql_helm_values.containerSecurityContext.enabledchanged topostgresql_helm_values.primary.containerSecurityContext.enabled. -
postgresql_helm_values.volumePermissions.securityContext.runAsUserhas no direct equivalent and therefore the volume permissions setup has to be disabled entirely by settingpostgresql_helm_values.volumePermissions.enabledtofalse. -
postgresql_helm_values.shmVolume.chmod.enabledhas no direct equivalent and therefore the shared volume setup has to be disabled entirely by settingpostgresql_helm_values.shmVolume.enabledtofalse.
If you’ve configured custom values for any of those parameters, make sure to adjust your configurations when upgrading from component version v9 to v10.
Step-by-step guide
When upgrading the component, the following actions are required if the built-in database is used:
-
Do a backup of the built-in database.
instance=keycloak namespace=syn-${instance} kubectl -n "${namespace}" exec -ti keycloak-postgresql-0 -c keycloak-postgresql -- sh -c 'PGDATABASE="$POSTGRES_DB" PGUSER="$POSTGRES_USER" PGPASSWORD="$POSTGRES_PASSWORD" pg_dump --clean' > keycloak-postgresql-$(date +%F-%H-%M-%S).sql -
Apply the parameter changes.
-
Compile and push the cluster catalog.
-
If you use the built-in database, you need to delete its StatefulSet to allow ArgoCD to apply the new version.
kubectl -n syn-keycloak delete sts keycloak-postgresqlThis step is necessary since the upgrade changes immutable properties in the Postgres StatefulSet if using the built-in database. This won’t delete the PVC
data-keycloak-postgresql-0. -
Verify that ArgoCD can sync all resources.