From 1dec85e538071b51f60404e67e6d2261b85dbaf5 Mon Sep 17 00:00:00 2001 From: Michel Thebeau Date: Fri, 10 Feb 2023 09:08:51 -0500 Subject: [PATCH] adjust oidc-auth-apps upgrade logic oidc-auth-apps in 21.12 is from a different provider and not compatible with the application in 22.06 and 22.12. The upgrade from 22.06 to 22.12 is handled by 65-k8s-app-upgrade.sh. Upgrade from 21.12 is handled by another script. Test Plan: PASS - Build master branch PASS - Unit test logic of conditions with variables for cert-manager and oidc-auth-apps, 21.12, 22.06, 22.12 PASS - manually apply the change for 21.12 to 22.12 upgrade PASS - manually apply the change for 22.06 to 22.12 upgrade Story: 2009303 Task: 47367 Change-Id: I189e1e42f55013ab357f55a17459c6c02becb1f7 Signed-off-by: Michel Thebeau --- .../controllerconfig/upgrade-scripts/65-k8s-app-upgrade.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllerconfig/controllerconfig/upgrade-scripts/65-k8s-app-upgrade.sh b/controllerconfig/controllerconfig/upgrade-scripts/65-k8s-app-upgrade.sh index b4a987a247..722cbda6ac 100644 --- a/controllerconfig/controllerconfig/upgrade-scripts/65-k8s-app-upgrade.sh +++ b/controllerconfig/controllerconfig/upgrade-scripts/65-k8s-app-upgrade.sh @@ -92,7 +92,9 @@ if [ "$ACTION" == "activate" ]; then # fluxcd application upgrade is supported if [[ "${UPGRADE_APP_NAME}" =~ ^(platform-integ-apps|nginx-ingress-controller|snmp|metrics-server|auditd|ptp-notification|istio)$ ]]; then log "$NAME: ${UPGRADE_APP_NAME} is a supported platform application." - elif [[ "${UPGRADE_APP_NAME}" =~ ^(cert-manager|oidc-auth-apps)$ && ( "$FROM_RELEASE" == "22.06" || "$FROM_RELEASE" == "21.12" ) ]]; then + elif [[ "${UPGRADE_APP_NAME}" =~ ^(cert-manager)$ && ( "$FROM_RELEASE" == "22.06" || "$FROM_RELEASE" == "21.12" ) ]]; then + log "$NAME: ${UPGRADE_APP_NAME} is a supported platform application from $FROM_RELEASE." + elif [[ "${UPGRADE_APP_NAME}" =~ ^(oidc-auth-apps)$ && ( "$FROM_RELEASE" == "22.06" ) ]]; then log "$NAME: ${UPGRADE_APP_NAME} is a supported platform application from $FROM_RELEASE." elif [[ "${UPGRADE_APP_NAME}" =~ ^(cert-manager|oidc-auth-apps)$ ]]; then log "$NAME: ${UPGRADE_APP_NAME} is handled by another script."