From 3c8a992c5f8f685b0d5ad9fde8a679979ed7dba3 Mon Sep 17 00:00:00 2001 From: Kaustubh Dhokte Date: Mon, 22 Aug 2022 02:30:15 -0400 Subject: [PATCH] Add upgrade path for feature-gate removal The commit https://opendev.org/starlingx/integ/commit/a6a5349d025487672fe818aae36a2020a9f9f08c (k8s-1.22.5: remove feature-gates) added a script that removes deprecated feature gates which is run during upgrade-activate phase of previous upgrade cycle . The commit https://opendev.org/starlingx/integ/commit/73632416b3fc5ddaa8e2b4babb93ba00fd6c58ca (Preserve kube-apiserver manifest params during upgrade-activate) modified the script to preserve the kube-apiserver manifest parameters and it is supposed to run in next patch release upgrade. This change adds a new 'from_version' for the manifest to run during next patch release. The previous 'from_version' is still supported as in the future, we will need to support CentOS to Debian upgrade. Test Plan: On CentOS AIO-SX PASS: Upgrade Successful. Check if advertise address in kube-apiserver manifest before and after running upgrade-activate is same. Ensure that the seccomp profile configuration is removed after upgrade-activate. Kube-apiserver is running and cluster is accessible after the upgrade. Closes-Bug: 1986854 Signed-off-by: Kaustubh Dhokte Change-Id: I0e40df6e341f2da4f0e7ed4b4803197cd07470d5 --- sysinv/sysinv/sysinv/sysinv/conductor/manager.py | 2 +- tsconfig/tsconfig/tsconfig/tsconfig.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py index 918d80c76a..5587e43345 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py @@ -12011,7 +12011,7 @@ class ConductorManager(service.PeriodicService): # Apply etcd split ca puppet manifest for standby controller. manifests_applied = self._split_etcd_security_config(context) - if from_version == tsc.SW_VERSION_21_12: + if from_version in (tsc.SW_VERSION_21_12, tsc.SW_VERSION_22_06): manifests_applied |= self._update_kubeadm_feature_gates(context) if manifests_applied: diff --git a/tsconfig/tsconfig/tsconfig/tsconfig.py b/tsconfig/tsconfig/tsconfig/tsconfig.py index fcd14fff6d..00f74e1141 100644 --- a/tsconfig/tsconfig/tsconfig/tsconfig.py +++ b/tsconfig/tsconfig/tsconfig/tsconfig.py @@ -15,6 +15,7 @@ from six.moves import configparser SW_VERSION = "" SW_VERSION_21_05 = "21.05" SW_VERSION_21_12 = "21.12" +SW_VERSION_22_06 = "22.06" nodetype = None subfunctions = []