From 48a897aa1270323490be2b1ff948a5b511b46b73 Mon Sep 17 00:00:00 2001 From: Heitor Matsui Date: Wed, 6 Dec 2023 18:49:59 -0300 Subject: [PATCH] Update k8s application upgrade script This commit makes the proper changes for upgrade script 65 to run during activate step in upgrade from stx8 -> master/stx9, and this commit also enables cert-manager and oidc-auth-apps to be handled by this script, now that CentOS is deprecated and there is no need to have a separate script to handle these applications anymore. Note: the USM upgrade activate, i.e. "software deploy activate" will be tested in the scope of another commit, since this command is still under development. Test Plan PASS: legacy upgrade stx8 -> master/stx9 upgrade activate step executed successfully Story: 2010676 Task: 49226 Change-Id: I85bf36cae2a190a0e6f49b9fa5b1a8b13d28d043 Signed-off-by: Heitor Matsui --- .../upgrade-scripts/65-k8s-app-upgrade.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/controllerconfig/controllerconfig/upgrade-scripts/65-k8s-app-upgrade.sh b/controllerconfig/controllerconfig/upgrade-scripts/65-k8s-app-upgrade.sh index cf8c314645..968c42bc8d 100644 --- a/controllerconfig/controllerconfig/upgrade-scripts/65-k8s-app-upgrade.sh +++ b/controllerconfig/controllerconfig/upgrade-scripts/65-k8s-app-upgrade.sh @@ -120,12 +120,6 @@ function retry_command { log "$NAME: Starting Kubernetes application updates from release $FROM_RELEASE to $TO_RELEASE with action $ACTION" if [ "$ACTION" == "activate" ]; then - # TODO: double check the inclusive condition. - if [ "$TO_RELEASE" != "22.12" ]; then - log "not upgrading to 22.12, skip" - exit 0 - fi - # remove upgrade in progress file [[ -f $UPGRADE_IN_PROGRESS_APPS_FILE ]] && rm -f $UPGRADE_IN_PROGRESS_APPS_FILE @@ -155,15 +149,8 @@ if [ "$ACTION" == "activate" ]; then # Confirm application is upgradable # TODO: move nginx back to the supported platform applications list when # fluxcd application upgrade is supported - if [[ "${UPGRADE_APP_NAME}" =~ ^(platform-integ-apps|nginx-ingress-controller|snmp|metrics-server|auditd|ptp-notification|istio)$ ]]; then + if [[ "${UPGRADE_APP_NAME}" =~ ^(platform-integ-apps|nginx-ingress-controller|snmp|metrics-server|auditd|ptp-notification|istio|cert-manager|oidc-auth-apps)$ ]]; then log "$NAME: ${UPGRADE_APP_NAME} is a supported platform application." - 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." - continue else log "$NAME: ${UPGRADE_APP_NAME} is not a supported platform application. skipping..." continue