From 1276026f054ce1a1f10a232543dc6253c3da81e0 Mon Sep 17 00:00:00 2001 From: Christian Coffield Date: Fri, 7 Jun 2024 15:08:25 +0530 Subject: [PATCH] Added annotations for app-mobility upgrade (#587) * Added annotations for app-mobility upgrade * Added upgrade path for 1.0.3 release Signed-off-by: Harish P --------- Signed-off-by: Harish P --- controllers/csm_controller.go | 6 ++++++ .../application-mobility/v1.0.3/upgrade-path.yaml | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 operatorconfig/moduleconfig/application-mobility/v1.0.3/upgrade-path.yaml diff --git a/controllers/csm_controller.go b/controllers/csm_controller.go index d1560dbf2..dd2f76010 100644 --- a/controllers/csm_controller.go +++ b/controllers/csm_controller.go @@ -1371,6 +1371,10 @@ func (r *ContainerStorageModuleReconciler) checkUpgrade(ctx context.Context, cr newVersion := cr.GetModule(csmv1.AuthorizationServer).ConfigVersion return utils.IsValidUpgrade(ctx, oldVersion, newVersion, csmv1.Authorization, operatorConfig) } + if cr.HasModule(csmv1.ApplicationMobility) { + newVersion := cr.GetModule(csmv1.ApplicationMobility).ConfigVersion + return utils.IsValidUpgrade(ctx, oldVersion, newVersion, csmv1.ApplicationMobility, operatorConfig) + } driverType := cr.Spec.Driver.CSIDriverType if driverType == csmv1.PowerScale { // use powerscale instead of isilon as the folder name is powerscale @@ -1398,6 +1402,8 @@ func applyConfigVersionAnnotations(ctx context.Context, instance *csmv1.Containe var configVersion string if instance.HasModule(csmv1.AuthorizationServer) { configVersion = instance.GetModule(csmv1.AuthorizationServer).ConfigVersion + } else if instance.HasModule(csmv1.ApplicationMobility) { + configVersion = instance.GetModule(csmv1.ApplicationMobility).ConfigVersion } else { configVersion = instance.Spec.Driver.ConfigVersion } diff --git a/operatorconfig/moduleconfig/application-mobility/v1.0.3/upgrade-path.yaml b/operatorconfig/moduleconfig/application-mobility/v1.0.3/upgrade-path.yaml new file mode 100644 index 000000000..42d87de4e --- /dev/null +++ b/operatorconfig/moduleconfig/application-mobility/v1.0.3/upgrade-path.yaml @@ -0,0 +1,2 @@ + +minUpgradePath: v1.0.3