From 0212e24b94344b38d1b3b2ffbec0bcec952e052b Mon Sep 17 00:00:00 2001 From: Gabriel Mainberger Date: Tue, 26 Mar 2024 11:37:46 +0100 Subject: [PATCH] Improvements in the upgrade documentation of v14 to v15 --- .../pages/how-tos/upgrade-14.x-to-15.x.adoc | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/modules/ROOT/pages/how-tos/upgrade-14.x-to-15.x.adoc b/docs/modules/ROOT/pages/how-tos/upgrade-14.x-to-15.x.adoc index e660de57..d47898e1 100644 --- a/docs/modules/ROOT/pages/how-tos/upgrade-14.x-to-15.x.adoc +++ b/docs/modules/ROOT/pages/how-tos/upgrade-14.x-to-15.x.adoc @@ -68,8 +68,8 @@ kubectl -n "${NAMESPACE}" exec -ti keycloak-postgresql-0 -c postgresql -- sh -c ---- kubectl -n $NAMESPACE scale statefulset keycloak-postgresql --replicas=0 -# Wait until statefulset has been scaled down -kubectl -n $NAMESPACE get statefulset keycloak-postgresql -w +# Check if the statefulset pod have been scaled down +kubectl -n $NAMESPACE get pod keycloak-postgresql-0 ---- . Delete the Postgres database production database persistentvolumeclaim. @@ -88,15 +88,15 @@ REALLY! DO NOT PROCEED HERE WITHOUT HAVING DONE A BACKUP AND ENSURED THE DUMP CO ---- kubectl -n $NAMESPACE delete persistentvolumeclaim data-keycloak-postgresql-0 -# Wait until persistent volume claim has been deleted -kubectl -n $NAMESPACE get persistentvolumeclaim data-keycloak-postgresql-0 -w +# Check if the persistent volume claim has been deleted +kubectl -n $NAMESPACE get persistentvolumeclaim data-keycloak-postgresql-0 ---- . Patch the Postgres statefulset to v15. + [source,bash] ---- -kubectl n $NAMESPACE patch sts keycloak-postgresql -p '{"spec": {"template": {"spec": {"containers": [{"name": "postgresql", "image": "docker.io/bitnami/postgresql:15.6.0-debian-12-r5"}]}}}}' +kubectl -n $NAMESPACE patch sts keycloak-postgresql -p '{"spec": {"template": {"spec": {"containers": [{"name": "postgresql", "image": "docker.io/bitnami/postgresql:15.6.0-debian-12-r5"}]}}}}' ---- . Scale up the Postgres database. @@ -113,7 +113,14 @@ kubectl -n $NAMESPACE get statefulset keycloak-postgresql -w + [source,bash] ---- -kubectl -n syn-keycloak-test logs keycloak-postgresql-0 | grep "PostgreSQL 15.6" +kubectl -n $NAMESPACE logs keycloak-postgresql-0 | grep "PostgreSQL 15.6" +---- ++ +should look similar to ++ +[source,bash] +---- +2024-03-26 16:17:24.653 GMT [1] LOG: starting PostgreSQL 15.6 on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit ---- . Import the SQL dump into the Postgres v15 database. @@ -140,7 +147,7 @@ kubectl -n "${NAMESPACE}" exec -ti keycloak-postgresql-0 -c postgresql -- sh -c + [source,bash] ---- -diff keycloak-postgresql-2024-02-23-13-04-21.sql keycloak-postgresql-2024-02-23-13-04-35.sql +diff <(sort keycloak-postgresql-2024-03-26-17-14-52.sql) <(sort keycloak-postgresql-2024-03-26-17-20-40.sql) ---- + Should be similar to: @@ -206,7 +213,7 @@ parameters: + [source,bash] ---- -kubectl -n syn patch applications.argoproj.io root --type=json \ +kubectl -n syn patch applications.argoproj.io root --type=json \ -p '[{ "op":"replace", "path":"/spec/syncPolicy",