From 4c0801be98ab9c5916a5f61be33d499ac267b286 Mon Sep 17 00:00:00 2001 From: Rajendra Indukuri <82365588+rajendraindukuri@users.noreply.github.com> Date: Fri, 19 May 2023 17:44:12 +0530 Subject: [PATCH 1/4] Fix for csm object deployement update issue 4 scaling events (#245) --- controllers/csm_controller.go | 10 +++++++- pkg/utils/status.go | 43 ++++++++++++++++++++++++++--------- 2 files changed, 41 insertions(+), 12 deletions(-) diff --git a/controllers/csm_controller.go b/controllers/csm_controller.go index 2648f9bbe..51a537694 100644 --- a/controllers/csm_controller.go +++ b/controllers/csm_controller.go @@ -16,6 +16,7 @@ import ( "context" "encoding/json" "fmt" + "strconv" "sync/atomic" "time" @@ -357,18 +358,25 @@ func (r *ContainerStorageModuleReconciler) handleDeploymentUpdate(oldObj interfa csm := new(csmv1.ContainerStorageModule) err := r.Client.Get(ctx, namespacedName, csm) + if err != nil { log.Error("deployment get csm", "error", err.Error()) } newStatus := csm.GetCSMStatus() + + // Updating controller status manually as controller runtime API is not updating csm object with latest data + // TODO: Can remove this once the controller runtime repo has a fix for updating the object passed + newStatus.ControllerStatus.Available = strconv.Itoa(int(available)) + newStatus.ControllerStatus.Desired = strconv.Itoa(int(desired)) + newStatus.ControllerStatus.Failed = strconv.Itoa(int(numberUnavailable)) + err = utils.UpdateStatus(ctx, csm, r, newStatus) if err != nil { log.Debugw("deployment status ", "pods", err.Error()) } else { r.EventRecorder.Eventf(csm, corev1.EventTypeNormal, csmv1.EventCompleted, "Driver deployment running OK") } - } func (r *ContainerStorageModuleReconciler) handlePodsUpdate(oldObj interface{}, obj interface{}) { diff --git a/pkg/utils/status.go b/pkg/utils/status.go index bf69e627d..6009398ef 100644 --- a/pkg/utils/status.go +++ b/pkg/utils/status.go @@ -128,6 +128,8 @@ func getDeploymentStatus(ctx context.Context, instance *csmv1.ContainerStorageMo err = errors.New(msg) } + log.Infof("Deployment totalReplicas count %d totalReadyPods %d totalFailedCount %d", totalReplicas, totalReadyPods, totalFailedCount) + return totalReplicas, csmv1.PodStatus{ Available: fmt.Sprintf("%d", totalReadyPods), Desired: fmt.Sprintf("%d", totalReplicas), @@ -221,33 +223,46 @@ func getDaemonSetStatus(ctx context.Context, instance *csmv1.ContainerStorageMod func calculateState(ctx context.Context, instance *csmv1.ContainerStorageModule, r ReconcileCSM, newStatus *csmv1.ContainerStorageModuleStatus) (bool, error) { log := logger.GetLogger(ctx) running := false - controllerReplicas, controllerStatus, controllerErr := getDeploymentStatus(ctx, instance, r) + // TODO: Currently commented this block of code as the API used to get the latest deployment status is not working as expected + // TODO: Can be uncommented once this issues gets sorted out + /* controllerReplicas, controllerStatus, controllerErr := getDeploymentStatus(ctx, instance, r) + expected, nodeStatus, daemonSetErr := getDaemonSetStatus(ctx, instance, r) newStatus.ControllerStatus = controllerStatus + newStatus.NodeStatus = nodeStatus */ expected, nodeStatus, daemonSetErr := getDaemonSetStatus(ctx, instance, r) newStatus.NodeStatus = nodeStatus + controllerReplicas := newStatus.ControllerStatus.Desired + controllerStatus := newStatus.ControllerStatus newStatus.State = constants.Failed - log.Infof("deployment controllerReplicas [%d]", controllerReplicas) + log.Infof("deployment controllerReplicas [%s]", controllerReplicas) log.Infof("deployment controllerStatus.Available [%s]", controllerStatus.Available) log.Infof("daemonset expected [%d]", expected) log.Infof("daemonset nodeStatus.Available [%s]", nodeStatus.Available) - if (fmt.Sprintf("%d", controllerReplicas) == controllerStatus.Available) && (fmt.Sprintf("%d", expected) == nodeStatus.Available) { + if (controllerReplicas == controllerStatus.Available) && (fmt.Sprintf("%d", expected) == nodeStatus.Available) { running = true newStatus.State = constants.Succeeded } log.Infof("calculate overall state [%s]", newStatus.State) - var err error - if controllerErr != nil { - err = controllerErr - } + var err error = nil + // TODO: Uncomment this when the controller runtime API gets fixed + /* + if controllerErr != nil { + err = controllerErr + } + if daemonSetErr != nil { + err = daemonSetErr + } + if daemonSetErr != nil && controllerErr != nil { + err = fmt.Errorf("ControllerError: %s, Daemonseterror: %s", controllerErr.Error(), daemonSetErr.Error()) + log.Infof("calculate overall error msg [%s]", err.Error()) + } */ + if daemonSetErr != nil { err = daemonSetErr - } - if daemonSetErr != nil && controllerErr != nil { - err = fmt.Errorf("ControllerError: %s, Daemonseterror: %s", controllerErr.Error(), daemonSetErr.Error()) - log.Infof("calculate overall error msg [%s]", err.Error()) + log.Infof("calculate Daemonseterror msg [%s]", daemonSetErr.Error()) } SetStatus(ctx, r, instance, newStatus) return running, err @@ -284,6 +299,12 @@ func UpdateStatus(ctx context.Context, instance *csmv1.ContainerStorageModule, r if err != nil { return err } + + log.Infow("instance - new controller Status", "desired", instance.Status.ControllerStatus.Desired) + log.Infow("instance - new controller Status", "Available", instance.Status.ControllerStatus.Available) + log.Infow("instance - new controller Status", "numberUnavailable", instance.Status.ControllerStatus.Failed) + log.Infow("instance - new controller Status", "State", instance.Status.State) + csm.Status = instance.Status err = r.GetClient().Status().Update(ctx, csm) if err != nil { From 4f29f42bc3cb40eecaa3a86ff8cfb1f6629f5cf7 Mon Sep 17 00:00:00 2001 From: panigs7 <92028646+panigs7@users.noreply.github.com> Date: Fri, 19 May 2023 20:01:53 +0530 Subject: [PATCH 2/4] removing test- prefix in unity (#247) --- .../dell-csm-operator.clusterserviceversion.yaml | 10 +++------- config/samples/storage_v1_csm_unity.yaml | 10 ++++------ operatorconfig/driverconfig/unity/v2.5.0/node.yaml | 2 -- operatorconfig/driverconfig/unity/v2.6.0/node.yaml | 2 -- operatorconfig/driverconfig/unity/v2.7.0/node.yaml | 2 -- pkg/drivers/common_test.go | 3 --- pkg/drivers/unity.go | 10 ---------- samples/storage_csm_unity_v250.yaml | 10 ++++------ samples/storage_csm_unity_v260.yaml | 10 ++++------ samples/storage_csm_unity_v270.yaml | 10 ++++------ tests/config/driverconfig/unity/v2.6.0/controller.yaml | 10 +++++----- tests/config/driverconfig/unity/v2.6.0/node.yaml | 4 +--- tests/e2e/testfiles/storage_csm_unity.yaml | 10 ++++------ 13 files changed, 29 insertions(+), 64 deletions(-) diff --git a/bundle/manifests/dell-csm-operator.clusterserviceversion.yaml b/bundle/manifests/dell-csm-operator.clusterserviceversion.yaml index 68b2ca421..78289ccce 100644 --- a/bundle/manifests/dell-csm-operator.clusterserviceversion.yaml +++ b/bundle/manifests/dell-csm-operator.clusterserviceversion.yaml @@ -387,18 +387,14 @@ metadata: "apiVersion": "storage.dell.com/v1", "kind": "ContainerStorageModule", "metadata": { - "name": "test-unity", - "namespace": "test-unity" + "name": "unity", + "namespace": "unity" }, "spec": { "driver": { - "authSecret": "test-unity-creds", + "authSecret": "unity-creds", "common": { "envs": [ - { - "name": "X_CSI_UNITY_NODENAME_PREFIX", - "value": "csi-node" - }, { "name": "X_CSI_UNITY_ALLOW_MULTI_POD_ACCESS", "value": "false" diff --git a/config/samples/storage_v1_csm_unity.yaml b/config/samples/storage_v1_csm_unity.yaml index 04c97718f..cab1dca9e 100644 --- a/config/samples/storage_v1_csm_unity.yaml +++ b/config/samples/storage_v1_csm_unity.yaml @@ -1,8 +1,8 @@ apiVersion: storage.dell.com/v1 kind: ContainerStorageModule metadata: - name: test-unity - namespace: test-unity + name: unity + namespace: unity spec: driver: csiDriverType: "unity" @@ -15,8 +15,8 @@ spec: configVersion: v2.7.0 # authSecret: This is the secret used to validate the default Unity secret used for installation # Allowed values: -creds - # For example: If the metadataName is set to test-unity, authSecret value should be set to test-unity-creds - authSecret: test-unity-creds + # For example: If the metadataName is set to unity, authSecret value should be set to unity-creds + authSecret: unity-creds # Controller count replicas: 2 dnsPolicy: ClusterFirstWithHostNet @@ -27,8 +27,6 @@ spec: image: "dellemc/csi-unity:v2.7.0" imagePullPolicy: IfNotPresent envs: - - name: X_CSI_UNITY_NODENAME_PREFIX - value: "csi-node" # X_CSI_UNITY_ALLOW_MULTI_POD_ACCESS - Flag to enable sharing of volumes across multiple pods within the same node in RWO access mode. # Allowed values: boolean # Default value: "false" diff --git a/operatorconfig/driverconfig/unity/v2.5.0/node.yaml b/operatorconfig/driverconfig/unity/v2.5.0/node.yaml index a0e34765a..28ef3b2df 100644 --- a/operatorconfig/driverconfig/unity/v2.5.0/node.yaml +++ b/operatorconfig/driverconfig/unity/v2.5.0/node.yaml @@ -101,8 +101,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - - name: X_CSI_UNITY_NODENAME_PREFIX - value: - name: SSL_CERT_DIR value: /certs - name: X_CSI_UNITY_SYNC_NODEINFO_INTERVAL diff --git a/operatorconfig/driverconfig/unity/v2.6.0/node.yaml b/operatorconfig/driverconfig/unity/v2.6.0/node.yaml index 4338769a8..7fb52b16f 100644 --- a/operatorconfig/driverconfig/unity/v2.6.0/node.yaml +++ b/operatorconfig/driverconfig/unity/v2.6.0/node.yaml @@ -101,8 +101,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - - name: X_CSI_UNITY_NODENAME_PREFIX - value: - name: SSL_CERT_DIR value: /certs - name: X_CSI_UNITY_SYNC_NODEINFO_INTERVAL diff --git a/operatorconfig/driverconfig/unity/v2.7.0/node.yaml b/operatorconfig/driverconfig/unity/v2.7.0/node.yaml index 876c1ccda..4b0881417 100644 --- a/operatorconfig/driverconfig/unity/v2.7.0/node.yaml +++ b/operatorconfig/driverconfig/unity/v2.7.0/node.yaml @@ -101,8 +101,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - - name: X_CSI_UNITY_NODENAME_PREFIX - value: - name: SSL_CERT_DIR value: /certs - name: X_CSI_UNITY_SYNC_NODEINFO_INTERVAL diff --git a/pkg/drivers/common_test.go b/pkg/drivers/common_test.go index 00bfca810..8d35ecc9f 100644 --- a/pkg/drivers/common_test.go +++ b/pkg/drivers/common_test.go @@ -290,9 +290,6 @@ func csmWithUnity(driver csmv1.DriverType, version string, certProvided bool) cs } res.Spec.Driver.Common.Envs = []corev1.EnvVar{envVar1, envVar2, envVar3, envVar4, envVar5, envVar6, envVar7} - // Add node name prefix to cover some code in GetNode - // nodeNamePrefix := corev1.EnvVar{Name: "X_CSI_UNITY_NODENAME_PREFIX"} - // Add node fields specific to unity healthMonitor := corev1.EnvVar{Name: "X_CSI_HEALTH_MONITOR_ENABLED", Value: "true"} res.Spec.Driver.Node.Envs = []corev1.EnvVar{healthMonitor} diff --git a/pkg/drivers/unity.go b/pkg/drivers/unity.go index 8300e3c87..a21edc10c 100644 --- a/pkg/drivers/unity.go +++ b/pkg/drivers/unity.go @@ -36,9 +36,6 @@ const ( // UnityConfigParamsVolumeMount - Volume mount UnityConfigParamsVolumeMount = "csi-unity-config-params" - // CsiUnityNodeNamePrefix - Node Name Prefix - CsiUnityNodeNamePrefix = "" - // CsiLogLevel - Defines the log level CsiLogLevel = "" @@ -116,24 +113,17 @@ func PrecheckUnity(ctx context.Context, cr *csmv1.ContainerStorageModule, operat // ModifyUnityCR - Configuring CR parameters func ModifyUnityCR(yamlString string, cr csmv1.ContainerStorageModule, fileType string) string { // Parameters to initialise CR values - nodePrefix := "" healthMonitorNode := "" healthMonitorController := "" switch fileType { case "Node": - for _, env := range cr.Spec.Driver.Common.Envs { - if env.Name == "X_CSI_UNITY_NODENAME_PREFIX" { - nodePrefix = env.Value - } - } for _, env := range cr.Spec.Driver.Node.Envs { if env.Name == "X_CSI_HEALTH_MONITOR_ENABLED" { healthMonitorNode = env.Value } } - yamlString = strings.ReplaceAll(yamlString, CsiUnityNodeNamePrefix, nodePrefix) yamlString = strings.ReplaceAll(yamlString, CsiHealthMonitorEnabled, healthMonitorNode) case "Controller": for _, env := range cr.Spec.Driver.Controller.Envs { diff --git a/samples/storage_csm_unity_v250.yaml b/samples/storage_csm_unity_v250.yaml index e96ed3941..2e5aee00e 100644 --- a/samples/storage_csm_unity_v250.yaml +++ b/samples/storage_csm_unity_v250.yaml @@ -1,8 +1,8 @@ apiVersion: storage.dell.com/v1 kind: ContainerStorageModule metadata: - name: test-unity - namespace: test-unity + name: unity + namespace: unity spec: driver: csiDriverType: "unity" @@ -15,8 +15,8 @@ spec: configVersion: v2.5.0 # authSecret: This is the secret used to validate the default Unity secret used for installation # Allowed values: -creds - # For example: If the metadataName is set to test-unity, authSecret value should be set to test-unity-creds - authSecret: test-unity-creds + # For example: If the metadataName is set to unity, authSecret value should be set to unity-creds + authSecret: unity-creds # Controller count replicas: 2 dnsPolicy: ClusterFirstWithHostNet @@ -27,8 +27,6 @@ spec: image: "dellemc/csi-unity:v2.5.0" imagePullPolicy: IfNotPresent envs: - - name: X_CSI_UNITY_NODENAME_PREFIX - value: "csi-node" # X_CSI_UNITY_ALLOW_MULTI_POD_ACCESS - Flag to enable sharing of volumes across multiple pods within the same node in RWO access mode. # Allowed values: boolean # Default value: "false" diff --git a/samples/storage_csm_unity_v260.yaml b/samples/storage_csm_unity_v260.yaml index 9522f79a4..18118d768 100644 --- a/samples/storage_csm_unity_v260.yaml +++ b/samples/storage_csm_unity_v260.yaml @@ -1,8 +1,8 @@ apiVersion: storage.dell.com/v1 kind: ContainerStorageModule metadata: - name: test-unity - namespace: test-unity + name: unity + namespace: unity spec: driver: csiDriverType: "unity" @@ -15,8 +15,8 @@ spec: configVersion: v2.6.0 # authSecret: This is the secret used to validate the default Unity secret used for installation # Allowed values: -creds - # For example: If the metadataName is set to test-unity, authSecret value should be set to test-unity-creds - authSecret: test-unity-creds + # For example: If the metadataName is set to unity, authSecret value should be set to unity-creds + authSecret: unity-creds # Controller count replicas: 2 dnsPolicy: ClusterFirstWithHostNet @@ -27,8 +27,6 @@ spec: image: "dellemc/csi-unity:v2.6.0" imagePullPolicy: IfNotPresent envs: - - name: X_CSI_UNITY_NODENAME_PREFIX - value: "csi-node" # X_CSI_UNITY_ALLOW_MULTI_POD_ACCESS - Flag to enable sharing of volumes across multiple pods within the same node in RWO access mode. # Allowed values: boolean # Default value: "false" diff --git a/samples/storage_csm_unity_v270.yaml b/samples/storage_csm_unity_v270.yaml index 04c97718f..cab1dca9e 100644 --- a/samples/storage_csm_unity_v270.yaml +++ b/samples/storage_csm_unity_v270.yaml @@ -1,8 +1,8 @@ apiVersion: storage.dell.com/v1 kind: ContainerStorageModule metadata: - name: test-unity - namespace: test-unity + name: unity + namespace: unity spec: driver: csiDriverType: "unity" @@ -15,8 +15,8 @@ spec: configVersion: v2.7.0 # authSecret: This is the secret used to validate the default Unity secret used for installation # Allowed values: -creds - # For example: If the metadataName is set to test-unity, authSecret value should be set to test-unity-creds - authSecret: test-unity-creds + # For example: If the metadataName is set to unity, authSecret value should be set to unity-creds + authSecret: unity-creds # Controller count replicas: 2 dnsPolicy: ClusterFirstWithHostNet @@ -27,8 +27,6 @@ spec: image: "dellemc/csi-unity:v2.7.0" imagePullPolicy: IfNotPresent envs: - - name: X_CSI_UNITY_NODENAME_PREFIX - value: "csi-node" # X_CSI_UNITY_ALLOW_MULTI_POD_ACCESS - Flag to enable sharing of volumes across multiple pods within the same node in RWO access mode. # Allowed values: boolean # Default value: "false" diff --git a/tests/config/driverconfig/unity/v2.6.0/controller.yaml b/tests/config/driverconfig/unity/v2.6.0/controller.yaml index 128ef6fde..6ca7b6313 100644 --- a/tests/config/driverconfig/unity/v2.6.0/controller.yaml +++ b/tests/config/driverconfig/unity/v2.6.0/controller.yaml @@ -113,7 +113,7 @@ spec: topologyKey: "kubernetes.io/hostname" containers: - name: attacher - image: k8s.gcr.io/sig-storage/csi-attacher:v4.0.0 + image: registry.k8s.io/sig-storage/csi-attacher:v4.0.0 imagePullPolicy: IfNotPresent args: - "--csi-address=$(ADDRESS)" @@ -126,7 +126,7 @@ spec: - name: socket-dir mountPath: /var/run/csi - name: provisioner - image: k8s.gcr.io/sig-storage/csi-provisioner:v3.3.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0 imagePullPolicy: IfNotPresent args: - "--csi-address=$(ADDRESS)" @@ -147,7 +147,7 @@ spec: - name: socket-dir mountPath: /var/run/csi - name: snapshotter - image: k8s.gcr.io/sig-storage/csi-snapshotter:v6.1.0 + image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0 imagePullPolicy: IfNotPresent args: - "--csi-address=$(ADDRESS)" @@ -163,7 +163,7 @@ spec: - name: socket-dir mountPath: /var/run/csi - name: resizer - image: k8s.gcr.io/sig-storage/csi-resizer:v1.6.0 + image: registry.k8s.io/sig-storage/csi-resizer:v1.6.0 imagePullPolicy: IfNotPresent args: - "--csi-address=$(ADDRESS)" @@ -176,7 +176,7 @@ spec: - name: socket-dir mountPath: /var/run/csi - name: external-health-monitor - image: k8s.gcr.io/sig-storage/csi-external-health-monitor-controller:v0.7.0 + image: registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.7.0 imagePullPolicy: IfNotPresent args: - "--v=5" diff --git a/tests/config/driverconfig/unity/v2.6.0/node.yaml b/tests/config/driverconfig/unity/v2.6.0/node.yaml index b1ab5883c..7fb52b16f 100644 --- a/tests/config/driverconfig/unity/v2.6.0/node.yaml +++ b/tests/config/driverconfig/unity/v2.6.0/node.yaml @@ -101,8 +101,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - - name: X_CSI_UNITY_NODENAME_PREFIX - value: - name: SSL_CERT_DIR value: /certs - name: X_CSI_UNITY_SYNC_NODEINFO_INTERVAL @@ -132,7 +130,7 @@ spec: - name: unity-secret mountPath: /unity-secret - name: registrar - image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.6.0 + image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0 args: - "--v=5" - "--csi-address=$(ADDRESS)" diff --git a/tests/e2e/testfiles/storage_csm_unity.yaml b/tests/e2e/testfiles/storage_csm_unity.yaml index 4985468be..e3656528a 100644 --- a/tests/e2e/testfiles/storage_csm_unity.yaml +++ b/tests/e2e/testfiles/storage_csm_unity.yaml @@ -1,8 +1,8 @@ apiVersion: storage.dell.com/v1 kind: ContainerStorageModule metadata: - name: test-unity - namespace: test-unity + name: unity + namespace: unity spec: driver: csiDriverType: "unity" @@ -15,8 +15,8 @@ spec: configVersion: v2.6.0 # authSecret: This is the secret used to validate the default Unity secret used for installation # Allowed values: -config - # For example: If the metadataName is set to test-unity, authSecret value should be set to test-unity-config - authSecret: test-unity-creds + # For example: If the metadataName is set to unity, authSecret value should be set to unity-config + authSecret: unity-creds # Controller count replicas: 2 dnsPolicy: ClusterFirstWithHostNet @@ -27,8 +27,6 @@ spec: image: "dellemc/csi-unity:v2.6.0" imagePullPolicy: IfNotPresent envs: - - name: X_CSI_UNITY_NODENAME_PREFIX - value: "csi-node" - name: X_CSI_UNITY_ALLOW_MULTI_POD_ACCESS value: "false" - name: X_CSI_EPHEMERAL_STAGING_PATH From 8747000eac863287ff49604abf630964ae45914b Mon Sep 17 00:00:00 2001 From: Abrar Basha <109154267+mbasha-dell@users.noreply.github.com> Date: Fri, 19 May 2023 12:51:06 -0400 Subject: [PATCH 3/4] Node parameter e2 e (#248) * added sample files and cert-secret for first three test cases * testfiles/storage_csm_powerflex_alt_vals_1.yaml * add new e2e tests to values file * change check_parameters logic to use wc, change csv files accordingly, add csv files for pflex * made minor fixes * add a few db objects to cleanup-e2e * created E2E test files * added remaining test cases, checks, and updated check_parameter check * cleanup * added code to remove windows carriage return * resolved missing search parameters for e2e tests * added e2e test cases 4 & 5 * finished test scenarios removed configmaps * removed unneeded test steps * updated test parameters --------- Co-authored-by: Jooseppi Luna --- tests/e2e/check_parameters.sh | 30 +- tests/e2e/cleanup-e2e-test.sh | 2 +- .../testfiles/powerflex-cert-secret-0.yaml | 8 + .../testfiles/powerflex_alt_vals_1_values.csv | 19 ++ .../testfiles/powerflex_alt_vals_2_values.csv | 5 + .../testfiles/powerflex_alt_vals_3_values.csv | 3 + .../testfiles/powerflex_alt_vals_4_values.csv | 4 + .../testfiles/powerflex_alt_vals_5_values.csv | 6 + .../powerscale_alt_vals_1_values.csv | 42 +-- .../powerscale_alt_vals_2_values.csv | 14 +- .../powerscale_alt_vals_3_values.csv | 5 +- .../powerscale_health_monitor_values.csv | 6 +- .../storage_csm_powerflex_alt_vals_1.yaml | 263 +++++++++++++++++ .../storage_csm_powerflex_alt_vals_2.yaml | 263 +++++++++++++++++ .../storage_csm_powerflex_alt_vals_3.yaml | 264 ++++++++++++++++++ .../storage_csm_powerflex_alt_vals_4.yaml | 263 +++++++++++++++++ .../storage_csm_powerflex_alt_vals_5.yaml | 263 +++++++++++++++++ tests/e2e/testfiles/values.yaml | 117 ++++++++ 18 files changed, 1531 insertions(+), 46 deletions(-) create mode 100644 tests/e2e/testfiles/powerflex-cert-secret-0.yaml create mode 100644 tests/e2e/testfiles/powerflex_alt_vals_1_values.csv create mode 100644 tests/e2e/testfiles/powerflex_alt_vals_2_values.csv create mode 100644 tests/e2e/testfiles/powerflex_alt_vals_3_values.csv create mode 100644 tests/e2e/testfiles/powerflex_alt_vals_4_values.csv create mode 100644 tests/e2e/testfiles/powerflex_alt_vals_5_values.csv create mode 100644 tests/e2e/testfiles/storage_csm_powerflex_alt_vals_1.yaml create mode 100644 tests/e2e/testfiles/storage_csm_powerflex_alt_vals_2.yaml create mode 100644 tests/e2e/testfiles/storage_csm_powerflex_alt_vals_3.yaml create mode 100644 tests/e2e/testfiles/storage_csm_powerflex_alt_vals_4.yaml create mode 100644 tests/e2e/testfiles/storage_csm_powerflex_alt_vals_5.yaml diff --git a/tests/e2e/check_parameters.sh b/tests/e2e/check_parameters.sh index f9256ea5b..6caac1e97 100755 --- a/tests/e2e/check_parameters.sh +++ b/tests/e2e/check_parameters.sh @@ -21,31 +21,37 @@ if [ "$#" -ne 3 ]; then exit 1 fi +CSV_FILE=$1 +NS=$2 +NAME=$3 + +# get rid of any \r characters from windows +sed -i 's/\r//g' $CSV_FILE + # get controller describe -controllerpod=`kubectl get pods -n $2 | grep -m 1 controller | awk '{print $1}'` -kubectl describe pod $controllerpod -n $2 > controller-describe +controllerpod=`kubectl get pods -n $NS | grep -m 1 $NAME-controller | awk '{print $1}'` +kubectl describe pod $controllerpod -n $NS > controller-describe # get node describe -nodepod=`kubectl get pods -n $2 | grep -m 1 node | awk '{print $1}'` -kubectl describe pod $nodepod -n $2 > node-describe +nodepod=`kubectl get pods -n $NS | grep -m 1 $NAME-node | awk '{print $1}'` +kubectl describe pod $nodepod -n $NS > node-describe # get csm describe -kubectl describe csm $3 -n $2 > csm-describe +kubectl describe csm $NAME -n $NS > csm-describe { read - while IFS=, read -r paramName grepOptions paramValue k8sResource + while IFS=, read -r paramName grepOptions paramValue k8sResource numOccurences do - cat $k8sResource-describe | grep "$paramName" | grep -q $grepOptions "$paramValue" - RET=$? - if [ "$RET" == "0" ]; then - echo "$paramName with value $paramValue found in $k8sResource" + WC=`cat $k8sResource-describe | grep "$paramName" | grep $grepOptions "$paramValue" | wc -l` + if [ $WC -ge $numOccurences ]; then + echo "$numOccurences occurences of $paramName with value $paramValue found in $k8sResource" else - echo "ERROR: $paramName with value $paramValue NOT found in $k8sResource" + echo "ERROR: $WC occurences of $paramName with value $paramValue found in $k8sResource, $numOccurences expected" exit 1 fi done -} < $1 +} < $CSV_FILE rm -f controller-describe node-describe csm-describe diff --git a/tests/e2e/cleanup-e2e-test.sh b/tests/e2e/cleanup-e2e-test.sh index c3b23276a..f1e915197 100755 --- a/tests/e2e/cleanup-e2e-test.sh +++ b/tests/e2e/cleanup-e2e-test.sh @@ -54,7 +54,7 @@ while getopts ":h-:" optchar; do esac done -rm -f cert-csi isilon.db vxflexos.db powerscale.db powerscale-ifse2e.db powerstore.db unity.db controller-describe csm-describe node-describe +rm -f cert-csi isilon.db vxflexos.db op-e2e-vxflexos.db op-e2e-isilon.db powerscale.db powerscale-altifs.db powerscale-ifse2e.db powerstore.db unity.db controller-describe csm-describe node-describe if [ -z "$KEEPLOGS" ]; then rm -f error.log fatal.log info.log report.path diff --git a/tests/e2e/testfiles/powerflex-cert-secret-0.yaml b/tests/e2e/testfiles/powerflex-cert-secret-0.yaml new file mode 100644 index 000000000..6eb7425fe --- /dev/null +++ b/tests/e2e/testfiles/powerflex-cert-secret-0.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: powerflex-certs-0 + namespace: dell +type: Opaque +data: + cert-0: "" diff --git a/tests/e2e/testfiles/powerflex_alt_vals_1_values.csv b/tests/e2e/testfiles/powerflex_alt_vals_1_values.csv new file mode 100644 index 000000000..ac9b39706 --- /dev/null +++ b/tests/e2e/testfiles/powerflex_alt_vals_1_values.csv @@ -0,0 +1,19 @@ +parameter name, grep option for paramater value, parameter value,resource to describe,number of occurences of parameter name +Name,,powerflex,controller,4 +Namespace,,dell,controller,1 +F S Group Policy,,ReadWriteOnceWithFSType,csm,1 +Replicas,,2,csm,1 +Dns Policy,,ClusterFirstWithHostNet,csm,1 +Force Update,,true,csm,1 +Force Remove Driver,,true,csm,1 +Image Pull Policy,,Always,csm,2 +X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOT,,true,controller,1 +X_CSI_VXFLEXOS_ENABLESNAPSHOTCGDELETE,,true,controller,1 +X_CSI_HEALTH_MONITOR_ENABLED,,false,controller,1 +Tolerations,-v,none,controller,1 +X_CSI_APPROVE_SDC_ENABLED,,true,node,1 +X_CSI_RENAME_SDC_ENABLED,,true,node,1 +X_CSI_RENAME_SDC_PREFIX,,sdc,node,1 +X_CSI_ALLOW_RWO_MULTI_POD_ACCESS,,true,node,1 +X_CSI_HEALTH_MONITOR_ENABLED,,false,controller,1 +Tolerations,-v,none,node,1 diff --git a/tests/e2e/testfiles/powerflex_alt_vals_2_values.csv b/tests/e2e/testfiles/powerflex_alt_vals_2_values.csv new file mode 100644 index 000000000..c5b57c40c --- /dev/null +++ b/tests/e2e/testfiles/powerflex_alt_vals_2_values.csv @@ -0,0 +1,5 @@ +parameter name, grep option for paramater value, parameter value,resource to describe,number of occurences of parameter name +F S Group Policy,,None,csm,1 +Force Remove Driver,,true,csm,0 +Node-Selectors,-v,none,controller,1 +Tolerations,-v,none,controller,1 diff --git a/tests/e2e/testfiles/powerflex_alt_vals_3_values.csv b/tests/e2e/testfiles/powerflex_alt_vals_3_values.csv new file mode 100644 index 000000000..2f8d6356b --- /dev/null +++ b/tests/e2e/testfiles/powerflex_alt_vals_3_values.csv @@ -0,0 +1,3 @@ +parameter name, grep option for paramater value, parameter value,resource to describe,number of occurences of parameter name +Node-Selectors,-v,none,node,1 +Tolerations,-v,none,node,1 diff --git a/tests/e2e/testfiles/powerflex_alt_vals_4_values.csv b/tests/e2e/testfiles/powerflex_alt_vals_4_values.csv new file mode 100644 index 000000000..90cc328d5 --- /dev/null +++ b/tests/e2e/testfiles/powerflex_alt_vals_4_values.csv @@ -0,0 +1,4 @@ +parameter name, grep option for paramater value, parameter value,resource to describe,number of occurences of parameter name +Image,,dellemc/csi-vxflexos:v2.6.0,csm,1 +Image Pull Policy,,Never,csm,2 +Image,,dellemc/sdc:3.6.0.6,node,1 diff --git a/tests/e2e/testfiles/powerflex_alt_vals_5_values.csv b/tests/e2e/testfiles/powerflex_alt_vals_5_values.csv new file mode 100644 index 000000000..9dfd6e72a --- /dev/null +++ b/tests/e2e/testfiles/powerflex_alt_vals_5_values.csv @@ -0,0 +1,6 @@ +parameter name, grep option for paramater value, parameter value,resource to describe,number of occurences of parameter name +sdc-monitor,,,node,1 +Image,,dellemc/sdc:3.6.0.6,node,1 +csi-external-health-monitor-controller,,,controller,1 +X_CSI_HEALTH_MONITOR_ENABLED,,true,controller,1 +X_CSI_HEALTH_MONITOR_ENABLED,,true,node,1 diff --git a/tests/e2e/testfiles/powerscale_alt_vals_1_values.csv b/tests/e2e/testfiles/powerscale_alt_vals_1_values.csv index fc6c7b746..dea9b4d95 100644 --- a/tests/e2e/testfiles/powerscale_alt_vals_1_values.csv +++ b/tests/e2e/testfiles/powerscale_alt_vals_1_values.csv @@ -1,22 +1,22 @@ parameter name, grep option for paramater value, parameter value,resource to describe -Name,,powerscale,controller -Namespace,,dell,controller -F S Group Policy,,File,csm -Auth Secret,,csm-creds,csm -Replicas,,3,csm -Dns Policy,,ClusterFirstWithHostNet,csm -Force Remove Driver,,true,csm -Image Pull Policy,,Always,csm -X_CSI_VERBOSE,,1,controller -X_CSI_ISI_PORT,,8080,controller -X_CSI_ISI_PATH,,/ifs/e2etest,controller -X_CSI_ISI_NO_PROBE_ON_START,,true,controller -X_CSI_ISI_AUTOPROBE,,true,controller -X_CSI_ISI_SKIP_CERTIFICATE_VALIDATION,,true,controller -X_CSI_CUSTOM_TOPOLOGY_ENABLED,,false,controller -X_CSI_ISI_QUOTA_ENABLED,,false,controller -X_CSI_ISI_ACCESS_ZONE,,E2eTestZone,controller -X_CSI_ISI_VOLUME_PATH_PERMISSIONS,,777,controller -X_CSI_HEALTH_MONITOR_ENABLED,,false,controller -Tolerations,-v,none,controller -X_CSI_MAX_VOLUMES_PER_NODE,,20,node +Name,,powerscale,controller,2 +Namespace,,dell,controller,1 +F S Group Policy,,File,csm,1 +Auth Secret,,csm-creds,csm,1 +Replicas,,3,csm,1 +Dns Policy,,ClusterFirstWithHostNet,csm,1 +Force Remove Driver,,true,csm,1 +Image Pull Policy,,Always,csm,1 +X_CSI_VERBOSE,,1,controller,1 +X_CSI_ISI_PORT,,8080,controller,1 +X_CSI_ISI_PATH,,/ifs/e2etest,controller,1 +X_CSI_ISI_NO_PROBE_ON_START,,true,controller,1 +X_CSI_ISI_AUTOPROBE,,true,controller,1 +X_CSI_ISI_SKIP_CERTIFICATE_VALIDATION,,true,controller,1 +X_CSI_CUSTOM_TOPOLOGY_ENABLED,,false,controller,1 +X_CSI_ISI_QUOTA_ENABLED,,false,controller,1 +X_CSI_ISI_ACCESS_ZONE,,E2eTestZone,controller,1 +X_CSI_ISI_VOLUME_PATH_PERMISSIONS,,777,controller,1 +X_CSI_HEALTH_MONITOR_ENABLED,,false,controller,1 +Tolerations,-v,none,controller,1 +X_CSI_MAX_VOLUMES_PER_NODE,,20,node,1 diff --git a/tests/e2e/testfiles/powerscale_alt_vals_2_values.csv b/tests/e2e/testfiles/powerscale_alt_vals_2_values.csv index 1c8d9f566..0c8b7e767 100644 --- a/tests/e2e/testfiles/powerscale_alt_vals_2_values.csv +++ b/tests/e2e/testfiles/powerscale_alt_vals_2_values.csv @@ -1,8 +1,8 @@ parameter name, grep option for paramater value, parameter value,resource to describe -F S Group Policy,,None,csm -Replicas,,1,csm -X_CSI_VERBOSE,,2,controller -X_CSI_ISI_VOLUME_PATH_PERMISSIONS,,757,controller -X_CSI_ISI_SKIP_CERTIFICATE_VALIDATION,,true,controller -Node-Selectors,-v,none,controller -Tolerations,-v,none,controller +F S Group Policy,,None,csm,1 +Replicas,,1,csm,1 +X_CSI_VERBOSE,,2,controller,1 +X_CSI_ISI_VOLUME_PATH_PERMISSIONS,,757,controller,1 +X_CSI_ISI_SKIP_CERTIFICATE_VALIDATION,,true,controller,1 +Node-Selectors,-v,none,controller,1 +Tolerations,-v,none,controller,1 diff --git a/tests/e2e/testfiles/powerscale_alt_vals_3_values.csv b/tests/e2e/testfiles/powerscale_alt_vals_3_values.csv index dbc285ffb..752c7f9fc 100644 --- a/tests/e2e/testfiles/powerscale_alt_vals_3_values.csv +++ b/tests/e2e/testfiles/powerscale_alt_vals_3_values.csv @@ -1,3 +1,4 @@ parameter name, grep option for paramater value, parameter value,resource to describe -Node-Selectors,-v,none,node -Tolerations,-v,none,node +Force Remove Driver,,true,csm,0 +Node-Selectors,-v,none,node,1 +Tolerations,-v,none,node,1 diff --git a/tests/e2e/testfiles/powerscale_health_monitor_values.csv b/tests/e2e/testfiles/powerscale_health_monitor_values.csv index 5905b9d60..8a58bb4c9 100644 --- a/tests/e2e/testfiles/powerscale_health_monitor_values.csv +++ b/tests/e2e/testfiles/powerscale_health_monitor_values.csv @@ -1,4 +1,4 @@ parameter name, grep option for paramater value, parameter value,resource to describe -external-health-monitor,,,controller -X_CSI_HEALTH_MONITOR_ENABLED,,true,controller -X_CSI_HEALTH_MONITOR_ENABLED,,true,node +external-health-monitor,,,controller,6 +X_CSI_HEALTH_MONITOR_ENABLED,,true,controller,1 +X_CSI_HEALTH_MONITOR_ENABLED,,true,node,1 diff --git a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_1.yaml b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_1.yaml new file mode 100644 index 000000000..76bdab824 --- /dev/null +++ b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_1.yaml @@ -0,0 +1,263 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powerflex + namespace: dell +spec: + driver: + csiDriverType: "powerflex" + csiDriverSpec: + # fsGroupPolicy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. + # Allowed values: ReadWriteOnceWithFSType, File , None + # Default value: ReadWriteOnceWithFSType + fSGroupPolicy: "ReadWriteOnceWithFSType" + configVersion: v2.6.0 + replicas: 2 + dnsPolicy: ClusterFirstWithHostNet + forceUpdate: true + forceRemoveDriver: true + common: + image: "dellemc/csi-vxflexos:v2.6.0" + imagePullPolicy: Always + envs: + - name: X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOT + value: "true" + - name: X_CSI_VXFLEXOS_ENABLESNAPSHOTCGDELETE + value: "true" + - name: X_CSI_DEBUG + value: "false" + - name: X_CSI_ALLOW_RWO_MULTI_POD_ACCESS + value: "true" + # Specify kubelet config dir path. + # Ensure that the config.yaml file is present at this path. + # Default value: None + - name: KUBELET_CONFIG_DIR + value: "/var/lib/kubelet" + - name: "CERT_SECRET_COUNT" + value: "1" + + + sideCars: + # sdc-monitor is disabled by default, due to high CPU usage + - name: sdc-monitor + enabled: false + image: dellemc/sdc:3.6.0.6 + envs: + - name: HOST_PID + value: "1" + - name: MDM + value: "10.x.x.x,10.x.x.x" #provide MDM value + + # health monitor is disabled by default, refer to driver documentation before enabling it + # Also set the env variable controller.envs.X_CSI_HEALTH_MONITOR_ENABLED to "true". + - name: csi-external-health-monitor-controller + enabled: false + args: ["--monitor-interval=60s"] + + controller: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition. + # Install the 'external-health-monitor' sidecar accordingly. + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "false" + + #"controller.nodeSelector" defines what nodes would be selected for pods of controller deployment + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # "controller.tolerations" defines tolerations that would be applied to controller deployment + # Leave as blank to install controller on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + - key: "node-role.kubernetes.io/control-plane" + operator: "Exists" + effect: "NoSchedule" + + node: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin - volume usage + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "false" + # X_CSI_APPROVE_SDC_ENABLED: Enables/Disable SDC approval + # Allowed values: + # true: enable SDC approval + # false: disable SDC approval + # Default value: false + - name: X_CSI_APPROVE_SDC_ENABLED + value: "true" + + # X_CSI_RENAME_SDC_ENABLED: Enable/Disable rename of SDC + # Allowed values: + # true: enable renaming + # false: disable renaming + # Default value: false + - name: X_CSI_RENAME_SDC_ENABLED + value: "true" + + # X_CSI_RENAME_SDC_PREFIX: defines a string for prefix of the SDC name. + # "prefix" + "worker_node_hostname" should not exceed 31 chars. + # Default value: none + # Examples: "rhel-sdc", "sdc-test" + - name: X_CSI_RENAME_SDC_PREFIX + value: "sdc" + + # "node.nodeSelector" defines what nodes would be selected for pods of node daemonset + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # "node.tolerations" defines tolerations that would be applied to node daemonset + # Leave as blank to install node driver only on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + - key: "node-role.kubernetes.io/control-plane" + operator: "Exists" + effect: "NoSchedule" + + initContainers: + - image: dellemc/sdc:3.6.0.6 + imagePullPolicy: Always + name: sdc + envs: + - name: MDM + value: "10.x.x.x,10.x.x.x" #provide MDM value + + modules: + # Authorization: enable csm-authorization for RBAC + - name: authorization + # enable: Enable/Disable csm-authorization + enabled: false + configVersion: v1.5.0 + components: + - name: karavi-authorization-proxy + image: dellemc/csm-authorization-sidecar:v1.5.0 + envs: + # proxyHost: hostname of the csm-authorization server + - name: "PROXY_HOST" + value: "" + + # skipCertificateValidation: Enable/Disable certificate validation of the csm-authorization server + - name: "SKIP_CERTIFICATE_VALIDATION" + value: "true" + + # observability: allows to configure observability + - name: observability + # enabled: Enable/Disable observability + enabled: false + configVersion: v1.4.0 + components: + - name: topology + # enabled: Enable/Disable topology + enabled: false + # image: Defines karavi-topology image. This shouldn't be changed + # Allowed values: string + image: dellemc/csm-topology:v1.4.0 + envs: + # topology log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "TOPOLOGY_LOG_LEVEL" + value: "INFO" + + - name: otel-collector + # enabled: Enable/Disable OpenTelemetry Collector + enabled: false + # image: Defines otel-collector image. This shouldn't be changed + # Allowed values: string + image: otel/opentelemetry-collector:0.42.0 + envs: + # image of nginx proxy image + # Allowed values: string + # Default value: "nginxinc/nginx-unprivileged:1.20" + - name: "NGINX_PROXY_IMAGE" + value: "nginxinc/nginx-unprivileged:1.20" + + - name: metrics-powerflex + # enabled: Enable/Disable PowerFlex metrics + enabled: false + # image: Defines PowerFlex metrics image. This shouldn't be changed + image: dellemc/csm-metrics-powerflex:v1.4.0 + envs: + # POWERFLEX_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerFlex + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_MAX_CONCURRENT_QUERIES" + value: "10" + # POWERFLEX_SDC_METRICS_ENABLED: enable/disable collection of sdc metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_SDC_METRICS_ENABLED" + value: "true" + # POWERFLEX_VOLUME_METRICS_ENABLED: enable/disable collection of volume metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_VOLUME_METRICS_ENABLED" + value: "true" + # POWERFLEX_STORAGE_POOL_METRICS_ENABLED: enable/disable collection of storage pool metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_STORAGE_POOL_METRICS_ENABLED" + value: "true" + # POWERFLEX_SDC_IO_POLL_FREQUENCY: set polling frequency to get sdc metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_SDC_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_VOLUME_IO_POLL_FREQUENCY: set polling frequency to get volume metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_VOLUME_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_STORAGE_POOL_POLL_FREQUENCY: set polling frequency to get Quota capacity metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_STORAGE_POOL_POLL_FREQUENCY" + value: "10" + # PowerFlex metrics log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "POWERFLEX_LOG_LEVEL" + value: "INFO" + # PowerFlex Metrics Output logs in the specified format + # Valid values: TEXT, JSON + # Default value: "TEXT" + - name: "POWERFLEX_LOG_FORMAT" + value: "TEXT" + # Otel collector address + # Allowed values: String + # Default value: "otel-collector:55680" + - name: "COLLECTOR_ADDRESS" + value: "otel-collector:55680" diff --git a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_2.yaml b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_2.yaml new file mode 100644 index 000000000..965653706 --- /dev/null +++ b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_2.yaml @@ -0,0 +1,263 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powerflex + namespace: dell +spec: + driver: + csiDriverType: "powerflex" + csiDriverSpec: + # fsGroupPolicy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. + # Allowed values: ReadWriteOnceWithFSType, File , None + # Default value: ReadWriteOnceWithFSType + fSGroupPolicy: "None" + configVersion: v2.5.0 + replicas: 1 + dnsPolicy: ClusterFirstWithHostNet + forceUpdate: false + forceRemoveDriver: false + common: + image: "dellemc/csi-vxflexos:v2.5.0" + imagePullPolicy: IfNotPresent + envs: + - name: X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOT + value: "false" + - name: X_CSI_VXFLEXOS_ENABLESNAPSHOTCGDELETE + value: "false" + - name: X_CSI_DEBUG + value: "true" + - name: X_CSI_ALLOW_RWO_MULTI_POD_ACCESS + value: "false" + # Specify kubelet config dir path. + # Ensure that the config.yaml file is present at this path. + # Default value: None + - name: KUBELET_CONFIG_DIR + value: "/var/lib/kubelet" + - name: "CERT_SECRET_COUNT" + value: "0" + + + sideCars: + # sdc-monitor is disabled by default, due to high CPU usage + - name: sdc-monitor + enabled: false + image: dellemc/sdc:3.6.0.6 + envs: + - name: HOST_PID + value: "1" + - name: MDM + value: "10.x.x.x,10.x.x.x" #provide MDM value + + # health monitor is disabled by default, refer to driver documentation before enabling it + # Also set the env variable controller.envs.X_CSI_HEALTH_MONITOR_ENABLED to "true". + - name: csi-external-health-monitor-controller + enabled: false + args: ["--monitor-interval=60s"] + + controller: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition. + # Install the 'external-health-monitor' sidecar accordingly. + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "false" + + #"controller.nodeSelector" defines what nodes would be selected for pods of controller deployment + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + node-role.kubernetes.io/control-plane: "" + + # "controller.tolerations" defines tolerations that would be applied to controller deployment + # Leave as blank to install controller on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + - key: "node-role.kubernetes.io/control-plane" + operator: "Exists" + effect: "NoSchedule" + + node: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin - volume usage + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "false" + # X_CSI_APPROVE_SDC_ENABLED: Enables/Disable SDC approval + # Allowed values: + # true: enable SDC approval + # false: disable SDC approval + # Default value: false + - name: X_CSI_APPROVE_SDC_ENABLED + value: "false" + + # X_CSI_RENAME_SDC_ENABLED: Enable/Disable rename of SDC + # Allowed values: + # true: enable renaming + # false: disable renaming + # Default value: false + - name: X_CSI_RENAME_SDC_ENABLED + value: "false" + + # X_CSI_RENAME_SDC_PREFIX: defines a string for prefix of the SDC name. + # "prefix" + "worker_node_hostname" should not exceed 31 chars. + # Default value: none + # Examples: "rhel-sdc", "sdc-test" + - name: X_CSI_RENAME_SDC_PREFIX + value: "" + + # "node.nodeSelector" defines what nodes would be selected for pods of node daemonset + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # "node.tolerations" defines tolerations that would be applied to node daemonset + # Leave as blank to install node driver only on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + + initContainers: + - image: dellemc/sdc:3.6.0.6 + imagePullPolicy: IfNotPresent + name: sdc + envs: + - name: MDM + value: "10.x.x.x,10.x.x.x" #provide MDM value + + modules: + # Authorization: enable csm-authorization for RBAC + - name: authorization + # enable: Enable/Disable csm-authorization + enabled: false + configVersion: v1.5.0 + components: + - name: karavi-authorization-proxy + image: dellemc/csm-authorization-sidecar:v1.5.0 + envs: + # proxyHost: hostname of the csm-authorization server + - name: "PROXY_HOST" + value: "" + + # skipCertificateValidation: Enable/Disable certificate validation of the csm-authorization server + - name: "SKIP_CERTIFICATE_VALIDATION" + value: "true" + + # observability: allows to configure observability + - name: observability + # enabled: Enable/Disable observability + enabled: false + configVersion: v1.4.0 + components: + - name: topology + # enabled: Enable/Disable topology + enabled: false + # image: Defines karavi-topology image. This shouldn't be changed + # Allowed values: string + image: dellemc/csm-topology:v1.4.0 + envs: + # topology log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "TOPOLOGY_LOG_LEVEL" + value: "INFO" + + - name: otel-collector + # enabled: Enable/Disable OpenTelemetry Collector + enabled: false + # image: Defines otel-collector image. This shouldn't be changed + # Allowed values: string + image: otel/opentelemetry-collector:0.42.0 + envs: + # image of nginx proxy image + # Allowed values: string + # Default value: "nginxinc/nginx-unprivileged:1.20" + - name: "NGINX_PROXY_IMAGE" + value: "nginxinc/nginx-unprivileged:1.20" + + - name: metrics-powerflex + # enabled: Enable/Disable PowerFlex metrics + enabled: false + # image: Defines PowerFlex metrics image. This shouldn't be changed + image: dellemc/csm-metrics-powerflex:v1.4.0 + envs: + # POWERFLEX_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerFlex + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_MAX_CONCURRENT_QUERIES" + value: "10" + # POWERFLEX_SDC_METRICS_ENABLED: enable/disable collection of sdc metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_SDC_METRICS_ENABLED" + value: "true" + # POWERFLEX_VOLUME_METRICS_ENABLED: enable/disable collection of volume metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_VOLUME_METRICS_ENABLED" + value: "true" + # POWERFLEX_STORAGE_POOL_METRICS_ENABLED: enable/disable collection of storage pool metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_STORAGE_POOL_METRICS_ENABLED" + value: "true" + # POWERFLEX_SDC_IO_POLL_FREQUENCY: set polling frequency to get sdc metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_SDC_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_VOLUME_IO_POLL_FREQUENCY: set polling frequency to get volume metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_VOLUME_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_STORAGE_POOL_POLL_FREQUENCY: set polling frequency to get Quota capacity metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_STORAGE_POOL_POLL_FREQUENCY" + value: "10" + # PowerFlex metrics log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "POWERFLEX_LOG_LEVEL" + value: "INFO" + # PowerFlex Metrics Output logs in the specified format + # Valid values: TEXT, JSON + # Default value: "TEXT" + - name: "POWERFLEX_LOG_FORMAT" + value: "TEXT" + # Otel collector address + # Allowed values: String + # Default value: "otel-collector:55680" + - name: "COLLECTOR_ADDRESS" + value: "otel-collector:55680" diff --git a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_3.yaml b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_3.yaml new file mode 100644 index 000000000..07b037e7b --- /dev/null +++ b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_3.yaml @@ -0,0 +1,264 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powerflex + namespace: dell +spec: + driver: + csiDriverType: "powerflex" + csiDriverSpec: + # fsGroupPolicy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. + # Allowed values: ReadWriteOnceWithFSType, File , None + # Default value: ReadWriteOnceWithFSType + fSGroupPolicy: "File" + configVersion: v2.5.0 + replicas: 1 + dnsPolicy: ClusterFirstWithHostNet + forceUpdate: false + forceRemoveDriver: true + common: + image: "dellemc/csi-vxflexos:v2.5.0" + imagePullPolicy: IfNotPresent + envs: + - name: X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOT + value: "false" + - name: X_CSI_VXFLEXOS_ENABLESNAPSHOTCGDELETE + value: "false" + - name: X_CSI_DEBUG + value: "true" + - name: X_CSI_ALLOW_RWO_MULTI_POD_ACCESS + value: "false" + # Specify kubelet config dir path. + # Ensure that the config.yaml file is present at this path. + # Default value: None + - name: KUBELET_CONFIG_DIR + value: "/var/lib/kubelet" + - name: "CERT_SECRET_COUNT" + value: "0" + + + sideCars: + # sdc-monitor is disabled by default, due to high CPU usage + - name: sdc-monitor + enabled: false + image: dellemc/sdc:3.6.0.6 + envs: + - name: HOST_PID + value: "1" + - name: MDM + value: "10.x.x.x,10.x.x.x" #provide MDM value + + # health monitor is disabled by default, refer to driver documentation before enabling it + # Also set the env variable controller.envs.X_CSI_HEALTH_MONITOR_ENABLED to "true". + - name: csi-external-health-monitor-controller + enabled: false + args: ["--monitor-interval=60s"] + + controller: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition. + # Install the 'external-health-monitor' sidecar accordingly. + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "false" + + #"controller.nodeSelector" defines what nodes would be selected for pods of controller deployment + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # "controller.tolerations" defines tolerations that would be applied to controller deployment + # Leave as blank to install controller on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + + node: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin - volume usage + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "true" + + # X_CSI_APPROVE_SDC_ENABLED: Enables/Disable SDC approval + # Allowed values: + # true: enable SDC approval + # false: disable SDC approval + # Default value: false + - name: X_CSI_APPROVE_SDC_ENABLED + value: "false" + + # X_CSI_RENAME_SDC_ENABLED: Enable/Disable rename of SDC + # Allowed values: + # true: enable renaming + # false: disable renaming + # Default value: false + - name: X_CSI_RENAME_SDC_ENABLED + value: "false" + + # X_CSI_RENAME_SDC_PREFIX: defines a string for prefix of the SDC name. + # "prefix" + "worker_node_hostname" should not exceed 31 chars. + # Default value: none + # Examples: "rhel-sdc", "sdc-test" + - name: X_CSI_RENAME_SDC_PREFIX + value: "" + + # "node.nodeSelector" defines what nodes would be selected for pods of node daemonset + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + node-role.kubernetes.io/control-plane: "" + + # "node.tolerations" defines tolerations that would be applied to node daemonset + # Leave as blank to install node driver only on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + - key: "node-role.kubernetes.io/control-plane" + operator: "Exists" + effect: "NoSchedule" + + initContainers: + - image: dellemc/sdc:3.6.0.6 + imagePullPolicy: IfNotPresent + name: sdc + envs: + - name: MDM + value: "10.x.x.x,10.x.x.x" #provide MDM value + + modules: + # Authorization: enable csm-authorization for RBAC + - name: authorization + # enable: Enable/Disable csm-authorization + enabled: false + configVersion: v1.5.0 + components: + - name: karavi-authorization-proxy + image: dellemc/csm-authorization-sidecar:v1.5.0 + envs: + # proxyHost: hostname of the csm-authorization server + - name: "PROXY_HOST" + value: "" + + # skipCertificateValidation: Enable/Disable certificate validation of the csm-authorization server + - name: "SKIP_CERTIFICATE_VALIDATION" + value: "true" + + # observability: allows to configure observability + - name: observability + # enabled: Enable/Disable observability + enabled: false + configVersion: v1.4.0 + components: + - name: topology + # enabled: Enable/Disable topology + enabled: false + # image: Defines karavi-topology image. This shouldn't be changed + # Allowed values: string + image: dellemc/csm-topology:v1.4.0 + envs: + # topology log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "TOPOLOGY_LOG_LEVEL" + value: "INFO" + + - name: otel-collector + # enabled: Enable/Disable OpenTelemetry Collector + enabled: false + # image: Defines otel-collector image. This shouldn't be changed + # Allowed values: string + image: otel/opentelemetry-collector:0.42.0 + envs: + # image of nginx proxy image + # Allowed values: string + # Default value: "nginxinc/nginx-unprivileged:1.20" + - name: "NGINX_PROXY_IMAGE" + value: "nginxinc/nginx-unprivileged:1.20" + + - name: metrics-powerflex + # enabled: Enable/Disable PowerFlex metrics + enabled: false + # image: Defines PowerFlex metrics image. This shouldn't be changed + image: dellemc/csm-metrics-powerflex:v1.4.0 + envs: + # POWERFLEX_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerFlex + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_MAX_CONCURRENT_QUERIES" + value: "10" + # POWERFLEX_SDC_METRICS_ENABLED: enable/disable collection of sdc metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_SDC_METRICS_ENABLED" + value: "true" + # POWERFLEX_VOLUME_METRICS_ENABLED: enable/disable collection of volume metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_VOLUME_METRICS_ENABLED" + value: "true" + # POWERFLEX_STORAGE_POOL_METRICS_ENABLED: enable/disable collection of storage pool metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_STORAGE_POOL_METRICS_ENABLED" + value: "true" + # POWERFLEX_SDC_IO_POLL_FREQUENCY: set polling frequency to get sdc metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_SDC_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_VOLUME_IO_POLL_FREQUENCY: set polling frequency to get volume metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_VOLUME_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_STORAGE_POOL_POLL_FREQUENCY: set polling frequency to get Quota capacity metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_STORAGE_POOL_POLL_FREQUENCY" + value: "10" + # PowerFlex metrics log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "POWERFLEX_LOG_LEVEL" + value: "INFO" + # PowerFlex Metrics Output logs in the specified format + # Valid values: TEXT, JSON + # Default value: "TEXT" + - name: "POWERFLEX_LOG_FORMAT" + value: "TEXT" + # Otel collector address + # Allowed values: String + # Default value: "otel-collector:55680" + - name: "COLLECTOR_ADDRESS" + value: "otel-collector:55680" diff --git a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_4.yaml b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_4.yaml new file mode 100644 index 000000000..64958b633 --- /dev/null +++ b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_4.yaml @@ -0,0 +1,263 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powerflex + namespace: dell +spec: + driver: + csiDriverType: "powerflex" + csiDriverSpec: + # fsGroupPolicy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. + # Allowed values: ReadWriteOnceWithFSType, File , None + # Default value: ReadWriteOnceWithFSType + fSGroupPolicy: "File" + configVersion: v2.5.0 + replicas: 1 + dnsPolicy: ClusterFirstWithHostNet + forceUpdate: false + forceRemoveDriver: true + common: + image: "dellemc/csi-vxflexos:v2.6.0" + imagePullPolicy: Never + envs: + - name: X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOT + value: "false" + - name: X_CSI_VXFLEXOS_ENABLESNAPSHOTCGDELETE + value: "false" + - name: X_CSI_DEBUG + value: "true" + - name: X_CSI_ALLOW_RWO_MULTI_POD_ACCESS + value: "false" + # Specify kubelet config dir path. + # Ensure that the config.yaml file is present at this path. + # Default value: None + - name: KUBELET_CONFIG_DIR + value: "/var/lib/kubelet" + - name: "CERT_SECRET_COUNT" + value: "0" + + + sideCars: + # sdc-monitor is disabled by default, due to high CPU usage + - name: sdc-monitor + enabled: false + image: dellemc/sdc:3.6.0.6 + envs: + - name: HOST_PID + value: "1" + - name: MDM + value: "10.x.x.x,10.x.x.x" #provide MDM value + + # health monitor is disabled by default, refer to driver documentation before enabling it + # Also set the env variable controller.envs.X_CSI_HEALTH_MONITOR_ENABLED to "true". + - name: csi-external-health-monitor-controller + enabled: false + args: ["--monitor-interval=60s"] + + controller: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition. + # Install the 'external-health-monitor' sidecar accordingly. + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "false" + + #"controller.nodeSelector" defines what nodes would be selected for pods of controller deployment + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # "controller.tolerations" defines tolerations that would be applied to controller deployment + # Leave as blank to install controller on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + + node: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin - volume usage + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "false" + # X_CSI_APPROVE_SDC_ENABLED: Enables/Disable SDC approval + # Allowed values: + # true: enable SDC approval + # false: disable SDC approval + # Default value: false + - name: X_CSI_APPROVE_SDC_ENABLED + value: "false" + + # X_CSI_RENAME_SDC_ENABLED: Enable/Disable rename of SDC + # Allowed values: + # true: enable renaming + # false: disable renaming + # Default value: false + - name: X_CSI_RENAME_SDC_ENABLED + value: "false" + + # X_CSI_RENAME_SDC_PREFIX: defines a string for prefix of the SDC name. + # "prefix" + "worker_node_hostname" should not exceed 31 chars. + # Default value: none + # Examples: "rhel-sdc", "sdc-test" + - name: X_CSI_RENAME_SDC_PREFIX + value: "" + + # "node.nodeSelector" defines what nodes would be selected for pods of node daemonset + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # "node.tolerations" defines tolerations that would be applied to node daemonset + # Leave as blank to install node driver only on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + + initContainers: + - image: dellemc/sdc:3.6.0.6 + imagePullPolicy: Never + name: sdc + envs: + - name: MDM + value: "10.x.x.x,10.x.x.x" #provide MDM value + + modules: + # Authorization: enable csm-authorization for RBAC + - name: authorization + # enable: Enable/Disable csm-authorization + enabled: false + configVersion: v1.5.0 + components: + - name: karavi-authorization-proxy + image: dellemc/csm-authorization-sidecar:v1.5.0 + envs: + # proxyHost: hostname of the csm-authorization server + - name: "PROXY_HOST" + value: "" + + # skipCertificateValidation: Enable/Disable certificate validation of the csm-authorization server + - name: "SKIP_CERTIFICATE_VALIDATION" + value: "true" + + # observability: allows to configure observability + - name: observability + # enabled: Enable/Disable observability + enabled: false + configVersion: v1.4.0 + components: + - name: topology + # enabled: Enable/Disable topology + enabled: false + # image: Defines karavi-topology image. This shouldn't be changed + # Allowed values: string + image: dellemc/csm-topology:v1.4.0 + envs: + # topology log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "TOPOLOGY_LOG_LEVEL" + value: "INFO" + + - name: otel-collector + # enabled: Enable/Disable OpenTelemetry Collector + enabled: false + # image: Defines otel-collector image. This shouldn't be changed + # Allowed values: string + image: otel/opentelemetry-collector:0.42.0 + envs: + # image of nginx proxy image + # Allowed values: string + # Default value: "nginxinc/nginx-unprivileged:1.20" + - name: "NGINX_PROXY_IMAGE" + value: "nginxinc/nginx-unprivileged:1.20" + + - name: metrics-powerflex + # enabled: Enable/Disable PowerFlex metrics + enabled: false + # image: Defines PowerFlex metrics image. This shouldn't be changed + image: dellemc/csm-metrics-powerflex:v1.4.0 + envs: + # POWERFLEX_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerFlex + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_MAX_CONCURRENT_QUERIES" + value: "10" + # POWERFLEX_SDC_METRICS_ENABLED: enable/disable collection of sdc metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_SDC_METRICS_ENABLED" + value: "true" + # POWERFLEX_VOLUME_METRICS_ENABLED: enable/disable collection of volume metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_VOLUME_METRICS_ENABLED" + value: "true" + # POWERFLEX_STORAGE_POOL_METRICS_ENABLED: enable/disable collection of storage pool metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_STORAGE_POOL_METRICS_ENABLED" + value: "true" + # POWERFLEX_SDC_IO_POLL_FREQUENCY: set polling frequency to get sdc metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_SDC_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_VOLUME_IO_POLL_FREQUENCY: set polling frequency to get volume metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_VOLUME_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_STORAGE_POOL_POLL_FREQUENCY: set polling frequency to get Quota capacity metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_STORAGE_POOL_POLL_FREQUENCY" + value: "10" + # PowerFlex metrics log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "POWERFLEX_LOG_LEVEL" + value: "INFO" + # PowerFlex Metrics Output logs in the specified format + # Valid values: TEXT, JSON + # Default value: "TEXT" + - name: "POWERFLEX_LOG_FORMAT" + value: "TEXT" + # Otel collector address + # Allowed values: String + # Default value: "otel-collector:55680" + - name: "COLLECTOR_ADDRESS" + value: "otel-collector:55680" diff --git a/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_5.yaml b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_5.yaml new file mode 100644 index 000000000..9ad39782e --- /dev/null +++ b/tests/e2e/testfiles/storage_csm_powerflex_alt_vals_5.yaml @@ -0,0 +1,263 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powerflex + namespace: dell +spec: + driver: + csiDriverType: "powerflex" + csiDriverSpec: + # fsGroupPolicy: Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. + # Allowed values: ReadWriteOnceWithFSType, File , None + # Default value: ReadWriteOnceWithFSType + fSGroupPolicy: "File" + configVersion: v2.5.0 + replicas: 1 + dnsPolicy: ClusterFirstWithHostNet + forceUpdate: false + forceRemoveDriver: true + common: + image: "dellemc/csi-vxflexos:v2.6.0" + imagePullPolicy: IfNotPresent + envs: + - name: X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOT + value: "false" + - name: X_CSI_VXFLEXOS_ENABLESNAPSHOTCGDELETE + value: "false" + - name: X_CSI_DEBUG + value: "true" + - name: X_CSI_ALLOW_RWO_MULTI_POD_ACCESS + value: "false" + # Specify kubelet config dir path. + # Ensure that the config.yaml file is present at this path. + # Default value: None + - name: KUBELET_CONFIG_DIR + value: "/var/lib/kubelet" + - name: "CERT_SECRET_COUNT" + value: "0" + + + sideCars: + # sdc-monitor is disabled by default, due to high CPU usage + - name: sdc-monitor + enabled: true + image: dellemc/sdc:3.6.0.6 + envs: + - name: HOST_PID + value: "1" + - name: MDM + value: "10.xx.xx.xx,10.xx.xx.xx" #provide MDM value + + # health monitor is disabled by default, refer to driver documentation before enabling it + # Also set the env variable controller.envs.X_CSI_HEALTH_MONITOR_ENABLED to "true". + - name: csi-external-health-monitor-controller + enabled: true + args: ["--monitor-interval=60s"] + + controller: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from Controller plugin - volume condition. + # Install the 'external-health-monitor' sidecar accordingly. + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "true" + + #"controller.nodeSelector" defines what nodes would be selected for pods of controller deployment + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # "controller.tolerations" defines tolerations that would be applied to controller deployment + # Leave as blank to install controller on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + + node: + envs: + # X_CSI_HEALTH_MONITOR_ENABLED: Enable/Disable health monitor of CSI volumes from node plugin - volume usage + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "true" + # X_CSI_APPROVE_SDC_ENABLED: Enables/Disable SDC approval + # Allowed values: + # true: enable SDC approval + # false: disable SDC approval + # Default value: false + - name: X_CSI_APPROVE_SDC_ENABLED + value: "false" + + # X_CSI_RENAME_SDC_ENABLED: Enable/Disable rename of SDC + # Allowed values: + # true: enable renaming + # false: disable renaming + # Default value: false + - name: X_CSI_RENAME_SDC_ENABLED + value: "false" + + # X_CSI_RENAME_SDC_PREFIX: defines a string for prefix of the SDC name. + # "prefix" + "worker_node_hostname" should not exceed 31 chars. + # Default value: none + # Examples: "rhel-sdc", "sdc-test" + - name: X_CSI_RENAME_SDC_PREFIX + value: "" + + # "node.nodeSelector" defines what nodes would be selected for pods of node daemonset + # Leave as blank to use all nodes + # Allowed values: map of key-value pairs + # Default value: None + # Examples: + # node-role.kubernetes.io/control-plane: "" + nodeSelector: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # node-role.kubernetes.io/master: "" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # node-role.kubernetes.io/control-plane: "" + + # "node.tolerations" defines tolerations that would be applied to node daemonset + # Leave as blank to install node driver only on worker nodes + # Default value: None + tolerations: + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/master taint + # - key: "node-role.kubernetes.io/master" + # operator: "Exists" + # effect: "NoSchedule" + # Uncomment if nodes you wish to use have the node-role.kubernetes.io/control-plane taint + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + + initContainers: + - image: dellemc/sdc:3.6.0.6 + imagePullPolicy: IfNotPresent + name: sdc + envs: + - name: MDM + value: "10.x.x.x,10.x.x.x" #provide MDM value + + modules: + # Authorization: enable csm-authorization for RBAC + - name: authorization + # enable: Enable/Disable csm-authorization + enabled: false + configVersion: v1.5.0 + components: + - name: karavi-authorization-proxy + image: dellemc/csm-authorization-sidecar:v1.5.0 + envs: + # proxyHost: hostname of the csm-authorization server + - name: "PROXY_HOST" + value: "" + + # skipCertificateValidation: Enable/Disable certificate validation of the csm-authorization server + - name: "SKIP_CERTIFICATE_VALIDATION" + value: "true" + + # observability: allows to configure observability + - name: observability + # enabled: Enable/Disable observability + enabled: false + configVersion: v1.4.0 + components: + - name: topology + # enabled: Enable/Disable topology + enabled: false + # image: Defines karavi-topology image. This shouldn't be changed + # Allowed values: string + image: dellemc/csm-topology:v1.4.0 + envs: + # topology log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "TOPOLOGY_LOG_LEVEL" + value: "INFO" + + - name: otel-collector + # enabled: Enable/Disable OpenTelemetry Collector + enabled: false + # image: Defines otel-collector image. This shouldn't be changed + # Allowed values: string + image: otel/opentelemetry-collector:0.42.0 + envs: + # image of nginx proxy image + # Allowed values: string + # Default value: "nginxinc/nginx-unprivileged:1.20" + - name: "NGINX_PROXY_IMAGE" + value: "nginxinc/nginx-unprivileged:1.20" + + - name: metrics-powerflex + # enabled: Enable/Disable PowerFlex metrics + enabled: false + # image: Defines PowerFlex metrics image. This shouldn't be changed + image: dellemc/csm-metrics-powerflex:v1.4.0 + envs: + # POWERFLEX_MAX_CONCURRENT_QUERIES: set the default max concurrent queries to PowerFlex + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_MAX_CONCURRENT_QUERIES" + value: "10" + # POWERFLEX_SDC_METRICS_ENABLED: enable/disable collection of sdc metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_SDC_METRICS_ENABLED" + value: "true" + # POWERFLEX_VOLUME_METRICS_ENABLED: enable/disable collection of volume metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_VOLUME_METRICS_ENABLED" + value: "true" + # POWERFLEX_STORAGE_POOL_METRICS_ENABLED: enable/disable collection of storage pool metrics + # Allowed values: ture, false + # Default value: true + - name: "POWERFLEX_STORAGE_POOL_METRICS_ENABLED" + value: "true" + # POWERFLEX_SDC_IO_POLL_FREQUENCY: set polling frequency to get sdc metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_SDC_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_VOLUME_IO_POLL_FREQUENCY: set polling frequency to get volume metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_VOLUME_IO_POLL_FREQUENCY" + value: "10" + # POWERFLEX_STORAGE_POOL_POLL_FREQUENCY: set polling frequency to get Quota capacity metrics data + # Allowed values: int + # Default value: 10 + - name: "POWERFLEX_STORAGE_POOL_POLL_FREQUENCY" + value: "10" + # PowerFlex metrics log level + # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC + # Default value: "INFO" + - name: "POWERFLEX_LOG_LEVEL" + value: "INFO" + # PowerFlex Metrics Output logs in the specified format + # Valid values: TEXT, JSON + # Default value: "TEXT" + - name: "POWERFLEX_LOG_FORMAT" + value: "TEXT" + # Otel collector address + # Allowed values: String + # Default value: "otel-collector:55680" + - name: "COLLECTOR_ADDRESS" + value: "otel-collector:55680" diff --git a/tests/e2e/testfiles/values.yaml b/tests/e2e/testfiles/values.yaml index ddb9c079a..2afbb6134 100644 --- a/tests/e2e/testfiles/values.yaml +++ b/tests/e2e/testfiles/values.yaml @@ -478,6 +478,123 @@ run: - ./cert-csi test vio --sc op-e2e-vxflexos --chainNumber 2 --chainLength 2 +- scenario: "Install PowerFlex Driver with first set of alternate values" + paths: + - "testfiles/storage_csm_powerflex_alt_vals_1.yaml" + modules: + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-vxflexos] and template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + - "Set up secret with template [testfiles/powerflex-templates/powerflex-secret-template.yaml] name [powerflex-config] in namespace [dell] for [pflex]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powerflex] driver from CR [1] is installed" + - "Run custom test" + # Last two steps perform Clean Up + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powerflex-templates/powerflex-secret-template.yaml] for [pflex]" + - "Restore template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + customTest: + name: Cert CSI and check_parameters.sh + run: + - ./cert-csi test vio --sc op-e2e-vxflexos --chainNumber 2 --chainLength 2 + - /bin/bash check_parameters.sh testfiles/powerflex_alt_vals_1_values.csv dell powerflex + +- scenario: "Install PowerFlex Driver with second set of alternate values" + paths: + - "testfiles/storage_csm_powerflex_alt_vals_2.yaml" + modules: + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-vxflexos] and template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + - "Set up secret with template [testfiles/powerflex-templates/powerflex-secret-template.yaml] name [powerflex-config] in namespace [dell] for [pflex]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powerflex] driver from CR [1] is installed" + - "Run custom test" + # Last two steps perform Clean Up + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powerflex-templates/powerflex-secret-template.yaml] for [pflex]" + - "Restore template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + customTest: + name: Cert CSI and check_parameters.sh + run: + - ./cert-csi test vio --sc op-e2e-vxflexos --chainNumber 2 --chainLength 2 + - /bin/bash check_parameters.sh testfiles/powerflex_alt_vals_2_values.csv dell powerflex + +- scenario: "Install PowerFlex Driver with third set of alternate values" + paths: + - "testfiles/storage_csm_powerflex_alt_vals_3.yaml" + modules: + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Set [control-plane] node label" + - "Create storageclass with name [op-e2e-vxflexos] and template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + - "Set up secret with template [testfiles/powerflex-templates/powerflex-secret-template.yaml] name [powerflex-config] in namespace [dell] for [pflex]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powerflex] driver from CR [1] is installed" + - "Run custom test" + # Last two steps perform Clean Up + - "Remove [control-plane] node label" + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powerflex-templates/powerflex-secret-template.yaml] for [pflex]" + - "Restore template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + customTest: + name: Cert CSI and check_parameters.sh + run: + - ./cert-csi test vio --sc op-e2e-vxflexos --chainNumber 2 --chainLength 2 + - /bin/bash check_parameters.sh testfiles/powerflex_alt_vals_3_values.csv dell powerflex + +- scenario: "Install PowerFlex Driver with fourth set of alternate values" + paths: + - "testfiles/storage_csm_powerflex_alt_vals_4.yaml" + modules: + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-vxflexos] and template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + - "Set up secret with template [testfiles/powerflex-templates/powerflex-secret-template.yaml] name [powerflex-config] in namespace [dell] for [pflex]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powerflex] driver from CR [1] is installed" + - "Run custom test" + # Last two steps perform Clean Up + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powerflex-templates/powerflex-secret-template.yaml] for [pflex]" + - "Restore template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + customTest: + name: Cert CSI and check_parameters.sh + run: + - ./cert-csi test vio --sc op-e2e-vxflexos --chainNumber 2 --chainLength 2 + - /bin/bash check_parameters.sh testfiles/powerflex_alt_vals_4_values.csv dell powerflex + +- scenario: "Install PowerFlex Driver with fifth set of alternate values" + paths: + - "testfiles/storage_csm_powerflex_alt_vals_5.yaml" + modules: + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-vxflexos] and template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + - "Set up secret with template [testfiles/powerflex-templates/powerflex-secret-template.yaml] name [powerflex-config] in namespace [dell] for [pflex]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powerflex] driver from CR [1] is installed" + - "Run custom test" + # Last two steps perform Clean Up + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powerflex-templates/powerflex-secret-template.yaml] for [pflex]" + - "Restore template [testfiles/powerflex-templates/powerflex-storageclass-template.yaml] for [pflex]" + customTest: + name: Cert CSI and check_parameters.sh + run: + - ./cert-csi test vio --sc op-e2e-vxflexos --chainNumber 2 --chainLength 2 + - /bin/bash check_parameters.sh testfiles/powerflex_alt_vals_5_values.csv dell powerflex + - scenario: "Uninstall PowerFlex Driver" paths: - "testfiles/storage_csm_powerflex.yaml" From e76c52d555968d3e49d66653b864eacf69da9258 Mon Sep 17 00:00:00 2001 From: JacobGros Date: Fri, 19 May 2023 15:33:55 -0400 Subject: [PATCH 4/4] fix test compile error (#249) --- tests/e2e/steps/step_common.go | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/e2e/steps/step_common.go b/tests/e2e/steps/step_common.go index 845e024e8..0fafff009 100644 --- a/tests/e2e/steps/step_common.go +++ b/tests/e2e/steps/step_common.go @@ -13,7 +13,6 @@ package steps import ( - "bytes" "context" "fmt" "os/exec"