From 8dbc19ea547d4b5f37c58b0bc6b372752bc066eb Mon Sep 17 00:00:00 2001 From: Surya Gupta <109594002+suryagupta4@users.noreply.github.com> Date: Fri, 18 Oct 2024 15:16:57 +0530 Subject: [PATCH] E2E for CSI-PowerMax driver with minimal CR (#749) * feature/pmax-minimal-sample-e2e * indentation fix * yamllint fixes * quay.io updates and some cleanup * yamllint fixes * add replica count * add csipowermax-reverseproxy * yamllint fixes * added replication scenarios for powermax --------- Co-authored-by: Harish P --- .../minimal-testfiles/scenarios.yaml | 200 ++++++++++++++++++ .../storage_csm_powermax.yaml | 69 ++++++ .../storage_csm_powermax_authorization.yaml | 38 ++++ .../storage_csm_powermax_observability.yaml | 41 ++++ .../storage_csm_powermax_replica.yaml | 26 +++ .../storage_csm_powermax_resiliency.yaml | 35 +++ ...m_powermax_reverseproxy_authorization.yaml | 38 ++++ 7 files changed, 447 insertions(+) create mode 100644 tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax.yaml create mode 100644 tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_authorization.yaml create mode 100644 tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_observability.yaml create mode 100644 tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_replica.yaml create mode 100644 tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_resiliency.yaml create mode 100644 tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_reverseproxy_authorization.yaml diff --git a/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml b/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml index 309e6b626..339be68e1 100644 --- a/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml +++ b/tests/e2e/testfiles/minimal-testfiles/scenarios.yaml @@ -604,3 +604,203 @@ name: HelloWorld run: - echo "no current test implemented for replication" + +- scenario: "Install PowerMax Driver(Standalone)" + paths: + - "testfiles/minimal-testfiles/storage_csm_powermax.yaml" + tags: + - "powermax" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Set up creds with template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + - "Set up configMap with template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] name [powermax-reverseproxy-config] in namespace [powermax] for [pmaxAuthSidecar]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powermax] driver from CR [1] is installed" + - "Run custom test" + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] for [pmaxAuthSidecar]" + - "Restore template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Restore template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + customTest: + name: Cert CSI + run: + - cert-csi test vio --sc op-e2e-pmax --chainLength 1 --chainNumber 1 + +- scenario: "Install PowerMax Driver(With Observability)" + paths: + - "testfiles/minimal-testfiles/storage_csm_powermax_observability.yaml" + tags: + - "powermax" + - "observability" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Set up creds with template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + - "Set up configMap with template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] name [powermax-reverseproxy-config] in namespace [powermax] for [pmaxAuthSidecar]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powermax] driver from CR [1] is installed" + - "Validate [observability] module from CR [1] is installed" + # cleanup + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] for [pmaxAuthSidecar]" + - "Restore template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Restore template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + +- scenario: "Install PowerMax Driver (With Auth V1 module)" + paths: + - "testfiles/authorization-templates/storage_csm_authorization_v1_proxy_server.yaml" + - "testfiles/minimal-testfiles/storage_csm_powermax_reverseproxy_authorization.yaml" + tags: + - "authorizationproxyserver" + - "authorization" + - "powermax" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create [authorization-proxy-server] prerequisites from CR [1]" + - "Apply custom resource [1]" + - "Validate [authorization-proxy-server] module from CR [1] is installed" + - "Configure authorization-proxy-server for [powermax] for CR [1]" + - "Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Set up secret with template [testfiles/powermax-templates/csm-authorization-config.json] name [karavi-authorization-config] in namespace [powermax] for [pmaxAuthSidecar]" + - "Set up creds with template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + - "Set up configMap with template [testfiles/powermax-templates/powermax_reverse_proxy_config_auth.yaml] name [powermax-reverseproxy-config] in namespace [powermax] for [pmaxReverseProxy]" + - "Apply custom resource [2]" + - "Validate custom resource [2]" + - "Validate [powermax] driver from CR [2] is installed" + - "Validate [authorization] module from CR [2] is installed" + - "Run custom test" + # cleanup + - "Enable forceRemoveDriver on CR [2]" + - "Delete custom resource [2]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powermax-templates/csm-authorization-config.json] for [pmaxAuthSidecar]" + - "Restore template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + - "Restore template [testfiles/powermax-templates/powermax_reverse_proxy_config_auth.yaml] for [pmaxReverseProxy]" + customTest: + name: Cert CSI + run: + - cert-csi test vio --sc op-e2e-pmax --chainLength 1 --chainNumber 1 + +- scenario: "Install Powermax Driver (With Authorization v2)" + paths: + - "testfiles/authorization-templates/storage_csm_authorization_v2_proxy_server.yaml" + - "testfiles/authorization-templates/storage_csm_authorization_v2_crds.yaml" + - "testfiles/minimal-testfiles/storage_csm_powermax_authorization.yaml" + tags: + - "authorizationproxyserver" + - "authorization" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Install Authorization CRDs [2]" + - "Create [authorization-proxy-server] prerequisites from CR [1]" + - "Apply custom resource [1]" + - "Validate [authorization-proxy-server] module from CR [1] is installed" + - "Configure authorization-proxy-server for [powermax] for CR [1]" + - "Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Set up secret with template [testfiles/powermax-templates/csm-authorization-config.json] name [karavi-authorization-config] in namespace [powermax] for [pmaxAuthSidecar]" + - "Set up creds with template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + - "Set up creds with template [testfiles/powermax-templates/powermax-array-config.yaml] for [pmaxArrayConfig]" + - "Set up configMap with template [testfiles/powermax-templates/powermax_reverse_proxy_config_auth.yaml] name [powermax-reverseproxy-config] in namespace [powermax] for [pmaxReverseProxy]" + - "Apply custom resource [3]" + - "Validate custom resource [3]" + - "Validate [powermax] driver from CR [3] is installed" + - "Validate [authorization] module from CR [3] is installed" + - "Run custom test" + # cleanup + - "Enable forceRemoveDriver on CR [3]" + - "Delete custom resource [3]" + - "Delete Authorization CRs for [powermax]" + - "Delete custom resource [1]" + - "Delete Authorization CRDs [2]" + - "Restore template [testfiles/powermax-templates/csm-authorization-config.json] for [pmaxAuthSidecar]" + - "Restore template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + - "Restore template [testfiles/powermax-templates/powermax_reverse_proxy_config_auth.yaml] for [pmaxReverseProxy]" + - "Restore template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Restore template [testfiles/powermax-templates/powermax-array-config.yaml] for [pmaxArrayConfig]" + customTest: + name: Cert CSI + run: + - cert-csi test vio --sc op-e2e-pmax --chainLength 1 --chainNumber 1 + + +- scenario: "Install Powermax Driver(Standalone), Enable Resiliency" + paths: + - "testfiles/minimal-testfiles/storage_csm_powermax.yaml" + tags: + - "powermax" + - "resiliency" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Set up creds with template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + - "Set up configMap with template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] name [powermax-reverseproxy-config] in namespace [powermax] for [pmaxAuthSidecar]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powermax] driver from CR [1] is installed" + - "Validate [resiliency] module from CR [1] is not installed" + - "Enable [resiliency] module from CR [1]" + - "Validate [powermax] driver from CR [1] is installed" + - "Validate [resiliency] module from CR [1] is installed" + # cleanup + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] for [pmaxAuthSidecar]" + - "Restore template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Restore template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + +- scenario: "Install Powermax Driver(With Resiliency), Disable Resiliency module" + paths: + - "testfiles/minimal-testfiles/storage_csm_powermax_resiliency.yaml" + tags: + - "powermax" + - "resiliency" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Set up creds with template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + - "Set up configMap with template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] name [powermax-reverseproxy-config] in namespace [powermax] for [pmaxAuthSidecar]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powermax] driver from CR [1] is installed" + - "Validate [resiliency] module from CR [1] is installed" + - "Disable [resiliency] module from CR [1]" + - "Validate [powermax] driver from CR [1] is installed" + - "Validate [resiliency] module from CR [1] is not installed" + # cleanup + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] for [pmaxAuthSidecar]" + - "Restore template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Restore template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + +- scenario: "Install Powermax Driver(With Replication)" + paths: + - "testfiles/minimal-testfiles/storage_csm_powermax_replica.yaml" + tags: + - "powermax" + - "replication" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Create storageclass with name [op-e2e-pmax] and template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Set up creds with template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + - "Set up configMap with template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] name [powermax-reverseproxy-config] in namespace [powermax] for [pmaxAuthSidecar]" + - "Apply custom resource [1]" + - "Validate custom resource [1]" + - "Validate [powermax] driver from CR [1] is installed" + - "Validate [replication] module from CR [1] is installed" + - "Run custom test" + # cleanup + - "Enable forceRemoveDriver on CR [1]" + - "Delete custom resource [1]" + - "Restore template [testfiles/powermax-templates/powermax_reverse_proxy_config.yaml] for [pmaxAuthSidecar]" + - "Restore template [testfiles/powermax-templates/powermax-storageclass-template.yaml] for [pmax]" + - "Restore template [testfiles/powermax-templates/powermax-secret-template.yaml] for [pmaxCreds]" + customTest: + name: HelloWorld + run: + - echo "no current test implemented for replication" diff --git a/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax.yaml b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax.yaml new file mode 100644 index 000000000..a739d9b35 --- /dev/null +++ b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax.yaml @@ -0,0 +1,69 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powermax + namespace: powermax +spec: + driver: + csiDriverType: "powermax" + configVersion: v2.12.0 + replicas: 1 + common: + image: "quay.io/dell/container-storage-modules/csi-powermax:nightly" + forceRemoveDriver: true + modules: + - name: authorization + enabled: false + configVersion: v1.11.0 + components: + - name: karavi-authorization-proxy + image: quay.io/dell/container-storage-modules/csm-authorization-sidecar:nightly + envs: + - name: "PROXY_HOST" + value: "authorization-ingress-nginx-controller.authorization.svc.cluster.local" + - name: "SKIP_CERTIFICATE_VALIDATION" + value: "true" + - name: resiliency + enabled: false + components: + - name: podmon-controller + image: quay.io/dell/container-storage-modules/podmon:nightly + - name: podmon-node + image: quay.io/dell/container-storage-modules/podmon:nightly + - name: replication + enabled: false + components: + - name: dell-csi-replicator + image: quay.io/dell/container-storage-modules/dell-csi-replicator:nightly + - name: dell-replication-controller-manager + image: quay.io/dell/container-storage-modules/dell-replication-controller:nightly + - name: dell-replication-controller-init + image: dellemc/dell-replication-init:v1.0.0 + - name: observability + enabled: false + components: + - name: topology + enabled: true + image: quay.io/dell/container-storage-modules/csm-topology:nightly + - name: otel-collector + enabled: true + image: otel/opentelemetry-collector:0.42.0 + - name: cert-manager + enabled: false + - name: metrics-powermax + enabled: true + image: quay.io/dell/container-storage-modules/csm-metrics-powermax:nightly + - name: csireverseproxy + enabled: true + forceRemoveModule: true + configVersion: v2.11.0 + components: + - name: csipowermax-reverseproxy + image: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:nightly + envs: + - name: X_CSI_REVPROXY_TLS_SECRET + value: "csirevproxy-tls-secret" + - name: X_CSI_REVPROXY_PORT + value: "2222" + - name: X_CSI_CONFIG_MAP_NAME + value: "powermax-reverseproxy-config" diff --git a/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_authorization.yaml b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_authorization.yaml new file mode 100644 index 000000000..3193ff652 --- /dev/null +++ b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_authorization.yaml @@ -0,0 +1,38 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powermax + namespace: powermax +spec: + driver: + csiDriverType: "powermax" + configVersion: v2.12.0 + common: + image: "quay.io/dell/container-storage-modules/csi-powermax:nightly" + forceRemoveDriver: true + modules: + - name: authorization + enabled: true + configVersion: v1.11.0 + components: + - name: karavi-authorization-proxy + image: quay.io/dell/container-storage-modules/csm-authorization-sidecar:nightly + envs: + - name: "PROXY_HOST" + value: "authorization-ingress-nginx-controller.authorization.svc.cluster.local" + - name: "SKIP_CERTIFICATE_VALIDATION" + value: "true" + - name: csireverseproxy + enabled: true + forceRemoveModule: true + configVersion: v2.11.0 + components: + - name: csipowermax-reverseproxy + image: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:nightly + envs: + - name: X_CSI_REVPROXY_TLS_SECRET + value: "csirevproxy-tls-secret" + - name: X_CSI_REVPROXY_PORT + value: "2222" + - name: X_CSI_CONFIG_MAP_NAME + value: "powermax-reverseproxy-config" diff --git a/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_observability.yaml b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_observability.yaml new file mode 100644 index 000000000..1558e05fc --- /dev/null +++ b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_observability.yaml @@ -0,0 +1,41 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powermax + namespace: powermax +spec: + driver: + csiDriverType: "powermax" + configVersion: v2.12.0 + common: + image: "quay.io/dell/container-storage-modules/csi-powermax:nightly" + forceRemoveDriver: true + modules: + - name: observability + enabled: true + components: + - name: topology + enabled: true + image: quay.io/dell/container-storage-modules/csm-topology:nightly + - name: otel-collector + enabled: true + image: otel/opentelemetry-collector:0.42.0 + - name: cert-manager + enabled: false + - name: metrics-powermax + enabled: true + image: quay.io/dell/container-storage-modules/csm-metrics-powermax:nightly + - name: csireverseproxy + enabled: true + forceRemoveModule: true + configVersion: v2.11.0 + components: + - name: csipowermax-reverseproxy + image: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:nightly + envs: + - name: X_CSI_REVPROXY_TLS_SECRET + value: "csirevproxy-tls-secret" + - name: X_CSI_REVPROXY_PORT + value: "2222" + - name: X_CSI_CONFIG_MAP_NAME + value: "powermax-reverseproxy-config" diff --git a/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_replica.yaml b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_replica.yaml new file mode 100644 index 000000000..9e2776fb1 --- /dev/null +++ b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_replica.yaml @@ -0,0 +1,26 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powermax + namespace: powermax +spec: + driver: + csiDriverType: "powermax" + configVersion: v2.12.0 +# common: +# image: "quay.io/dell/container-storage-modules/csi-powermax:nightly" + forceRemoveDriver: true + modules: + - name: replication + enabled: true +# configVersion: v1.10.0 +# components: +# - name: dell-csi-replicator +# image: quay.io/dell/container-storage-modules/dell-csi-replicator:nightly +# - name: dell-replication-controller-manager +# image: quay.io/dell/container-storage-modules/dell-replication-controller:nightly +# envs: +# - name: "TARGET_CLUSTERS_IDS" +# value: "self" +# - name: dell-replication-controller-init +# image: dellemc/dell-replication-init:v1.0.0 diff --git a/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_resiliency.yaml b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_resiliency.yaml new file mode 100644 index 000000000..da48156c6 --- /dev/null +++ b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_resiliency.yaml @@ -0,0 +1,35 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powermax + namespace: powermax +spec: + driver: + csiDriverType: "powermax" + configVersion: v2.12.0 + replicas: 1 + common: + image: "quay.io/dell/container-storage-modules/csi-powermax:nightly" + forceRemoveDriver: true + modules: + - name: resiliency + enabled: true + components: + - name: podmon-controller + image: quay.io/dell/container-storage-modules/podmon:nightly + - name: podmon-node + image: quay.io/dell/container-storage-modules/podmon:nightly + - name: csireverseproxy + enabled: true + forceRemoveModule: true + configVersion: v2.11.0 + components: + - name: csipowermax-reverseproxy + image: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:nightly + envs: + - name: X_CSI_REVPROXY_TLS_SECRET + value: "csirevproxy-tls-secret" + - name: X_CSI_REVPROXY_PORT + value: "2222" + - name: X_CSI_CONFIG_MAP_NAME + value: "powermax-reverseproxy-config" diff --git a/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_reverseproxy_authorization.yaml b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_reverseproxy_authorization.yaml new file mode 100644 index 000000000..3193ff652 --- /dev/null +++ b/tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax_reverseproxy_authorization.yaml @@ -0,0 +1,38 @@ +apiVersion: storage.dell.com/v1 +kind: ContainerStorageModule +metadata: + name: powermax + namespace: powermax +spec: + driver: + csiDriverType: "powermax" + configVersion: v2.12.0 + common: + image: "quay.io/dell/container-storage-modules/csi-powermax:nightly" + forceRemoveDriver: true + modules: + - name: authorization + enabled: true + configVersion: v1.11.0 + components: + - name: karavi-authorization-proxy + image: quay.io/dell/container-storage-modules/csm-authorization-sidecar:nightly + envs: + - name: "PROXY_HOST" + value: "authorization-ingress-nginx-controller.authorization.svc.cluster.local" + - name: "SKIP_CERTIFICATE_VALIDATION" + value: "true" + - name: csireverseproxy + enabled: true + forceRemoveModule: true + configVersion: v2.11.0 + components: + - name: csipowermax-reverseproxy + image: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:nightly + envs: + - name: X_CSI_REVPROXY_TLS_SECRET + value: "csirevproxy-tls-secret" + - name: X_CSI_REVPROXY_PORT + value: "2222" + - name: X_CSI_CONFIG_MAP_NAME + value: "powermax-reverseproxy-config"