From fa20feb1c5a645e3158537ff9b34a88cbecb7369 Mon Sep 17 00:00:00 2001 From: Harish P Date: Mon, 28 Oct 2024 12:15:02 +0530 Subject: [PATCH] Added array configmap params for powermax (#543) * Added array configmap params for powermax Signed-off-by: Harish P * Added array configmap creation Signed-off-by: Harish P * lint fix Signed-off-by: Harish P * updated array config * updated array config * added configmap to create automatically Signed-off-by: Harish P * updated image pull policy * lint fix * lint fix * lint fix * lintfix * lint fix --------- Signed-off-by: Harish P --- charts/csi-powermax/templates/controller.yaml | 13 ++--- charts/csi-powermax/templates/node.yaml | 13 ++--- .../templates/powermax-array-config.yaml | 11 ++++ charts/csi-powermax/values.yaml | 50 +++++++++++-------- 4 files changed, 53 insertions(+), 34 deletions(-) create mode 100644 charts/csi-powermax/templates/powermax-array-config.yaml diff --git a/charts/csi-powermax/templates/controller.yaml b/charts/csi-powermax/templates/controller.yaml index efcf7e1c..0bac5566 100644 --- a/charts/csi-powermax/templates/controller.yaml +++ b/charts/csi-powermax/templates/controller.yaml @@ -414,8 +414,6 @@ spec: value: /var/run/csi/csi.sock - name: X_CSI_MODE value: controller - - name: X_CSI_MANAGED_ARRAYS - value: {{ $arraysStr | replace " " "," | quote }} - name: X_CSI_POWERMAX_USER valueFrom: secretKeyRef: @@ -428,6 +426,8 @@ spec: key: password - name: X_CSI_POWERMAX_CONFIG_PATH value: /powermax-config-params/driver-config-params.yaml + - name: X_CSI_POWERMAX_ARRAY_CONFIG_PATH + value: /powermax-array-config/powermax-array-config.yaml - name: X_CSI_POWERMAX_DEBUG value: {{ .Values.powerMaxDebug | default "false" | lower | quote }} - name: X_CSI_POWERMAX_SKIP_CERTIFICATE_VALIDATION @@ -439,14 +439,10 @@ spec: - name: X_CSI_POWERMAX_PROXY_SERVICE_NAME value: {{ .Release.Name }}-reverseproxy {{- end }} - - name: X_CSI_POWERMAX_PORTGROUPS - value: {{ .Values.portGroups | toJson }} - name: X_CSI_K8S_CLUSTER_PREFIX value: {{ required "Must provide a Cluster Prefix." .Values.clusterPrefix }} - name: X_CSI_GRPC_MAX_THREADS value: "50" - - name: X_CSI_TRANSPORT_PROTOCOL - value: {{ .Values.transportProtocol | default "" }} - name: SSL_CERT_DIR value: /certs - name: X_CSI_IG_NODENAME_TEMPLATE @@ -509,6 +505,8 @@ spec: readOnly: true - name: powermax-config-params mountPath: /powermax-config-params + - name: powermax-array-config + mountPath: /powermax-array-config {{- if eq .Values.csireverseproxy.deployAsSidecar true }} - name: reverseproxy image: {{ required "Must provided an image for reverseproxy container." .Values.images.csireverseproxy }} @@ -546,6 +544,9 @@ spec: - name: tls-secret secret: secretName: {{ .Values.csireverseproxy.tlsSecret }} + - name: powermax-array-config + configMap: + name: {{ .Release.Name }}-array-config - name: cert-dir emptyDir: - name: powermax-config-params diff --git a/charts/csi-powermax/templates/node.yaml b/charts/csi-powermax/templates/node.yaml index faeb348d..ede26302 100644 --- a/charts/csi-powermax/templates/node.yaml +++ b/charts/csi-powermax/templates/node.yaml @@ -153,8 +153,6 @@ spec: value: "{{ .Values.maxPowerMaxVolumesPerNode }}" - name: X_CSI_PRIVATE_MOUNT_DIR value: "{{ .Values.kubeletConfigDir }}/plugins/powermax.emc.dell.com/disks" - - name: X_CSI_MANAGED_ARRAYS - value: {{ $arraysStr | replace " " "," | quote }} {{- $managementServer := first .Values.global.managementServers }} - name: X_CSI_POWERMAX_ENDPOINT value: {{ required "Must provide a Unisphere HTTPS endpoint." $managementServer.endpoint }} @@ -199,20 +197,18 @@ spec: value: {{ .Values.ISCSIChroot | default "/noderoot" }} - name: X_CSI_GRPC_MAX_THREADS value: "50" - - name: X_CSI_TRANSPORT_PROTOCOL - value: {{ .Values.transportProtocol | default "" }} - name: SSL_CERT_DIR value: /certs - name: X_CSI_POWERMAX_CONFIG_PATH value: /powermax-config-params/driver-config-params.yaml + - name: X_CSI_POWERMAX_ARRAY_CONFIG_PATH + value: /powermax-array-config/powermax-array-config.yaml - name: X_CSI_POWERMAX_TOPOLOGY_CONFIG_PATH value: /node-topology-config/topologyConfig.yaml - name: X_CSI_IG_NODENAME_TEMPLATE value: {{ .Values.nodeNameTemplate | default "" }} - name: X_CSI_IG_MODIFY_HOSTNAME value: {{ .Values.modifyHostName | default "false" | lower | quote }} - - name: X_CSI_POWERMAX_PORTGROUPS - value: {{ .Values.portGroups | toJson }} {{- if hasKey .Values.node "healthMonitor" }} {{- if eq .Values.node.healthMonitor.enabled true }} - name: X_CSI_HEALTH_MONITOR_ENABLED @@ -284,6 +280,8 @@ spec: mountPath: /run/dbus/system_bus_socket - name: powermax-config-params mountPath: /powermax-config-params + - name: powermax-array-config + mountPath: /powermax-array-config {{- if hasKey .Values.node "topologyControl" }} {{- if eq .Values.node.topologyControl.enabled true }} - name: node-topology-config @@ -477,6 +475,9 @@ spec: - name: powermax-config-params configMap: name: {{ .Release.Name }}-config-params + - name: powermax-array-config + configMap: + name: {{ .Release.Name }}-array-config - name: certs secret: secretName: {{ .Release.Name }}-certs diff --git a/charts/csi-powermax/templates/powermax-array-config.yaml b/charts/csi-powermax/templates/powermax-array-config.yaml new file mode 100644 index 00000000..6c23b268 --- /dev/null +++ b/charts/csi-powermax/templates/powermax-array-config.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-array-config + namespace: {{ .Release.Namespace }} +data: + powermax-array-config.yaml: | + X_CSI_POWERMAX_PORTGROUPS: {{ .Values.global.portGroups | toYaml | default "" }} + X_CSI_TRANSPORT_PROTOCOL: {{ .Values.global.transportProtocol | toYaml | default "" }} + X_CSI_POWERMAX_ENDPOINT: {{ .Values.global.endpoint | toYaml | default "" }} + X_CSI_MANAGED_ARRAYS: {{ .Values.global.managedArrays | toYaml | default "" }} diff --git a/charts/csi-powermax/values.yaml b/charts/csi-powermax/values.yaml index 785a8b01..3642c860 100644 --- a/charts/csi-powermax/values.yaml +++ b/charts/csi-powermax/values.yaml @@ -9,15 +9,39 @@ global: # Allowed values: "TEXT" or "JSON" # Default value: "TEXT" logFormat: "TEXT" - ########################## # PLATFORM ATTRIBUTES ########################## # The CSI PowerMax ReverseProxy section to fill out the required configuration # Please refer to the doc website about a # detailed explanation of each configuration parameter - + # X_CSI_MANAGED_ARRAYS: Serial ID of the arrays that will be used for provisioning + # Default value: None + # Examples: "000000000001", "000000000002" + managedArrays: "000000000001,000000000002" + # X_CSI_POWERMAX_ENDPOINT: Address of the Unisphere server that is managing the PowerMax arrays + # In case of multi-array, provide an endpoint of locally attached array + # Default value: None + # Example: https://0.0.0.1:8443 + endpoint: + # defaultCredentialsSecret defaultCredentialsSecret: powermax-creds + # portGroups: Define the set of existing port groups that the driver will use. + # It is a comma separated list of portgroup names. + # Required only in case of iSCSI port groups + # Allowed values: iSCSI Port Group names + # Default value: None + # Examples: "pg1, pg2, pg3", "pg1" + portGroups: + # "transportProtocol" can be "FC" or "FIBRE" for fibrechannel, + # "ISCSI" for iSCSI, or "" for autoselection. + # Allowed values: + # "FC" - Fiber Channel protocol + # "FIBER" - Fiber Channel protocol + # "ISCSI" - iSCSI protocol + # "" - Automatic selection of transport protocol + # Default value: "" + transportProtocol: "" storageArrays: - storageArrayId: "000000000001" endpoint: https://primary-1.unisphe.re:8443 @@ -54,8 +78,8 @@ version: "v2.11.0" # 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-powermax:v2.11.0 - csireverseproxy: dellemc/csipowermax-reverseproxy:v2.10.0 + driver: quay.io/dell/container-storage-modules/csi-powermax:nightly # TODO replace nightly with the latest release tag after release + csireverseproxy: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:nightly # TODO replace nightly with the latest release tag after release # CSI sidecars attacher: registry.k8s.io/sig-storage/csi-attacher:v4.6.1 provisioner: registry.k8s.io/sig-storage/csi-provisioner:v5.0.1 @@ -315,14 +339,6 @@ csireverseproxy: # Examples: "XYZ" clusterPrefix: ABC -# portGroups: Define the set of existing port groups that the driver will use. -# It is a comma separated list of portgroup names. -# Required only in case of iSCSI port groups -# Allowed values: iSCSI Port Group names -# Default value: None -# Examples: "pg1, pg2, pg3", "pg1" - -portGroups: PortGroup1, PortGroup2, PortGroup3 # "skipCertificateValidation" determines if driver is going to skip verification # of TLS certificates while connecting to Unisphere RESTAPI interface @@ -335,16 +351,6 @@ portGroups: PortGroup1, PortGroup2, PortGroup3 # Default value: "true" skipCertificateValidation: "true" -# "transportProtocol" can be "FC" or "FIBRE" for fibrechannel, -# "ISCSI" for iSCSI, or "" for autoselection. -# Allowed values: -# "FC" - Fiber Channel protocol -# "FIBER" - Fiber Channel protocol -# "ISCSI" - iSCSI protocol -# "" - Automatic selection of transport protocol -# Default value: "" -transportProtocol: "" - # "powerMaxDebug" enables low level and http traffic logging # between the CSI driver and Unisphere. # Do not enable this unless asked to do so by the support team.