Skip to content

Commit

Permalink
Added array configmap params for powermax (#543)
Browse files Browse the repository at this point in the history
* Added array configmap params for powermax

Signed-off-by: Harish P <[email protected]>

* Added array configmap creation

Signed-off-by: Harish P <[email protected]>

* lint fix

Signed-off-by: Harish P <[email protected]>

* updated array config

* updated array config

* added configmap to create automatically

Signed-off-by: Harish P <[email protected]>

* updated image pull policy

* lint fix

* lint fix

* lint fix

* lintfix

* lint fix

---------

Signed-off-by: Harish P <[email protected]>
  • Loading branch information
harishp8889 authored Oct 28, 2024
1 parent 21f21f8 commit fa20feb
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 34 deletions.
13 changes: 7 additions & 6 deletions charts/csi-powermax/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions charts/csi-powermax/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions charts/csi-powermax/templates/powermax-array-config.yaml
Original file line number Diff line number Diff line change
@@ -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 "" }}
50 changes: 28 additions & 22 deletions charts/csi-powermax/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "" <empty>
transportProtocol: ""
storageArrays:
- storageArrayId: "000000000001"
endpoint: https://primary-1.unisphe.re:8443
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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: "" <empty>
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.
Expand Down

0 comments on commit fa20feb

Please sign in to comment.