diff --git a/tests/e2e/array-info.sh b/tests/e2e/array-info.sh index a7c370165..9c6e9392e 100755 --- a/tests/e2e/array-info.sh +++ b/tests/e2e/array-info.sh @@ -40,11 +40,12 @@ export PSCALE_CLUSTER="Isilon-System-Name" export PSCALE_USER="username" export PSCALE_PASS="password" export PSCALE_ENDPOINT="1.1.1.1" +export PSCALE_PORT="8080" export PSCALE_AUTH_ENDPOINT="localhost" export PSCALE_AUTH_PORT="9400" # The following are Authorization Proxy Server specific for powerscale: export PSCALE_POOL_V1="ifs/data/csi" -export PSCALE_POOL_V2="ifs\/data\/csi" # escape / with \ +export PSCALE_POOL_V2="\/ifs\/data\/csi" # escape / with \ export PSCALE_STORAGE="powerscale" export PSCALE_VAULT_STORAGE_PATH="storage\/powerscale" # escape / with \ export PSCALE_QUOTA="0GB" diff --git a/tests/e2e/go.sum b/tests/e2e/go.sum index 58da6658c..4e05b5e34 100644 --- a/tests/e2e/go.sum +++ b/tests/e2e/go.sum @@ -136,6 +136,7 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= diff --git a/tests/e2e/steps/steps_def.go b/tests/e2e/steps/steps_def.go index c8332e4b1..74fc8b73d 100644 --- a/tests/e2e/steps/steps_def.go +++ b/tests/e2e/steps/steps_def.go @@ -53,9 +53,9 @@ var ( quotaLimit = "30000000" pflexSecretMap = map[string]string{"REPLACE_USER": "PFLEX_USER", "REPLACE_PASS": "PFLEX_PASS", "REPLACE_SYSTEMID": "PFLEX_SYSTEMID", "REPLACE_ENDPOINT": "PFLEX_ENDPOINT", "REPLACE_MDM": "PFLEX_MDM", "REPLACE_POOL": "PFLEX_POOL"} pflexAuthSecretMap = map[string]string{"REPLACE_USER": "PFLEX_USER", "REPLACE_SYSTEMID": "PFLEX_SYSTEMID", "REPLACE_ENDPOINT": "PFLEX_AUTH_ENDPOINT", "REPLACE_MDM": "PFLEX_MDM"} - pscaleSecretMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_USER": "PSCALE_USER", "REPLACE_PASS": "PSCALE_PASS", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT"} - pscaleAuthSecretMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_USER": "PSCALE_USER", "REPLACE_PASS": "PSCALE_PASS", "REPLACE_AUTH_ENDPOINT": "PSCALE_AUTH_ENDPOINT", "REPLACE_PORT": "PSCALE_AUTH_PORT", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT"} - pscaleAuthSidecarMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_AUTH_ENDPOINT": "PSCALE_AUTH_ENDPOINT", "REPLACE_PORT": "PSCALE_AUTH_PORT"} + pscaleSecretMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_USER": "PSCALE_USER", "REPLACE_PASS": "PSCALE_PASS", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_PORT": "PSCALE_PORT"} + pscaleAuthSecretMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_USER": "PSCALE_USER", "REPLACE_PASS": "PSCALE_PASS", "REPLACE_AUTH_ENDPOINT": "PSCALE_AUTH_ENDPOINT", "REPLACE_AUTH_PORT": "PSCALE_AUTH_PORT", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_PORT": "PSCALE_PORT"} + pscaleAuthSidecarMap = map[string]string{"REPLACE_CLUSTERNAME": "PSCALE_CLUSTER", "REPLACE_ENDPOINT": "PSCALE_ENDPOINT", "REPLACE_AUTH_ENDPOINT": "PSCALE_AUTH_ENDPOINT", "REPLACE_AUTH_PORT": "PSCALE_AUTH_PORT", "REPLACE_PORT": "PSCALE_PORT"} pflexAuthSidecarMap = map[string]string{"REPLACE_USER": "PFLEX_USER", "REPLACE_PASS": "PFLEX_PASS", "REPLACE_SYSTEMID": "PFLEX_SYSTEMID", "REPLACE_ENDPOINT": "PFLEX_ENDPOINT", "REPLACE_AUTH_ENDPOINT": "PFLEX_AUTH_ENDPOINT"} pmaxCredMap = map[string]string{"REPLACE_USER": "PMAX_USER_ENCODED", "REPLACE_PASS": "PMAX_PASS_ENCODED"} pmaxAuthSidecarMap = map[string]string{"REPLACE_SYSTEMID": "PMAX_SYSTEMID", "REPLACE_ENDPOINT": "PMAX_ENDPOINT", "REPLACE_AUTH_ENDPOINT": "PMAX_AUTH_ENDPOINT"} @@ -342,7 +342,7 @@ func (step *Step) deleteCustomResource(res Resource, crNumStr string) error { func (step *Step) validateCustomResourceStatus(res Resource, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) cr := res.CustomResource[crNum-1].(csmv1.ContainerStorageModule) - time.Sleep(60 * time.Second) + time.Sleep(20 * time.Second) found := new(csmv1.ContainerStorageModule) err := step.ctrlClient.Get(context.TODO(), client.ObjectKey{ Namespace: cr.Namespace, @@ -360,13 +360,13 @@ func (step *Step) validateCustomResourceStatus(res Resource, crNumStr string) er func (step *Step) validateDriverInstalled(res Resource, driverName string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) - time.Sleep(60 * time.Second) + time.Sleep(20 * time.Second) return checkAllRunningPods(context.TODO(), res.CustomResource[crNum-1].(csmv1.ContainerStorageModule).Namespace, step.clientSet) } func (step *Step) validateDriverNotInstalled(res Resource, driverName string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) - time.Sleep(60 * time.Second) + time.Sleep(20 * time.Second) return checkNoRunningPods(context.TODO(), res.CustomResource[crNum-1].(csmv1.ContainerStorageModule).Namespace, step.clientSet) } @@ -393,7 +393,7 @@ func (step *Step) removeNodeLabel(res Resource, label string) error { func (step *Step) validateModuleInstalled(res Resource, module string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) cr := res.CustomResource[crNum-1].(csmv1.ContainerStorageModule) - time.Sleep(60 * time.Second) + time.Sleep(10 * time.Second) found := new(csmv1.ContainerStorageModule) if err := step.ctrlClient.Get(context.TODO(), client.ObjectKey{ Namespace: cr.Namespace, @@ -438,7 +438,7 @@ func (step *Step) validateModuleInstalled(res Resource, module string, crNumStr func (step *Step) validateModuleNotInstalled(res Resource, module string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) cr := res.CustomResource[crNum-1].(csmv1.ContainerStorageModule) - time.Sleep(60 * time.Second) + time.Sleep(10 * time.Second) found := new(csmv1.ContainerStorageModule) if err := step.ctrlClient.Get(context.TODO(), client.ObjectKey{ Namespace: cr.Namespace, @@ -909,7 +909,7 @@ func (step *Step) runCustomTest(res Resource) error { func (step *Step) enableModule(res Resource, module string, crNumStr string) error { crNum, _ := strconv.Atoi(crNumStr) cr := res.CustomResource[crNum-1].(csmv1.ContainerStorageModule) - time.Sleep(60 * time.Second) + time.Sleep(15 * time.Second) found := new(csmv1.ContainerStorageModule) if err := step.ctrlClient.Get(context.TODO(), client.ObjectKey{ Namespace: cr.Namespace, @@ -1323,6 +1323,16 @@ func (step *Step) AuthorizationV1Resources(storageType, driver, port, proxyHost, // get env variables if os.Getenv(endpointvar) != "" { endpoint = os.Getenv(endpointvar) + + if driver == "powerscale" { + port := os.Getenv("PSCALE_PORT") + if port == "" { + fmt.Println("=== PSCALE_PORT not set, using default port 8080 ===") + port = "8080" + } + + endpoint = endpoint + ":" + port + } } if os.Getenv(systemIdvar) != "" { sysID = os.Getenv(systemIdvar) @@ -1434,7 +1444,7 @@ func (step *Step) AuthorizationV1Resources(storageType, driver, port, proxyHost, "generate", "token", "--tenant", tenantName, "--insecure", "--addr", fmt.Sprintf("%s:%s", proxyHost, port), - "--access-token-expiration", fmt.Sprint(10*time.Minute), + "--access-token-expiration", fmt.Sprint(2*time.Hour), ) fmt.Println("=== Token ===\n", cmd.String()) b, err = cmd.CombinedOutput() @@ -1520,7 +1530,19 @@ func (step *Step) AuthorizationV2Resources(storageType, driver, driverNamespace, } for key := range mapValues { - err := replaceInFile(key, os.Getenv(mapValues[key]), updatedTemplateFile) + val := os.Getenv(mapValues[key]) + if driver == "powerscale" && key == "REPLACE_ENDPOINT" { + fmt.Println("Replacing PowerScale Endpoint and adding port...") + + port := os.Getenv(mapValues["REPLACE_PORT"]) + if port == "" { + port = "8080" + } + + val = val + ":" + port + } + + err := replaceInFile(key, val, updatedTemplateFile) if err != nil { return err } @@ -1534,6 +1556,9 @@ func (step *Step) AuthorizationV2Resources(storageType, driver, driverNamespace, return fmt.Errorf("failed to create resources for %s: %v\nErrMessage:\n%s", storageType, err, string(b)) } + fmt.Println("Waiting 5 seconds before generating token.") + time.Sleep(5 * time.Second) + // Generate tenant token fmt.Println("=== Generating token ===\n ") cmd = exec.Command("dellctl", diff --git a/tests/e2e/testfiles/authorization-templates/storage_csm_authorization_template.yaml b/tests/e2e/testfiles/authorization-templates/storage_csm_authorization_template.yaml index 3c8bc2ba5..0ca5966a7 100644 --- a/tests/e2e/testfiles/authorization-templates/storage_csm_authorization_template.yaml +++ b/tests/e2e/testfiles/authorization-templates/storage_csm_authorization_template.yaml @@ -1,18 +1,18 @@ apiVersion: csm-authorization.storage.dell.com/v1 kind: Storage metadata: - name: "REPLACE_STORAGE_NAME" + name: REPLACE_STORAGE_NAME spec: - type: "REPLACE_STORAGE_TYPE" - endpoint: "https://REPLACE_ENDPOINT" - systemID: "REPLACE_SYSTEM_ID" + type: REPLACE_STORAGE_TYPE + endpoint: https://REPLACE_ENDPOINT + systemID: REPLACE_SYSTEM_ID vault: identifier: vault0 kvEngine: secret - path: "REPLACE_VAULT_STORAGE_PATH" + path: REPLACE_VAULT_STORAGE_PATH skipCertificateValidation: true pollInterval: 30s - isiPath: "REPLACE_STORAGE_POOL_PATH" + isiPath: REPLACE_STORAGE_POOL_PATH --- apiVersion: csm-authorization.storage.dell.com/v1 kind: CSMRole @@ -23,12 +23,12 @@ metadata: app.kubernetes.io/part-of: csm-authorization app.kubernetes.io/managed-by: kustomize app.kubernetes.io/created-by: csm-authorization - name: "REPLACE_ROLE_NAME" + name: REPLACE_ROLE_NAME spec: - quota: "REPLACE_QUOTA" - systemID: "REPLACE_SYSTEM_ID" - systemType: "REPLACE_STORAGE_TYPE" - pool: "REPLACE_STORAGE_POOL_PATH" + quota: REPLACE_QUOTA + systemID: REPLACE_SYSTEM_ID + systemType: REPLACE_STORAGE_TYPE + pool: REPLACE_STORAGE_POOL_PATH --- apiVersion: csm-authorization.storage.dell.com/v1 kind: CSMTenant @@ -39,12 +39,12 @@ metadata: app.kubernetes.io/part-of: csm-authorization app.kubernetes.io/managed-by: kustomize app.kubernetes.io/created-by: csm-authorization - name: "REPLACE_TENANT_NAME" + name: REPLACE_TENANT_NAME spec: # TODO(user): Add fields here - roles: "REPLACE_TENANT_ROLES" + roles: REPLACE_TENANT_ROLES approveSdc: false revoke: false # This prefix is added for each new volume provisioned by the tenant. # It should not exceed 3 characters. Example: tn1 - volumePrefix: "REPLACE_TENANT_VOLUME_PREFIX" + volumePrefix: REPLACE_TENANT_VOLUME_PREFIX diff --git a/tests/e2e/testfiles/powerscale-templates/karavi-authorization-config.json b/tests/e2e/testfiles/powerscale-templates/karavi-authorization-config.json index db4954d1b..3fbb297d9 100644 --- a/tests/e2e/testfiles/powerscale-templates/karavi-authorization-config.json +++ b/tests/e2e/testfiles/powerscale-templates/karavi-authorization-config.json @@ -1,8 +1,8 @@ [{ "username":"-", "password":"-", - "intendedEndpoint":"https://REPLACE_ENDPOINT", - "endpoint":"https://REPLACE_AUTH_ENDPOINT:REPLACE_PORT", + "intendedEndpoint":"https://REPLACE_ENDPOINT:REPLACE_PORT", + "endpoint":"https://REPLACE_AUTH_ENDPOINT:REPLACE_AUTH_PORT", "systemID": "REPLACE_CLUSTERNAME", "insecure":true, "isDefault":true diff --git a/tests/e2e/testfiles/powerscale-templates/powerscale-auth-secret-template.yaml b/tests/e2e/testfiles/powerscale-templates/powerscale-auth-secret-template.yaml index e442ca485..93b517400 100644 --- a/tests/e2e/testfiles/powerscale-templates/powerscale-auth-secret-template.yaml +++ b/tests/e2e/testfiles/powerscale-templates/powerscale-auth-secret-template.yaml @@ -1,9 +1,11 @@ isilonClusters: - clusterName: "REPLACE_CLUSTERNAME" - username: "REPLACE_USER" - password: "REPLACE_PASS" + username: "ignored" + password: "ignored" isDefault: true endpoint: "REPLACE_AUTH_ENDPOINT" - endpointPort: "REPLACE_PORT" + endpointPort: "REPLACE_AUTH_PORT" skipCertificateValidation: true mountEndpoint: "REPLACE_ENDPOINT" + isiPath: "/ifs/data/csi" + isiVolumePathPermissions: "0777" diff --git a/tests/e2e/testfiles/powerscale-templates/powerscale-secret-template.yaml b/tests/e2e/testfiles/powerscale-templates/powerscale-secret-template.yaml index 7d04acbe5..95e0132a5 100644 --- a/tests/e2e/testfiles/powerscale-templates/powerscale-secret-template.yaml +++ b/tests/e2e/testfiles/powerscale-templates/powerscale-secret-template.yaml @@ -5,4 +5,4 @@ isilonClusters: isDefault: true endpoint: "REPLACE_ENDPOINT" skipCertificateValidation: true - endpointPort: 8080 + endpointPort: "REPLACE_PORT" diff --git a/tests/e2e/testfiles/scenarios.yaml b/tests/e2e/testfiles/scenarios.yaml index 02f732264..477e28a8b 100644 --- a/tests/e2e/testfiles/scenarios.yaml +++ b/tests/e2e/testfiles/scenarios.yaml @@ -423,13 +423,14 @@ - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is not installed" - "Enable [authorization] module from CR [2]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] name [isilon-creds-auth] in namespace [isilon] for [pscaleAuth]" - "Set secret for driver from CR [2] to [isilon-creds-auth]" - "Set up secret with template [testfiles/powerscale-templates/karavi-authorization-config.json] name [karavi-authorization-config] in namespace [isilon] for [pscaleAuthSidecar]" - "Set up secret with template [testfiles/authorization-templates/rootCertificate.pem] name [proxy-server-root-certificate] in namespace [isilon] for [authSidecarCert]" - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is installed" - - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds-auth] in namespace [isilon] for [pscale]" - "Disable [authorization] module from CR [2]" + - "Set secret for driver from CR [2] to [isilon-creds]" - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is not installed" # cleanup @@ -439,6 +440,8 @@ - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" - "Restore template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] for [pscaleAuth]" - "Restore template [testfiles/powerscale-templates/karavi-authorization-config.json] for [pscaleAuthSidecar]" + - "Restore template [testfiles/powerscale-templates/powerscale-storageclass-template.yaml] for [pscale]" + - "Restore template [testfiles/powerscale-templates/rootCertificate.pem] for [authSidecarCert]" - scenario: "Install PowerScale Driver(With Observability)" paths: - "testfiles/storage_csm_powerscale_observability.yaml" @@ -469,6 +472,7 @@ - "observability" steps: - "Given an environment with k8s or openshift, and CSM operator installed" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds] in namespace [isilon] for [pscale]" - "Apply custom resource [1]" - "Validate custom resource [1]" - "Validate [powerscale] driver from CR [1] is installed" @@ -483,6 +487,7 @@ # cleanup - "Enable forceRemoveDriver on CR [1]" - "Delete custom resource [1]" + - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" - scenario: "Install PowerScale Driver(With Observability and Custom Certs)" paths: - "testfiles/storage_csm_powerscale_observability_top_custom_cert.yaml" @@ -565,6 +570,7 @@ - "Set secret for driver from CR [2] to [isilon-creds-auth]" - "Set up secret with template [testfiles/powerscale-templates/karavi-authorization-config.json] name [karavi-authorization-config] in namespace [isilon] for [pscaleAuthSidecar]" - "Set up secret with template [testfiles/authorization-templates/rootCertificate.pem] name [proxy-server-root-certificate] in namespace [isilon] for [authSidecarCert]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] name [isilon-creds-auth] in namespace [isilon] for [pscaleAuth]" - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is installed" - "Validate [observability] module from CR [2] is not installed" @@ -578,7 +584,9 @@ - "Delete custom resource [1]" - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" - "Restore template [testfiles/powerscale-templates/karavi-authorization-config.json] for [pscaleAuthSidecar]" -- scenario: "Install PowerScale Driver(With Authorization V1 and Observability), Disable Authorization module, Disable Observability module" + - "Restore template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] for [pscaleAuth]" + - "Restore template [testfiles/authorization-templates/rootCertificate.pem] for [authSidecarCert]" +- scenario: "Install PowerScale Driver(With Authorization V1 and Observability), Disable Observability module, Disable Authorization module" paths: - "testfiles/authorization-templates/storage_csm_authorization_proxy_server_no_cert.yaml" - "testfiles/storage_csm_powerscale_observability_auth.yaml" @@ -602,14 +610,15 @@ - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is installed" - "Validate [observability] module from CR [2] is installed" + - "Disable [observability] module from CR [2]" + - "Validate [powerscale] driver from CR [2] is installed" + - "Validate [authorization] module from CR [2] is installed" + - "Validate [observability] module from CR [2] is not installed" - "Disable [authorization] module from CR [2]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds] in namespace [isilon] for [pscale]" - "Set secret for driver from CR [2] to [isilon-creds]" - "Validate [powerscale] driver from CR [2] is installed" - "Validate [authorization] module from CR [2] is not installed" - - "Validate [observability] module from CR [2] is installed" - - "Disable [observability] module from CR [2]" - - "Validate [powerscale] driver from CR [2] is installed" - - "Validate [authorization] module from CR [2] is not installed" - "Validate [observability] module from CR [2] is not installed" - "Run custom test" # cleanup @@ -620,6 +629,7 @@ - "Restore template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] for [pscaleAuth]" - "Restore template [testfiles/powerscale-templates/karavi-authorization-config.json] for [pscaleAuthSidecar]" - "Restore template [testfiles/authorization-templates/rootCertificate.pem] for [authSidecarCert]" + - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" customTest: name: Cert CSI run: @@ -817,6 +827,126 @@ name: Cert CSI run: - cert-csi test vio --sc op-e2e-vxflexos --chainNumber 2 --chainLength 2 +- scenario: "Install PowerScale Driver (With Authorization V2)" + paths: + - "testfiles/authorization-templates/storage_csm_authorization_proxy_server.yaml" + - "testfiles/storage_csm_powerscale_auth.yaml" + - "testfiles/authorization-templates/storage_csm_authorization_crds.yaml" + tags: + - "authorization" + - "authorizationproxyserver" + - "powerscale" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Install Authorization CRDs [3]" + - "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 [powerscale] for CR [1]" + - "Create storageclass with name [op-e2e-isilon] and template [testfiles/powerscale-templates/powerscale-storageclass-template.yaml] for [pscale]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] name [isilon-creds-auth] in namespace [isilon] for [pscaleAuth]" + - "Set up secret with template [testfiles/powerscale-templates/karavi-authorization-config.json] name [karavi-authorization-config] in namespace [isilon] for [pscaleAuthSidecar]" + - "Apply custom resource [2]" + - "Validate custom resource [2]" + - "Validate [powerscale] 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 Authorization CRs for [powerscale]" + - "Delete custom resource [1]" + - "Delete Authorization CRDs [3]" + - "Restore template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] for [pscaleAuth]" + - "Restore template [testfiles/powerscale-templates/karavi-authorization-config.json] for [pscaleAuthSidecar]" + customTest: + name: Cert CSI + run: + - cert-csi test vio --sc op-e2e-isilon --chainNumber 2 --chainLength 2 +- scenario: "Install PowerScale Driver(With Authorization V2 and Observability)" + paths: + - "testfiles/authorization-templates/storage_csm_authorization_proxy_server.yaml" + - "testfiles/storage_csm_powerscale_observability_auth.yaml" + - "testfiles/authorization-templates/storage_csm_authorization_crds.yaml" + tags: + - "authorizationproxyserver" + - "authorization" + - "powerscale" + - "observability" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Install Authorization CRDs [3]" + - "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 [powerscale] for CR [1]" + - "Create storageclass with name [op-e2e-isilon] and template [testfiles/powerscale-templates/powerscale-storageclass-template.yaml] for [pscale]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] name [isilon-creds-auth] in namespace [isilon] for [pscaleAuth]" + - "Set up secret with template [testfiles/powerscale-templates/karavi-authorization-config.json] name [karavi-authorization-config] in namespace [isilon] for [pscaleAuthSidecar]" + - "Apply custom resource [2]" + - "Validate custom resource [2]" + - "Validate [powerscale] driver from CR [2] is installed" + - "Validate [authorization] module from CR [2] is installed" + - "Validate [observability] module from CR [2] is installed" + - "Run custom test" + # cleanup + - "Enable forceRemoveDriver on CR [2]" + - "Delete custom resource [2]" + - "Delete Authorization CRs for [powerscale]" + - "Delete custom resource [1]" + - "Delete Authorization CRDs [3]" + - "Restore template [testfiles/powerscale-templates/powerscale-storageclass-template.yaml] for [pscale]" + - "Restore template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] for [pscaleAuth]" + - "Restore template [testfiles/powerscale-templates/karavi-authorization-config.json] for [pscaleAuthSidecar]" + customTest: + name: Cert CSI + run: + - cert-csi test vio --sc op-e2e-isilon --chainNumber 2 --chainLength 2 +- scenario: Install PowerScale Driver(With Authorization V2 and Observability), Disable Observability module, Disable Authorization module" + paths: + - "testfiles/authorization-templates/storage_csm_authorization_proxy_server.yaml" + - "testfiles/storage_csm_powerscale_observability_auth.yaml" + - "testfiles/authorization-templates/storage_csm_authorization_crds.yaml" + tags: + - "authorizationproxyserver" + - "authorization" + - "powerscale" + - "observability" + steps: + - "Given an environment with k8s or openshift, and CSM operator installed" + - "Install Authorization CRDs [3]" + - "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 [powerscale] for CR [1]" + - "Create storageclass with name [op-e2e-isilon] and template [testfiles/powerscale-templates/powerscale-storageclass-template.yaml] for [pscale]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] name [isilon-creds-auth] in namespace [isilon] for [pscaleAuth]" + - "Set up secret with template [testfiles/powerscale-templates/karavi-authorization-config.json] name [karavi-authorization-config] in namespace [isilon] for [pscaleAuthSidecar]" + - "Apply custom resource [2]" + - "Validate custom resource [2]" + - "Validate [powerscale] driver from CR [2] is installed" + - "Validate [authorization] module from CR [2] is installed" + - "Validate [observability] module from CR [2] is installed" + - "Disable [observability] module from CR [2]" + - "Validate [powerscale] driver from CR [2] is installed" + - "Validate [authorization] module from CR [2] is installed" + - "Validate [observability] module from CR [2] is not installed" + - "Disable [authorization] module from CR [2]" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds] in namespace [isilon] for [pscale]" + - "Set secret for driver from CR [2] to [isilon-creds]" + - "Validate [powerscale] driver from CR [2] is installed" + - "Validate [authorization] module from CR [2] is not installed" + - "Validate [observability] module from CR [2] is not installed" + # cleanup + - "Enable forceRemoveDriver on CR [2]" + - "Delete custom resource [2]" + - "Delete Authorization CRs for [powerscale]" + - "Delete custom resource [1]" + - "Delete Authorization CRDs [3]" + - "Restore template [testfiles/powerscale-templates/powerscale-storageclass-template.yaml] for [pscale]" + - "Restore template [testfiles/powerscale-templates/powerscale-auth-secret-template.yaml] for [pscaleAuth]" + - "Restore template [testfiles/powerscale-templates/karavi-authorization-config.json] for [pscaleAuthSidecar]" + - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" - scenario: "Install PowerFlex Driver (With Authorization V2), Upgrade driver and authorization sidecar" paths: - "testfiles/authorization-templates/storage_csm_authorization_alpha_proxy_server.yaml" @@ -1189,6 +1319,7 @@ - "resiliency" steps: - "Given an environment with k8s or openshift, and CSM operator installed" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds] in namespace [isilon] for [pscale]" - "Apply custom resource [1]" - "Validate custom resource [1]" - "Validate [powerscale] driver from CR [1] is installed" @@ -1197,6 +1328,7 @@ # cleanup - "Enable forceRemoveDriver on CR [1]" - "Delete custom resource [1]" + - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" customTest: name: CustomTest run: @@ -1210,6 +1342,7 @@ - "sanity" steps: - "Given an environment with k8s or openshift, and CSM operator installed" + - "Set up secret with template [testfiles/powerscale-templates/powerscale-secret-template.yaml] name [isilon-creds] in namespace [isilon] for [pscale]" - "Apply custom resource [1]" - "Validate custom resource [1]" - "Validate [powerscale] driver from CR [1] is installed" @@ -1223,6 +1356,7 @@ # cleanup - "Enable forceRemoveDriver on CR [1]" - "Delete custom resource [1]" + - "Restore template [testfiles/powerscale-templates/powerscale-secret-template.yaml] for [pscale]" - scenario: "Install PowerScale Driver and PowerFlex Driver, uninstall PowerFlex Driver" paths: - "testfiles/storage_csm_powerscale.yaml" diff --git a/tests/e2e/testfiles/storage_csm_powerscale.yaml b/tests/e2e/testfiles/storage_csm_powerscale.yaml index a9fcbee06..8b6e27437 100644 --- a/tests/e2e/testfiles/storage_csm_powerscale.yaml +++ b/tests/e2e/testfiles/storage_csm_powerscale.yaml @@ -312,6 +312,14 @@ spec: # image: Defines karavi-topology image. This shouldn't be changed # Allowed values: string image: dellemc/csm-topology:nightly + # certificate: base64-encoded certificate for cert/private-key pair -- add cert here to use custom certificates + # for self-signed certs, leave empty string + # Allowed values: string + certificate: "" + # privateKey: base64-encoded private key for cert/private-key pair -- add private key here to use custom certificates + # for self-signed certs, leave empty string + # Allowed values: string + privateKey: "" envs: # topology log level # Valid values: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, PANIC @@ -324,12 +332,27 @@ spec: # image: Defines otel-collector image. This shouldn't be changed # Allowed values: string image: otel/opentelemetry-collector:0.42.0 + # certificate: base64-encoded certificate for cert/private-key pair -- add cert here to use custom certificates + # for self-signed certs, leave empty string + # Allowed values: string + certificate: "" + # privateKey: base64-encoded private key for cert/private-key pair -- add private key here to use custom certificates + # for self-signed certs, leave empty string + # Allowed values: string + privateKey: "" 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" + # enabled: Enable/Disable cert-manager + # Allowed values: + # true: enable deployment of cert-manager + # false: disable deployment of cert-manager only if it's already deployed + # Default value: true + - name: cert-manager + enabled: false - name: metrics-powerscale # enabled: Enable/Disable PowerScale metrics enabled: false diff --git a/tests/e2e/testfiles/storage_csm_powerscale_resiliency.yaml b/tests/e2e/testfiles/storage_csm_powerscale_resiliency.yaml index 5586ab018..0de97cfaa 100644 --- a/tests/e2e/testfiles/storage_csm_powerscale_resiliency.yaml +++ b/tests/e2e/testfiles/storage_csm_powerscale_resiliency.yaml @@ -293,20 +293,3 @@ spec: - "--driver-config-params=/csi-isilon-config-params/driver-config-params.yaml" - "--driverPodLabelValue=dell-storage" - "--ignoreVolumelessPods=false" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: isilon-config-params - namespace: isilon -data: - driver-config-params.yaml: | - CSI_LOG_LEVEL: "debug" - CSI_LOG_FORMAT: "TEXT" - PODMON_CONTROLLER_LOG_LEVEL: "debug" - PODMON_CONTROLLER_LOG_FORMAT: "TEXT" - PODMON_NODE_LOG_LEVEL: "debug" - PODMON_NODE_LOG_FORMAT: "TEXT" -spec: - driver: - configVersion: v2.12.0