From 2a53919200bc2bf327c3660f21572433aa0df66a Mon Sep 17 00:00:00 2001 From: Akshay Saini Date: Mon, 14 Oct 2024 16:03:30 +0530 Subject: [PATCH 1/6] Add support of observability in minimal manifest for powermax --- .../moduleconfig/common/version-values.yaml | 3 +++ pkg/drivers/powermax.go | 5 ++++- pkg/modules/observability.go | 1 + samples/minimal-samples/powermax.yaml | 17 +++++++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/operatorconfig/moduleconfig/common/version-values.yaml b/operatorconfig/moduleconfig/common/version-values.yaml index fd4223007..b9cf5f6df 100644 --- a/operatorconfig/moduleconfig/common/version-values.yaml +++ b/operatorconfig/moduleconfig/common/version-values.yaml @@ -46,14 +46,17 @@ powermax: v2.10.1: csireverseproxy: "v2.9.1" authorization: "v1.10.1" + observability: "v1.8.1" replication: "v1.8.1" v2.11.0: csireverseproxy: "v2.11.0" authorization: "v1.11.0" replication: "v1.9.0" + observability: "v1.9.0" resiliency: "v1.10.0" v2.12.0: csireverseproxy: "v2.11.0" authorization: "v1.11.0" replication: "v1.10.0" + observability: "v1.10.0" resiliency: "v1.11.0" diff --git a/pkg/drivers/powermax.go b/pkg/drivers/powermax.go index 8502f9006..ae2cc3f2b 100644 --- a/pkg/drivers/powermax.go +++ b/pkg/drivers/powermax.go @@ -63,7 +63,10 @@ func PrecheckPowerMax(ctx context.Context, cr *csmv1.ContainerStorageModule, ope log := logger.GetLogger(ctx) // Check for default secret only // Array specific will be authenticated in csireverseproxy - cred := cr.Spec.Driver.AuthSecret + cred := cr.Name + "-creds" + if cr.Spec.Driver.AuthSecret != "" { + cred = cr.Spec.Driver.AuthSecret + } // Check if driver version is supported by doing a stat on a config file configFilePath := fmt.Sprintf("%s/driverconfig/powermax/%s/upgrade-path.yaml", operatorConfig.ConfigDirectory, cr.Spec.Driver.ConfigVersion) diff --git a/pkg/modules/observability.go b/pkg/modules/observability.go index dc0e68757..00df148b9 100644 --- a/pkg/modules/observability.go +++ b/pkg/modules/observability.go @@ -219,6 +219,7 @@ var defaultSecretsName = map[csmv1.DriverType]string{ csmv1.PowerScaleName: "-creds", csmv1.PowerFlex: "-config", csmv1.PowerFlexName: "-config", + csmv1.PowerMax: "-creds", } var defaultAuthSecretsName = []string{"karavi-authorization-config", "proxy-authz-tokens", "proxy-server-root-certificate"} diff --git a/samples/minimal-samples/powermax.yaml b/samples/minimal-samples/powermax.yaml index cdd2ff201..a8193f051 100644 --- a/samples/minimal-samples/powermax.yaml +++ b/samples/minimal-samples/powermax.yaml @@ -19,3 +19,20 @@ spec: enabled: false - name: replication enabled: false + - name: observability + # enabled: Enable/Disable observability + enabled: false + components: + - name: topology + enabled: true + - name: otel-collector + enabled: true + - name: cert-manager + # enabled: Enable/Disable cert-manager + # Allowed values: + # true: enable deployment of cert-manager + # false: disable deployment of cert-manager only if it's already deployed + # Default value: false + enabled: false + - name: metrics-powermax + enabled: true From 767147a011c861ec866aa68e34bd28217117b3f6 Mon Sep 17 00:00:00 2001 From: Akshay Saini Date: Mon, 14 Oct 2024 16:58:33 +0530 Subject: [PATCH 2/6] Add topology image in v1.10.0 --- .../moduleconfig/observability/v1.10.0/karavi-topology.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operatorconfig/moduleconfig/observability/v1.10.0/karavi-topology.yaml b/operatorconfig/moduleconfig/observability/v1.10.0/karavi-topology.yaml index 75b0e88d7..5eccc74c8 100644 --- a/operatorconfig/moduleconfig/observability/v1.10.0/karavi-topology.yaml +++ b/operatorconfig/moduleconfig/observability/v1.10.0/karavi-topology.yaml @@ -96,7 +96,7 @@ spec: serviceAccount: karavi-observability-topology-controller containers: - name: karavi-topology - image: + image: dellemc/csm-topology:v1.10.0 resources: {} env: - name: PORT From 685a523a923109556f094d7fa40c2007a1df4964 Mon Sep 17 00:00:00 2001 From: Akshay Saini Date: Wed, 16 Oct 2024 13:48:55 +0530 Subject: [PATCH 3/6] Update metrics images for v1.10.0 --- .../observability/v1.10.0/karavi-metrics-powerflex.yaml | 2 +- .../observability/v1.10.0/karavi-metrics-powermax.yaml | 2 +- .../observability/v1.10.0/karavi-metrics-powerscale.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powerflex.yaml b/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powerflex.yaml index 4f5a2eb52..556f64e62 100644 --- a/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powerflex.yaml +++ b/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powerflex.yaml @@ -105,7 +105,7 @@ spec: serviceAccount: karavi-metrics-powerflex-controller containers: - name: karavi-metrics-powerflex - image: dellemc/csm-metrics-powerflex:v1.7.0 + image: dellemc/csm-metrics-powerflex:v1.10.0 resources: {} env: - name: POWERFLEX_METRICS_ENDPOINT diff --git a/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powermax.yaml b/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powermax.yaml index cb2c0bde8..b2a772fef 100644 --- a/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powermax.yaml +++ b/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powermax.yaml @@ -106,7 +106,7 @@ spec: serviceAccountName: karavi-metrics-powermax-controller containers: - name: karavi-metrics-powermax - image: dellemc/csm-metrics-powermax:v1.2.0 + image: dellemc/csm-metrics-powermax:v1.5.0 resources: {} env: - name: POWERMAX_METRICS_ENDPOINT diff --git a/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powerscale.yaml b/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powerscale.yaml index 8aa8228fa..47c71a325 100644 --- a/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powerscale.yaml +++ b/operatorconfig/moduleconfig/observability/v1.10.0/karavi-metrics-powerscale.yaml @@ -106,7 +106,7 @@ spec: serviceAccount: karavi-metrics-powerscale-controller containers: - name: karavi-metrics-powerscale - image: dellemc/csm-metrics-powerscale:v1.4.0 + image: dellemc/csm-metrics-powerscale:v1.7.0 resources: {} env: - name: POWERSCALE_METRICS_ENDPOINT From a63c6941557b75ba026e0176b28b85ad7f99d516 Mon Sep 17 00:00:00 2001 From: Akshay Saini Date: Wed, 16 Oct 2024 14:31:26 +0530 Subject: [PATCH 4/6] Fix UT failure --- pkg/drivers/powermax_test.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/pkg/drivers/powermax_test.go b/pkg/drivers/powermax_test.go index 37985ea6d..82b81c426 100644 --- a/pkg/drivers/powermax_test.go +++ b/pkg/drivers/powermax_test.go @@ -47,20 +47,6 @@ var ( }{ {"happy path", powerMaxCSM, powerMaxClient, powerMaxSecret, ""}, {"no proxy set defaults", powerMaxCSMNoProxy, powerMaxClient, powerMaxSecret, ""}, - } - - preCheckpowerMaxTest = []struct { - // every single unit test name - name string - // csm object - csm csmv1.ContainerStorageModule - // client - ct client.Client - // secret - sec *corev1.Secret - // expected error - expectedErr string - }{ {"missing secret", powerMaxCSM, powerMaxClient, pMaxfakeSecret, "failed to find secret"}, {"bad version", powerMaxCSMBadVersion, powerMaxClient, powerMaxSecret, "not supported"}, {"bad latest version", powermaxDefaultKubeletPath, powerMaxClient, powerMaxSecret, ""}, @@ -69,17 +55,6 @@ var ( func TestPrecheckPowerMax(t *testing.T) { ctx := context.Background() - for _, tt := range preCheckpowerMaxTest { - t.Run(tt.name, func(t *testing.T) { // #nosec G601 - Run waits for the call to complete. - err := PrecheckPowerMax(ctx, &tt.csm, config, tt.ct) - if tt.expectedErr == "" { - assert.Nil(t, err) - } else { - assert.Containsf(t, err.Error(), tt.expectedErr, "expected error containing %q, got %s", tt.expectedErr, err) - } - }) - } - for _, tt := range powerMaxTests { err := tt.ct.Create(ctx, tt.sec) if err != nil { From 3cc6feab710c6caac46f4f435aff365e4c782e98 Mon Sep 17 00:00:00 2001 From: Akshay Saini Date: Wed, 16 Oct 2024 14:46:56 +0530 Subject: [PATCH 5/6] Fix replication images --- operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml | 2 +- pkg/modules/replication.go | 2 -- samples/minimal-samples/powerflex.yaml | 2 +- samples/minimal-samples/powerscale.yaml | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml b/operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml index c45bb6d02..c75c6a1b8 100644 --- a/operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml +++ b/operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml @@ -282,7 +282,7 @@ spec: value: /app/certs - name: X_CSI_REPLICATION_CONFIG_FILE_NAME value: config - image: + image: dellemc/dell-replication-controller:v1.10.0 imagePullPolicy: Always name: manager resources: diff --git a/pkg/modules/replication.go b/pkg/modules/replication.go index 019c11b00..b9b2906e8 100644 --- a/pkg/modules/replication.go +++ b/pkg/modules/replication.go @@ -51,8 +51,6 @@ const ( DefaultRetryMin = "" // DefaultRetryMax - DefaultRetryMax = "" - // DefaultReplicaImage - - DefaultReplicaImage = "" // DefaultReplicaInitImage - DefaultReplicaInitImage = "" ) diff --git a/samples/minimal-samples/powerflex.yaml b/samples/minimal-samples/powerflex.yaml index 2b07eb1a7..5ce71bd0c 100644 --- a/samples/minimal-samples/powerflex.yaml +++ b/samples/minimal-samples/powerflex.yaml @@ -23,7 +23,7 @@ spec: # Default value: false enabled: false - name: replication - enabled: true + enabled: false # observability: allows to configure observability - name: observability # enabled: Enable/Disable observability diff --git a/samples/minimal-samples/powerscale.yaml b/samples/minimal-samples/powerscale.yaml index 8c59fafdc..69e4f43cb 100644 --- a/samples/minimal-samples/powerscale.yaml +++ b/samples/minimal-samples/powerscale.yaml @@ -23,7 +23,7 @@ spec: # Default value: false enabled: false - name: replication - enabled: true + enabled: false - name: observability # enabled: Enable/Disable observability enabled: false From 32198ef66343455bd4204946fcd42522d1af982d Mon Sep 17 00:00:00 2001 From: Akshay Saini Date: Wed, 16 Oct 2024 14:54:35 +0530 Subject: [PATCH 6/6] Revert replication controller images --- operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml b/operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml index c75c6a1b8..c45bb6d02 100644 --- a/operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml +++ b/operatorconfig/moduleconfig/replication/v1.10.0/controller.yaml @@ -282,7 +282,7 @@ spec: value: /app/certs - name: X_CSI_REPLICATION_CONFIG_FILE_NAME value: config - image: dellemc/dell-replication-controller:v1.10.0 + image: imagePullPolicy: Always name: manager resources: