diff --git a/tests/sanity/Dockerfile b/tests/sanity/Dockerfile index 20ac3174..80ab51b7 100644 --- a/tests/sanity/Dockerfile +++ b/tests/sanity/Dockerfile @@ -1,6 +1,6 @@ # # -# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,12 +14,15 @@ # # -FROM golang:1.13.4 as build-env +FROM golang:1.21.6 as build-env -RUN go get -u github.com/kubernetes-csi/csi-test/... +RUN git clone https://github.com/kubernetes-csi/csi-test.git && \ + cd csi-test/cmd/csi-sanity && \ + make clean install && \ + cp ./csi-sanity /csi-sanity FROM frolvlad/alpine-glibc WORKDIR /app/csi-sanity/ -COPY --from=build-env /go/bin/csi-sanity . +COPY --from=build-env /csi-sanity . -ENTRYPOINT [ "./csi-sanity" ] +ENTRYPOINT [ "./csi-sanity" ] \ No newline at end of file diff --git a/tests/sanity/helm/config.yaml b/tests/sanity/helm/config.yaml deleted file mode 100644 index 00c12172..00000000 --- a/tests/sanity/helm/config.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# -# -# Copyright © 2021-2022 Dell Inc. or its subsidiaries. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# sed "s/CONFIG_YAML/`cat config.yaml|base64 -w0`/g" secret.yaml | kubectl apply -f - -arrays: - - endpoint: "https://1.2.3.4/api/rest" - username: "username" - password: "password" - insecure: true - default: true - block-protocol: "auto" - diff --git a/tests/sanity/helm/sanity-csi-powerstore/Chart.yaml b/tests/sanity/helm/sanity-csi-powerstore/Chart.yaml index 01aabacb..7ba73de0 100644 --- a/tests/sanity/helm/sanity-csi-powerstore/Chart.yaml +++ b/tests/sanity/helm/sanity-csi-powerstore/Chart.yaml @@ -1,6 +1,6 @@ # # -# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,14 +13,19 @@ # limitations under the License. # # - +apiVersion: v2 +appVersion: "2.9.0" name: sanity-csi-powerstore -version: 1.0.0 -appVersion: 1.0.0 +version: 2.9.0 description: | PowerStore CSI (Container Storage Interface) driver Kubernetes integration. This chart includes everything required to provision via CSI as well as a PowerStore StorageClass. +type: application +kubeVersion: ">= 1.24.0 < 1.29.0" +# If you are using a complex K8s version like "v1.24.3-mirantis-1", use this kubeVersion check instead +# WARNING: this version of the check will allow the use of alpha and beta versions, which is NOT SUPPORTED +# kubeVersion: ">= 1.24.0-0 < 1.29.0-0" keywords: - csi - storage @@ -28,5 +33,4 @@ home: https://github.com/dell/csi-powerstore sources: - https://github.com/dell/csi-powerstore maintainers: -- name: DellEMC -engine: gotpl +- name: DellEMC \ No newline at end of file diff --git a/tests/sanity/helm/sanity-csi-powerstore/templates/_helpers.tpl b/tests/sanity/helm/sanity-csi-powerstore/templates/_helpers.tpl new file mode 100644 index 00000000..7334646c --- /dev/null +++ b/tests/sanity/helm/sanity-csi-powerstore/templates/_helpers.tpl @@ -0,0 +1,10 @@ +{{/* +Return true if storage capacity tracking is enabled and is supported based on k8s version +*/}} +{{- define "csi-powerstore.isStorageCapacitySupported" -}} +{{- if eq .Values.storageCapacity.enabled true -}} + {{- if and (eq .Capabilities.KubeVersion.Major "1") (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}} + {{- true -}} + {{- end -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/tests/sanity/helm/sanity-csi-powerstore/templates/controller.yaml b/tests/sanity/helm/sanity-csi-powerstore/templates/controller.yaml index 6329e67a..4b762903 100644 --- a/tests/sanity/helm/sanity-csi-powerstore/templates/controller.yaml +++ b/tests/sanity/helm/sanity-csi-powerstore/templates/controller.yaml @@ -1,6 +1,6 @@ # # -# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,7 +35,13 @@ rules: verbs: ["list", "watch", "create", "update", "patch"] - apiGroups: [""] resources: ["nodes"] + {{- if hasKey .Values "podmon" }} + {{- if eq .Values.podmon.enabled true }} + verbs: ["get", "list", "watch", "patch"] + {{- else }} verbs: ["get", "list", "watch"] + {{- end }} + {{- end }} - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["get", "list", "watch", "create", "delete", "update", "patch"] @@ -47,28 +53,53 @@ rules: verbs: ["get", "list", "watch"] - apiGroups: ["storage.k8s.io"] resources: ["volumeattachments"] + {{- if hasKey .Values "podmon" }} + {{- if eq .Values.podmon.enabled true }} + verbs: ["get", "list", "watch", "update", "patch", "delete"] + {{- else }} verbs: ["get", "list", "watch", "update", "patch"] + {{- end }} + {{- end }} - apiGroups: [""] resources: ["secrets"] verbs: ["get", "list"] + {{- if hasKey .Values.controller "vgsnapshot" }} + {{- if eq .Values.controller.vgsnapshot.enabled true }} + - apiGroups: ["volumegroup.storage.dell.com"] + resources: ["dellcsivolumegroupsnapshots","dellcsivolumegroupsnapshots/status"] + verbs: ["create", "list", "watch", "delete", "update"] + {{- end }} + {{- end }} - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotclasses"] verbs: ["get", "list", "watch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents"] - verbs: ["create", "get", "list", "watch", "update", "delete"] + verbs: ["create", "get", "list", "watch", "update", "delete", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents/status"] - verbs: ["update"] + verbs: ["update", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots", "volumesnapshots/status"] + {{- if hasKey .Values.controller "vgsnapshot" }} + {{- if eq .Values.controller.vgsnapshot.enabled true }} + verbs: ["get", "list", "watch", "update", "create", "delete"] + {{- else }} verbs: ["get", "list", "watch", "update"] + {{- end }} + {{- end }} - apiGroups: ["storage.k8s.io"] resources: ["volumeattachments/status"] verbs: ["patch"] - apiGroups: [""] resources: ["pods"] + {{- if hasKey .Values "podmon" }} + {{- if eq .Values.podmon.enabled true }} + verbs: ["get", "list", "watch", "update", "delete"] + {{- else }} verbs: ["get", "list", "watch"] + {{- end }} + {{- end }} - apiGroups: ["apiextensions.k8s.io"] resources: ["customresourcedefinitions"] verbs: ["create", "list", "watch", "delete"] @@ -79,7 +110,32 @@ rules: - apiGroups: [""] resources: ["persistentvolumeclaims/status"] verbs: ["update", "patch"] - + # below for dell-csi-replicator + {{- if hasKey .Values.controller "replication" }} + {{- if eq .Values.controller.replication.enabled true}} + - apiGroups: ["replication.storage.dell.com"] + resources: ["dellcsireplicationgroups"] + verbs: ["create", "delete", "get", "list", "patch", "update", "watch"] + - apiGroups: ["replication.storage.dell.com"] + resources: ["dellcsireplicationgroups/status"] + verbs: ["get", "patch", "update"] + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["create", "delete", "get", "list", "watch", "update", "patch"] + {{- end}} + {{- end}} + # Permissions for CSIStorageCapacity + {{- if eq (include "csi-powerstore.isStorageCapacitySupported" .) "true" }} + - apiGroups: ["storage.k8s.io"] + resources: ["csistoragecapacities"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] + - apiGroups: [""] + resources: ["pods"] + verbs: ["get"] + - apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get"] + {{- end }} --- kind: ClusterRoleBinding @@ -106,11 +162,17 @@ spec: selector: matchLabels: name: {{ .Release.Name }}-controller - replicas: {{ required "Must provide the number of controller replicas." .Values.controller.replicas }} + {{- if lt (.Values.controller.controllerCount | toString | atoi ) 1 -}} + {{- fail "value for .Values.controller.controllerCount should be atleast 1" }} + {{- else }} + replicas: {{ required "Must provide the number of controller instances to create." .Values.controller.controllerCount }} + {{- end }} template: metadata: labels: name: {{ .Release.Name }}-controller + annotations: + kubectl.kubernetes.io/default-container: driver spec: {{ if .Values.controller.nodeSelector }} nodeSelector: @@ -132,33 +194,264 @@ spec: - {{ .Release.Name }}-controller topologyKey: "kubernetes.io/hostname" containers: + {{- if hasKey .Values "podmon" }} + {{- if eq .Values.podmon.enabled true }} + - name: podmon + image: {{ required "Must provide the podmon container image." .Values.images.podmon }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + {{- toYaml .Values.podmon.controller.args | nindent 12 }} + env: + - name: MY_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumeMounts: + - name: socket-dir + mountPath: /var/run/csi + - name: powerstore-config-params + mountPath: /powerstore-config-params + {{- end }} + {{- end }} + {{- if hasKey .Values "dev" }} + {{ if .Values.dev.enableTracing }}{{- include "pstore.tracing" . | nindent 8 }}{{ end }} + {{- end }} + - name: attacher + image: {{ required "Must provide the CSI attacher container image." .Values.images.attacher }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" + - "--v=5" + - "--leader-election" + - "--worker-threads=130" + - "--resync=10s" + - "--timeout=130s" + env: + - name: ADDRESS + value: /var/run/csi/csi.sock + volumeMounts: + - name: socket-dir + mountPath: /var/run/csi + {{- if hasKey .Values.controller "resizer" }} + {{- if eq .Values.controller.resizer.enabled true }} + - name: resizer + image: {{ required "Must provide the CSI resizer container image." .Values.images.resizer }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" + - "--v=5" + - "--leader-election" + env: + - name: ADDRESS + value: /var/run/csi/csi.sock + volumeMounts: + - name: socket-dir + mountPath: /var/run/csi + {{end}} + {{end}} + - name: provisioner + image: {{ required "Must provide the CSI provisioner container image." .Values.images.provisioner }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" + - "--volume-name-prefix={{ required "Must provide a value to prefix to driver created volume names" .Values.controller.volumeNamePrefix }}" + - "--volume-name-uuid-length=10" + - "--v=5" + - "--leader-election" + - "--default-fstype={{ .Values.defaultFsType | default "ext4" }}" + - "--extra-create-metadata" + - "--feature-gates=Topology=true" + - "--enable-capacity={{ (include "csi-powerstore.isStorageCapacitySupported" .) | default false }}" + - "--capacity-ownerref-level=2" + - "--capacity-poll-interval={{ .Values.storageCapacity.pollInterval | default "5m" }}" + env: + - name: ADDRESS + value: /var/run/csi/csi.sock + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + volumeMounts: + - name: socket-dir + mountPath: /var/run/csi + {{- if hasKey .Values.controller "snapshot" }} + {{- if eq .Values.controller.snapshot.enabled true }} + - name: snapshotter + image: {{ required "Must provide the CSI snapshotter container image." .Values.images.snapshotter }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" + - "--v=5" + - "--leader-election" + - "--snapshot-name-prefix={{ required "Must privided a Snapshot Name Prefix" .Values.controller.snapshot.snapNamePrefix }}" + env: + - name: ADDRESS + value: /var/run/csi/csi.sock + volumeMounts: + - name: socket-dir + mountPath: /var/run/csi + {{end}} + {{end}} + {{- if hasKey .Values.controller "vgsnapshot" }} + {{- if eq .Values.controller.vgsnapshot.enabled true }} + - name: vg-snapshotter + image: {{ required "Must provide the vgsnapshotter container image." .Values.images.vgsnapshotter }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + env: + - name: ADDRESS + value: /var/run/csi/csi.sock + volumeMounts: + - name: socket-dir + mountPath: /var/run/csi + {{- end }} + {{- end }} + {{- if hasKey .Values.controller "replication" }} + {{- if eq .Values.controller.replication.enabled true}} + - name: dell-csi-replicator + image: {{ required "Must provide the Dell CSI Replicator image." .Values.images.replication }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--csi-address=$(ADDRESS)" + - "--leader-election=true" + - "--worker-threads=2" + - "--retry-interval-start=1s" + - "--retry-interval-max=300s" + - "--timeout=300s" + - "--context-prefix={{ .Values.controller.replication.replicationContextPrefix}}" + - "--prefix={{ .Values.controller.replication.replicationPrefix}}" + env: + - name: ADDRESS + value: /var/run/csi/csi.sock + - name: X_CSI_REPLICATION_CONFIG_DIR + value: /powerstore-config-params + - name: X_CSI_REPLICATION_CONFIG_FILE_NAME + value: driver-config-params.yaml + volumeMounts: + - name: socket-dir + mountPath: /var/run/csi + - name: powerstore-config-params + mountPath: /powerstore-config-params + {{- end }} + {{- end }} + {{- if hasKey .Values.controller "healthMonitor" }} + {{- if eq .Values.controller.healthMonitor.enabled true}} + - name: csi-external-health-monitor-controller + image: {{ required "Must provide the CSI external health monitor controller image." .Values.images.healthmonitor }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" + - "--leader-election" + - "--http-endpoint=:8080" + - "--enable-node-watcher=true" + - "--monitor-interval={{ .Values.controller.healthMonitor.interval | default "60s" }}" + - "--timeout=180s" + env: + - name: ADDRESS + value: /var/run/csi/csi.sock + volumeMounts: + - name: socket-dir + mountPath: /var/run/csi + {{- end }} + {{- end }} + - name: csi-metadata-retriever + image: {{ required "Must provide the CSI Metadata retriever container image." .Values.images.metadataretriever }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + command: [ "/csi-metadata-retriever" ] + env: + {{- if hasKey .Values "dev" }} + - name: ENABLE_TRACING + value: {{ .Values.dev.enableTracing | quote }} + {{ if .Values.dev.enableTracing }}{{- include "pstore.tracingenvvars" . | nindent 12 }}{{ end }} + {{- end }} + - name: CSI_RETRIEVER_ENDPOINT + value: /var/run/csi/csi_retriever.sock + volumeMounts: + - name: socket-dir + mountPath: /var/run/csi - name: driver - image: {{ required "Must provide the PowerStore driver container image." .Values.images.driver }} - imagePullPolicy: Always + image: {{ required "Must provide the PowerStore driver image repository." .Values.images.driver }} + imagePullPolicy: {{ .Values.imagePullPolicy }} command: [ "/csi-powerstore" ] env: + {{- if hasKey .Values "dev" }} + - name: ENABLE_TRACING + value: {{ .Values.dev.enableTracing | quote }} + {{ if .Values.dev.enableTracing }}{{- include "pstore.tracingenvvars" . | nindent 12 }}{{ end }} + {{- end }} - name: CSI_ENDPOINT - value: /var/run/csi/controller-csi.sock + value: /var/run/csi/csi.sock + - name: CSI_RETRIEVER_ENDPOINT + value: /var/run/csi/csi_retriever.sock - name: X_CSI_MODE value: controller - - name: X_CSI_DEBUG - value: "true" - name: X_CSI_DRIVER_NAME value: {{ .Values.driverName }} - - name: X_CSI_DRIVER_EXTERNAL_ACCESS + - name: X_CSI_POWERSTORE_EXTERNAL_ACCESS value: {{ .Values.externalAccess }} + - name: X_CSI_NFS_ACLS + value: "{{ .Values.nfsAcls }}" - name: X_CSI_POWERSTORE_CONFIG_PATH value: /powerstore-config/config + - name: X_CSI_POWERSTORE_CONFIG_PARAMS_PATH + value: /powerstore-config-params/driver-config-params.yaml + {{- if hasKey .Values "podmon" }} + - name: X_CSI_PODMON_ENABLED + value: "{{ .Values.podmon.enabled }}" + {{- if eq .Values.podmon.enabled true }} + {{- range $key, $value := .Values.podmon.controller.args }} + {{- if contains "--arrayConnectivityPollRate" $value }} + - name: X_CSI_PODMON_ARRAY_CONNECTIVITY_POLL_RATE + value: "{{ (split "=" $value)._1 }}" + {{- end }} + {{- end }} + {{- end }} + {{- end }} + - name: X_CSI_PODMON_API_PORT + value: "{{ .Values.podmonAPIPort }}" + {{- if hasKey .Values.controller "replication" }} + {{- if eq .Values.controller.replication.enabled true}} + - name: X_CSI_REPLICATION_CONTEXT_PREFIX + value: {{ .Values.controller.replication.replicationContextPrefix | default "powerstore"}} + - name: X_CSI_REPLICATION_PREFIX + value: {{ .Values.controller.replication.replicationPrefix | default "replication.storage.dell.com"}} + {{- end }} + {{- end }} + {{- if hasKey .Values.controller "healthMonitor" }} + {{- if eq .Values.controller.healthMonitor.enabled true}} + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "{{ .Values.controller.healthMonitor.enabled }}" + {{- end }} + {{- end }} + - name: GOPOWERSTORE_DEBUG + value: "true" + - name: CSI_AUTO_ROUND_OFF_FILESYSTEM_SIZE + value: "{{ .Values.allowAutoRoundOffFilesystemSize | default false }}" volumeMounts: - name: socket-dir mountPath: /var/run/csi - name: powerstore-config mountPath: /powerstore-config + - name: powerstore-config-params + mountPath: /powerstore-config-params volumes: - name: socket-dir - hostPath: - path: /var/run/csi - type: DirectoryOrCreate + emptyDir: + - name: powerstore-config-params + configMap: + name: {{ .Release.Name }}-config-params - name: powerstore-config secret: - secretName: powerstore-config + secretName: {{ .Release.Name }}-config \ No newline at end of file diff --git a/tests/sanity/helm/sanity-csi-powerstore/templates/driver-config-params.yaml b/tests/sanity/helm/sanity-csi-powerstore/templates/driver-config-params.yaml new file mode 100644 index 00000000..c90edf38 --- /dev/null +++ b/tests/sanity/helm/sanity-csi-powerstore/templates/driver-config-params.yaml @@ -0,0 +1,31 @@ +# +# +# Copyright © 2021-2024 Dell Inc. or its subsidiaries. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-config-params + namespace: {{ .Release.Namespace }} +data: + driver-config-params.yaml: | + CSI_LOG_LEVEL: "{{ .Values.logLevel }}" + CSI_LOG_FORMAT: "{{ .Values.logFormat }}" + {{ if .Values.podmon.enabled }} + PODMON_CONTROLLER_LOG_LEVEL: "{{ .Values.logLevel }}" + PODMON_CONTROLLER_LOG_FORMAT: "{{ .Values.logFormat }}" + PODMON_NODE_LOG_LEVEL: "{{ .Values.logLevel }}" + PODMON_NODE_LOG_FORMAT: "{{ .Values.logFormat }}" + {{ end }} \ No newline at end of file diff --git a/tests/sanity/helm/sanity-csi-powerstore/templates/node.yaml b/tests/sanity/helm/sanity-csi-powerstore/templates/node.yaml index 64d824dd..e5ce8653 100644 --- a/tests/sanity/helm/sanity-csi-powerstore/templates/node.yaml +++ b/tests/sanity/helm/sanity-csi-powerstore/templates/node.yaml @@ -1,6 +1,6 @@ # # -# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,7 +52,16 @@ rules: resourceNames: ["privileged"] resources: ["securitycontextconstraints"] verbs: ["use"] - + {{- if hasKey .Values "podmon" }} + {{- if eq .Values.podmon.enabled true }} + - apiGroups: [""] + resources: ["pods"] + verbs: ["get", "list", "watch", "update", "delete"] + - apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["get", "watch", "list", "delete", "update", "create"] + {{ end }} + {{ end }} --- @@ -84,6 +93,11 @@ spec: metadata: labels: app: {{ .Release.Name }}-node + {{- if .Values.podmon.enabled }} + driver.dellemc.com: dell-storage + {{- end }} + annotations: + kubectl.kubernetes.io/default-container: driver spec: {{ if .Values.node.nodeSelector }} nodeSelector: @@ -94,46 +108,103 @@ spec: {{- toYaml .Values.node.tolerations | nindent 6 }} {{ end }} serviceAccount: {{ .Release.Name }}-node + dnsPolicy: ClusterFirstWithHostNet hostNetwork: true hostIPC: true containers: + {{- if hasKey .Values "podmon" }} + {{- if eq .Values.podmon.enabled true }} + - name: podmon + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true + image: {{ required "Must provide the podmon container image." .Values.images.podmon }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + {{- toYaml .Values.podmon.node.args | nindent 12 }} + env: + - name: KUBE_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: X_CSI_PRIVATE_MOUNT_DIR + value: {{ .Values.kubeletConfigDir }} + - name: MY_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumeMounts: + - name: kubelet-pods + mountPath: {{ .Values.kubeletConfigDir }}/pods + mountPropagation: "Bidirectional" + - name: driver-path + mountPath: {{ .Values.kubeletConfigDir }}/plugins/{{ .Values.driverName }} + mountPropagation: "Bidirectional" + - name: csi-path + mountPath: {{ .Values.kubeletConfigDir }}/plugins/kubernetes.io/csi + mountPropagation: "Bidirectional" + - name: dev + mountPath: /dev + - name: usr-bin + mountPath: /usr-bin + - name: var-run + mountPath: /var/run + - name: powerstore-config-params + mountPath: /powerstore-config-params + {{- end }} + {{- end }} + {{- if hasKey .Values "dev" }} + {{ if .Values.dev.enableTracing }}{{- include "pstore.tracing" . | nindent 8 }}{{ end }} + {{- end}} - name: driver securityContext: privileged: true capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: {{ required "Must provide the PowerStore driver container image." .Values.images.driver }} - imagePullPolicy: Always + image: {{ required "Must provide the Powerstore driver image repository." .Values.images.driver }} + imagePullPolicy: {{ .Values.imagePullPolicy }} command: [ "/csi-powerstore" ] env: + {{- if hasKey .Values "dev" }} + - name: ENABLE_TRACING + value: {{ .Values.dev.enableTracing | quote}} + {{ if .Values.dev.enableTracing }}{{- include "pstore.tracingenvvars" . | nindent 12 }}{{ end }} + {{- end}} - name: CSI_ENDPOINT - value: /var/run/csi/node-csi.sock + value: unix://{{ .Values.kubeletConfigDir }}/plugins/{{ .Values.driverName }}/csi_sock - name: X_CSI_MODE value: node - - name: X_CSI_DEBUG - value: "true" - name: X_CSI_POWERSTORE_KUBE_NODE_NAME valueFrom: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - name: X_CSI_POWERSTORE_NODE_NAME_PREFIX - value: {{ .Values.nodeNamePrefix }} + value: {{ .Values.node.nodeNamePrefix }} - name: X_CSI_POWERSTORE_NODE_ID_PATH value: /node-id + - name: X_CSI_POWERSTORE_MAX_VOLUMES_PER_NODE + value: "{{ .Values.maxPowerstoreVolumesPerNode }}" - name: X_CSI_POWERSTORE_NODE_CHROOT_PATH value: /noderoot - name: X_CSI_POWERSTORE_TMP_DIR - value: /var/lib/kubelet/plugins/{{ .Values.driverName }}/tmp + value: {{ .Values.kubeletConfigDir }}/plugins/{{ .Values.driverName }}/tmp - name: X_CSI_DRIVER_NAME value: {{ .Values.driverName }} - name: X_CSI_FC_PORTS_FILTER_FILE_PATH value: {{ .Values.nodeFCPortsFilterFile }} - - name: X_CSI_ENABLE_TRACING - value: "false" - - name: X_CSI_DRIVER_NAME - value: {{ .Values.driverName }} {{- if eq .Values.connection.enableCHAP true }} - name: X_CSI_POWERSTORE_ENABLE_CHAP value: "true" @@ -143,20 +214,38 @@ spec: {{- end }} - name: X_CSI_POWERSTORE_CONFIG_PATH value: /powerstore-config/config + - name: X_CSI_POWERSTORE_CONFIG_PARAMS_PATH + value: /powerstore-config-params/driver-config-params.yaml + - name: GOPOWERSTORE_DEBUG + value: "true" + {{- if hasKey .Values.node "healthMonitor" }} + {{- if eq .Values.node.healthMonitor.enabled true}} + - name: X_CSI_HEALTH_MONITOR_ENABLED + value: "{{ .Values.controller.healthMonitor.enabled }}" + {{- end }} + {{- end }} + {{- if hasKey .Values "podmon" }} + - name: X_CSI_PODMON_ENABLED + value: "{{ .Values.podmon.enabled }}" + {{- if eq .Values.podmon.enabled true }} + {{- range $key, $value := .Values.podmon.node.args }} + {{- if contains "--arrayConnectivityPollRate" $value }} + - name: X_CSI_PODMON_ARRAY_CONNECTIVITY_POLL_RATE + value: "{{ (split "=" $value)._1 }}" + {{- end }} + {{- end }} + {{- end }} + {{- end }} + - name: X_CSI_PODMON_API_PORT + value: "{{ .Values.podmonAPIPort }}" volumeMounts: - name: driver-path - mountPath: /var/lib/kubelet/plugins/{{ .Values.driverName }} + mountPath: {{ .Values.kubeletConfigDir }}/plugins/{{ .Values.driverName }} - name: csi-path - mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi + mountPath: {{ .Values.kubeletConfigDir }}/plugins/kubernetes.io/csi mountPropagation: "Bidirectional" - name: pods-path - mountPath: /var/lib/kubelet/pods - mountPropagation: "Bidirectional" - - name: stg - mountPath: /dev/stg - mountPropagation: "Bidirectional" - - name: mnt - mountPath: /dev/mnt + mountPath: {{ .Values.kubeletConfigDir }}/pods mountPropagation: "Bidirectional" - name: dev mountPath: /dev @@ -174,29 +263,43 @@ spec: mountPath: /noderoot - name: powerstore-config mountPath: /powerstore-config + - name: powerstore-config-params + mountPath: /powerstore-config-params + - name: registrar + image: {{ required "Must provide the CSI node registrar container image." .Values.images.registrar }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" + - --kubelet-registration-path={{ .Values.kubeletConfigDir }}/plugins/{{ .Values.driverName }}/csi_sock + env: + - name: ADDRESS + value: /csi/csi_sock + - name: KUBE_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + volumeMounts: + - name: registration-dir + mountPath: /registration + - name: driver-path + mountPath: /csi volumes: - name: registration-dir hostPath: - path: /var/lib/kubelet/plugins_registry/ + path: {{ .Values.kubeletConfigDir }}/plugins_registry/ type: DirectoryOrCreate - name: driver-path hostPath: - path: /var/lib/kubelet/plugins/{{ .Values.driverName }} + path: {{ .Values.kubeletConfigDir }}/plugins/{{ .Values.driverName }} type: DirectoryOrCreate - name: csi-path hostPath: - path: /var/lib/kubelet/plugins/kubernetes.io/csi + path: {{ .Values.kubeletConfigDir }}/plugins/kubernetes.io/csi - name: pods-path hostPath: - path: /var/lib/kubelet/pods - type: Directory - - name: stg - hostPath: - path: /dev/stg - type: Directory - - name: mnt - hostPath: - path: /dev/mnt + path: {{ .Values.kubeletConfigDir }}/pods type: Directory - name: dev hostPath: @@ -204,7 +307,7 @@ spec: type: Directory - name: node-id hostPath: - path: {{ required "Must provide the path to file with node identifier." .Values.nodeIDPath }} + path: {{ required "Must provide the path to file with node identifier." .Values.node.nodeIDPath }} type: File - name: etciscsi hostPath: @@ -226,6 +329,25 @@ spec: hostPath: path: /run type: Directory + - name: powerstore-config-params + configMap: + name: {{ .Release.Name }}-config-params - name: powerstore-config secret: - secretName: powerstore-config + secretName: {{ .Release.Name }}-config + {{- if hasKey .Values "podmon" }} + {{- if eq .Values.podmon.enabled true }} + - name: usr-bin + hostPath: + path: /usr/bin + type: Directory + - name: kubelet-pods + hostPath: + path: /var/lib/kubelet/pods + type: Directory + - name: var-run + hostPath: + path: /var/run + type: Directory + {{ end }} + {{ end }} \ No newline at end of file diff --git a/tests/sanity/helm/sanity-csi-powerstore/values.yaml b/tests/sanity/helm/sanity-csi-powerstore/values.yaml index 06c664e8..d1951080 100644 --- a/tests/sanity/helm/sanity-csi-powerstore/values.yaml +++ b/tests/sanity/helm/sanity-csi-powerstore/values.yaml @@ -1,6 +1,6 @@ # # -# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,55 +14,337 @@ # # -# "driverName" defines the name of driver (provisioner) -driverName: "csi-powerstore.dellemc.com" - -# "powerStoreApi" defines the full path to PowerStore API -# Example: https://127.0.0.1/api/rest -powerStoreApi: - -# "powerStoreApiUser" defines username for PowerStore API -powerStoreApiUser: +## K8S/DRIVER ATTRIBUTES +######################## -# "powerStoreApiPassword" defines password for PowerStore API -powerStoreApiPassword: - -# "volumeNamePrefix" defines a string prepended to each volume created by the CSI driver. -volumeNamePrefix: csi +# driverName: defines the name of driver +# Allowed values: string +# Default value: None +driverName: "csi-powerstore.dellemc.com" +# "version" is used to verify the values file matches driver version +# Not recommend to change +version: v2.9.0 -# "nodeNamePrefix" defines a string prepended to each node registered by the CSI driver. -nodeNamePrefix: csi-node +# "images" defines every container images used for the driver and its sidecars. +# To use your own images, or a private registry, change the values here. +images: + # "driver" defines the container image, used for the driver container. + driver: dellemc/csi-powerstore:v2.9.0 + # CSI sidecars + attacher: registry.k8s.io/sig-storage/csi-attacher:v4.4.2 + provisioner: registry.k8s.io/sig-storage/csi-provisioner:v3.6.2 + snapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v6.3.2 + resizer: registry.k8s.io/sig-storage/csi-resizer:v1.9.2 + registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.9.1 + healthmonitor: registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.10.0 -# "nodeIDPath" defines the path to file with node identifier (e.g. /etc/machine-id, /etc/hostname). -nodeIDPath: /etc/machine-id + # CSM sidecars + replication: dellemc/dell-csi-replicator:v1.7.0 + vgsnapshotter: dellemc/csi-volumegroup-snapshotter:v1.4.0 + podmon: dellemc/podmon:v1.8.0 + metadataretriever: dellemc/csi-metadata-retriever:v1.6.0 -# "transportProtocol" enables you to be able to force the transport protocol. -# Valid values are: "FC", "ISCSI", "auto", "". If "" or "auto", will choose FC if both are available. -transportProtocol: ISCSI +# Specify kubelet config dir path. +# Ensure that the config.yaml file is present at this path. +# Default value: None +kubeletConfigDir: /var/lib/kubelet -# "nodeFCPortsFilterFile" is the name of the environment variable which store path to the file which +# nodeFCPortsFilterFile: It is the name of the environment variable which store path to the file which # provide list of WWPN which should be used by the driver for FC connection on this node -# example: +# If file not exist or empty or in invalid format, then the driver will use all available FC ports +# Allowed Values: string +# Default Value: None +# Example: # content of the file: # 21:00:00:29:ff:48:9f:6e,21:00:00:29:ff:48:9f:6e -# If file not exist or empty or in invalid format, then the driver will use all available FC ports nodeFCPortsFilterFile: /etc/fc-ports-filter -# The installation process will generate multiple storageclasses based on these parameters. -# Only the primary storageclass for the driver will be marked default if specified. -storageClass: - # "storageClass.name" defines the name of the storage class to be defined. - name: powerstore +# externalAccess: allows to specify additional entries for hostAccess of NFS volumes. Both single IP address and subnet are valid entries. +# Allowed Values: x.x.x.x/xx or x.x.x.x +# Default Value: None +externalAccess: - # "storageClass.isDefault" defines whether the primary storage class should be the # default. - isDefault: "true" +# imagePullPolicy: Policy to determine if the image should be pulled prior to starting the container. +# Allowed values: +# Always: Always pull the image. +# IfNotPresent: Only pull the image if it does not already exist on the node. +# Never: Never pull the image. +# Default value: None +imagePullPolicy: IfNotPresent - # "storageClass.reclaimPolicy" defines what will happen when a volume is - # removed from the Kubernetes API. Valid values are "Retain" and "Delete". - reclaimPolicy: Delete +# maxPowerstoreVolumesPerNode: Specify default value for maximum number of volumes that controller can publish to the node. +# If value is zero CO SHALL decide how many volumes of this type can be published by the controller to the node. +# This limit is applicable to all the nodes in the cluster for which node label 'max-powerstore-volumes-per-node' is not set. +# Allowed values: n, where n >= 0 +# Default value: 0 +maxPowerstoreVolumesPerNode: 0 -# IT IS RECOMMENDED YOU DO NOT CHANGE THE IMAGES TO BE DOWNLOADED. -images: - # "images.driver" defines the container images used for the driver container. - driver: +# nfsAcls: enables setting permissions on NFS mount directory +# This value acts as default value for NFS ACL (nfsAcls), if not specified for an array config in secret +# Permissions can be specified in two formats: +# 1) Unix mode (NFSv3) +# 2) NFSv4 ACLs (NFSv4) +# NFSv4 ACLs are supported on NFSv4 share only. +# Allowed values: +# 1) Unix mode: valid octal mode number +# Examples: "0777", "777", "0755" +# 2) NFSv4 acls: valid NFSv4 acls, seperated by comma +# Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy" +# Optional: true +# Default value: "0777" +nfsAcls: "0777" + +# podmonAPIPort: Defines the port to be used within the kubernetes cluster +# Allowed values: +# Any valid and free port. +# Default value: 8083 +podmonAPIPort: 8083 + +# controller: configure controller specific parameters +controller: + # controllerCount: defines the number of csi-powerstore controller pods to deploy to + # the Kubernetes release. + # Allowed values: n, where n > 0 + # Default value: None + controllerCount: 2 + + # volumeNamePrefix: defines a string prepended to each volume created by the CSI driver. + # Allowed values: string + # Default value: None + volumeNamePrefix: csivol + + # vgsnapshot: allows to configure volume-group-snapshot + # volume-group-snapshot CRDs must be installed before installing driver + vgsnapshot: + # enabled: Enable/Disable volume-group-snapshot feature + # Allowed values: + # true: enable volume-group-snapshot feature(install vg-snapshotter sidecar) + # false: disable volume-group-snapshot feature(do not install vg-snapshotter sidecar) + # Default value: false + enabled: false + + # snapshot: allows to enable/disable snapshot feature + # snapshot CRDs needs to be installed before enabling this feature + snapshot: + # enabled: Enable/Disable volume snapshot feature + # Allowed values: + # true: enable volume snapshot feature(install snapshotter sidecar) + # false: disable volume snapshot feature(do not install snapshotter sidecar) + # Default value: None + enabled: true + + # snapNamePrefix: Prefix to apply to the names of a created snapshots + # Allowed values: string + # Default value: None + snapNamePrefix: csisnap + # resizer: allows to enable/disable resizer feature + resizer: + # enabled: Enable/Disable volume expansion feature + # Allowed values: + # true: enable volume expansion feature(install resizer sidecar) + # false: disable volume expansion feature(do not install resizer sidecar) + # Default value: true + enabled: true + + healthMonitor: + # enabled: Enable/Disable health monitor of CSI volumes + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: false + enabled: false + + # interval: Interval of monitoring volume health condition + # Allowed values: Number followed by unit (s,m,h) + # Examples: 60s, 5m, 1h + # Default value: 60s + interval: 60s + + # replication: allows to configure replication + # Replication CRDs must be installed before installing driver + replication: + # enabled: Enable/Disable replication feature + # Allowed values: + # true: enable replication feature(install dell-csi-replicator sidecar) + # false: disable replication feature(do not install dell-csi-replicator sidecar) + # Default value: false + enabled: false + + # replicationContextPrefix: prefix to use for naming of resources created by replication feature + # Allowed values: string + # Default value: powerstore + replicationContextPrefix: "powerstore" + + # replicationPrefix: prefix to prepend to storage classes parameters + # Allowed values: string + # Default value: replication.storage.dell.com + replicationPrefix: "replication.storage.dell.com" + + # nodeSelector: Define node selection constraints for controller pods. + # For the pod to be eligible to run on a node, the node must have each + # of the indicated key-value pairs as labels. + # Leave as blank to consider all nodes + # Allowed values: map of key-value pairs + # Default value: None + 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 + + # tolerations: Define tolerations for the controllers, if required. + # 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 + # tolerations: + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + +# node: configure node pod specific parameters +node: + # nodeNamePrefix: defines a string prepended to each node registered by the CSI driver. + # Allowed values: string + # Default value: None + nodeNamePrefix: csi-node + + # nodeIDPath: defines the path to file with node identifier (e.g. /etc/machine-id, /etc/hostname). + # Allowed values: string + # Default value: None + nodeIDPath: /etc/machine-id + + healthMonitor: + # enabled: Enable/Disable health monitor of CSI volumes- volume usage, volume condition + # Allowed values: + # true: enable checking of health condition of CSI volumes + # false: disable checking of health condition of CSI volumes + # Default value: None + enabled: false + + # nodeSelector: Define node selection constraints for node pods. + # For the pod to be eligible to run on a node, the node must have each + # of the indicated key-value pairs as labels. + # Leave as blank to consider all nodes + # Allowed values: map of key-value pairs + # Default value: None + 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 + + # tolerations: Define tolerations for the node pods, if required. + # Leave as blank to consider all 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 + # tolerations: + # - key: "node-role.kubernetes.io/control-plane" + # operator: "Exists" + # effect: "NoSchedule" + + # Uncomment if CSM for Resiliency and CSI Driver pods monitor are enabled + # tolerations: + # - key: "offline.vxflexos.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "vxflexos.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.unity.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "unity.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.isilon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "isilon.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "offline.powerstore.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + # - key: "powerstore.podmon.storage.dell.com" + # operator: "Exists" + # effect: "NoSchedule" + +## PLATFORM ATTRIBUTES +###################### + +# connection: allows to configure connection to storage array +connection: + # connection.enableCHAP: allows to enable CHAP for iSCSI connections + # CHAP password will be autogenerated by driver + # Allowed values: + # true : enable CHAP + # false: disable CHAP + # Default value: false + enableCHAP: false + +# CSI driver log level +# Allowed values: "error", "warn"/"warning", "info", "debug", "error" +# Default value: "debug" +logLevel: "debug" + +# CSI driver log format +# Allowed values: "TEXT" or "JSON" +# Default value: "JSON" +logFormat: "JSON" + +# Following modes are supported: None, File and ReadWriteOnceWithFSType +fsGroupPolicy: ReadWriteOnceWithFSType + +# Allows the controller to round off filesystem to 3Gi which is the minimum supported value +allowAutoRoundOffFilesystemSize: false + +# Storage Capacity Tracking +# Note: Capacity tracking is supported in kubernetes v1.24 and above, this feature will be automatically disabled in older versions. +storageCapacity: + # enabled : Enable/Disable storage capacity tracking + # Allowed values: + # true: enable storage capacity tracking + # false: disable storage capacity tracking + # Default value: true + enabled: true + # pollInterval : Configure how often external-provisioner polls the driver to detect changed capacity + # Allowed values: 1m,2m,3m,...,10m,...,60m etc + # Default value: 5m + pollInterval: 5m + +# Enable this feature only after contact support for additional information +podmon: + enabled: false + controller: + args: + - "--csisock=unix:/var/run/csi/csi.sock" + - "--labelvalue=csi-powerstore" + - "--arrayConnectivityPollRate=60" + - "--driverPath=csi-powerstore.dellemc.com" + - "--mode=controller" + - "--skipArrayConnectionValidation=false" + - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" + node: + args: + - "--csisock=unix:/var/lib/kubelet/plugins/csi-powerstore.dellemc.com/csi_sock" + - "--labelvalue=csi-powerstore" + - "--arrayConnectivityPollRate=60" + - "--driverPath=csi-powerstore.dellemc.com" + - "--mode=node" + - "--leaderelection=false" + - "--driver-config-params=/powerstore-config-params/driver-config-params.yaml" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" \ No newline at end of file diff --git a/tests/sanity/helm/secret.yaml b/tests/sanity/helm/secret.yaml index aa4f0cb7..1994f5b7 100644 --- a/tests/sanity/helm/secret.yaml +++ b/tests/sanity/helm/secret.yaml @@ -1,6 +1,6 @@ # # -# Copyright © 2021-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Copyright © 2021-2024 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,12 +14,80 @@ # # -apiVersion: v1 -kind: Secret -metadata: - name: powerstore-config - # Set driver namespace - namespace: sanity -type: Opaque -data: - config: CONFIG_YAML +# You can apply current config to Kubernetes cluster by running following command: +# +# kubectl create secret generic powerstore-config -n csi-powerstore --from-file=config=secret.yaml +# +arrays: + # endpoint: full URL path to the PowerStore API + # Allowed Values: https://*.*.*.*/api/rest or https://abc.com/api/rest + # Default Value: None + - endpoint: "https://10.0.0.1/api/rest" + + # globalID: unique id of the PowerStore array + # Allowed Values: string + # Default Value: None + globalID: "unique" + + # username: username for connecting to API + # Allowed Values: string + # Default Value: None + username: "user" + + # password: password for connecting to API + # Allowed Values: string + # Default Value: None + password: "password" + + # skipCertificateValidation: indicates if client side validation of (management)server's certificate can be skipped + # Allowed Values: + # true: client side validation of (management)server's certificate will be skipped + # false: client side validation of (management)server's certificate will not be skipped + # Default Value: None + skipCertificateValidation: true + + # isDefault: treat current array as a default + # Allowed Values: + # true: would be used by storage classes without arrayID parameter + # false: would not be used by default + # Default Value: false + isDefault: true + + # blockProtocol: what SCSI transport protocol use on node side (FC, ISCSI, NVMeTCP, NVMeFC, None, or auto) + # Allowed Values: + # FC: FC protocol will be used + # ISCSI: iSCSI protocol will be used + # NVMeTCP: NVMe/TCP protocol will be used + # NVMeFC: NVMe/FC protocol will be used + # None: No block protocol can be used + # auto: NVMeFC, NVMe/TCP, FC or iSCSI protocol will be used + # Default Value: None + blockProtocol: "auto" + + # nasName: what NAS should be used for NFS volumes + # Allowed Values: string - (name of NAS server) + # Default Value: None + nasName: "nas-server" + + # nfsAcls: enables setting permissions on NFS mount directory + # This value will be used if a storage class does not have the NFS ACL (nfsAcls) parameter specified + # Permissions can be specified in two formats: + # 1) Unix mode (NFSv3) + # 2) NFSv4 ACLs (NFSv4) + # NFSv4 ACLs are supported on NFSv4 share only. + # Allowed values: + # 1) Unix mode: valid octal mode number + # Examples: "0777", "777", "0755" + # 2) NFSv4 acls: valid NFSv4 acls, seperated by comma + # Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy" + # Optional: true + # Default value: "0777" + # nfsAcls: "0777" + + # To add more PowerStore arrays, uncomment the following lines and provide the required values + #- endpoint: "https://11.0.0.1/api/rest" + # globalID: "unique" + # username: "user" + # password: "password" + # skipCertificateValidation: true + # blockProtocol: "FC" \ No newline at end of file diff --git a/tests/sanity/install-sanity.sh b/tests/sanity/install-sanity.sh index 4b55eebb..99695760 100755 --- a/tests/sanity/install-sanity.sh +++ b/tests/sanity/install-sanity.sh @@ -1,7 +1,7 @@ #!/bin/sh # # -# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ IMAGE=$1 kubectl create ns sanity -sed "s/CONFIG_YAML/`cat helm/config.yaml|base64 -w0`/g" helm/new-secret.yaml | kubectl apply -f - +kubectl create secret generic csi-sanity-pstore-config -n sanity --from-file=config=helm/secret.yaml # Create controller and noce driver instances helm_command="helm install --values ./myvalues.yaml --name-template csi-sanity-pstore --namespace sanity ./helm/sanity-csi-powerstore --wait --timeout 180s" echo "Helm install command:" diff --git a/tests/sanity/test.sh b/tests/sanity/test.sh index 56b96759..659e7bae 100755 --- a/tests/sanity/test.sh +++ b/tests/sanity/test.sh @@ -1,7 +1,7 @@ #!/bin/sh # # -# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,27 +28,17 @@ kubectl run csi-sanity --image=$IMAGE --overrides=' "stdinOnce": true, "tty": true, "command": ["/app/csi-sanity/csi-sanity"], - "args": ["--ginkgo.v", "--csi.endpoint=/node.sock", "--csi.controllerendpoint=/controller.sock", "--csi.mountdir=/dev/mnt", "--csi.stagingdir=/dev/stg"], + "args": ["--ginkgo.v", "--csi.endpoint=/csi.sock", "--csi.mountdir=/dev/mnt", "--csi.stagingdir=/dev/stg"], "volumeMounts": [{ - "name": "controller", - "mountPath": "/controller.sock" - }, - { - "name": "node", - "mountPath": "/node.sock" + "name": "socket", + "mountPath": "/csi.sock" }] } ], "volumes": [{ - "name":"controller", - "hostPath":{ - "path": "/var/run/csi/controller-csi.sock" - } - }, - { - "name":"node", + "name":"socket", "hostPath":{ - "path": "/var/run/csi/node-csi.sock" + "path": "/var/lib/kubelet/plugins/csi-powerstore.dellemc.com/csi_sock" } }] }