Skip to content

Commit

Permalink
E2E for CSI-PowerMax driver with minimal CR (#749)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
2 people authored and ChristianAtDell committed Oct 22, 2024
1 parent 530ed1c commit 8dbc19e
Show file tree
Hide file tree
Showing 7 changed files with 447 additions and 0 deletions.
200 changes: 200 additions & 0 deletions tests/e2e/testfiles/minimal-testfiles/scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
69 changes: 69 additions & 0 deletions tests/e2e/testfiles/minimal-testfiles/storage_csm_powermax.yaml
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 8dbc19e

Please sign in to comment.