From 4483e19e008dfb44587e518e8b67b0a7bbdc36b8 Mon Sep 17 00:00:00 2001 From: coulof Date: Fri, 18 Aug 2023 05:02:19 -0400 Subject: [PATCH] One place to configure all images --- charts/csi-powermax/templates/_helpers.tpl | 51 ------------------- charts/csi-powermax/templates/controller.yaml | 21 ++++---- charts/csi-powermax/templates/csidriver.yaml | 2 +- charts/csi-powermax/templates/node.yaml | 8 +-- charts/csi-powermax/values.yaml | 34 ++++++------- 5 files changed, 33 insertions(+), 83 deletions(-) diff --git a/charts/csi-powermax/templates/_helpers.tpl b/charts/csi-powermax/templates/_helpers.tpl index 4cb67bdd..4b10c015 100644 --- a/charts/csi-powermax/templates/_helpers.tpl +++ b/charts/csi-powermax/templates/_helpers.tpl @@ -1,54 +1,3 @@ -{{/* -Return the appropriate sidecar images based on k8s version -*/}} -{{- define "csi-powermax.attacherImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-attacher:v4.3.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-powermax.provisionerImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-provisioner:v3.5.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-powermax.snapshotterImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-snapshotter:v6.2.2" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-powermax.resizerImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-resizer:v1.8.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-powermax.registrarImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.8.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-powermax.healthmonitorImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.9.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - {{- define "csi-powermax.isStorageCapacitySupported" -}} {{- if eq .Values.storageCapacity.enabled true -}} {{- if and (eq .Capabilities.KubeVersion.Major "1") (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}} diff --git a/charts/csi-powermax/templates/controller.yaml b/charts/csi-powermax/templates/controller.yaml index 7785fbf0..0d9feaac 100644 --- a/charts/csi-powermax/templates/controller.yaml +++ b/charts/csi-powermax/templates/controller.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ServiceAccount metadata: @@ -168,7 +169,7 @@ spec: topologyKey: kubernetes.io/hostname containers: - name: attacher - image: {{ required "Must provide the CSI attacher container image." ( include "csi-powermax.attacherImage" . ) }} + image: {{ required "Must provide the CSI attacher container image." .Values.images.attacher }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -183,7 +184,7 @@ spec: - name: socket-dir mountPath: /var/run/csi - name: provisioner - image: {{ required "Must provide the CSI provisioner container image." ( include "csi-powermax.provisionerImage" . ) }} + image: {{ required "Must provide the CSI provisioner container image." .Values.images.provisioner }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -216,7 +217,7 @@ spec: {{- if hasKey .Values.controller "snapshot" }} {{- if eq .Values.controller.snapshot.enabled true }} - name: snapshotter - image: {{ required "Must provide the CSI snapshotter container image." ( include "csi-powermax.snapshotterImage" . ) }} + image: {{ required "Must provide the CSI snapshotter container image." .Values.images.snapshotter }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -235,7 +236,7 @@ spec: {{- end }} {{- if eq .Values.replication.enabled true}} - name: dell-csi-replicator - image: {{ required "Must provide the Dell CSI Replicator Resizer image." .Values.replication.image}} + image: {{ required "Must provide the Dell CSI Replicator Resizer image." .Values.images.replication }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -261,7 +262,7 @@ spec: {{- end }} {{- if eq .Values.migration.enabled true}} - name: dell-csi-migrator - image: {{ required "Must provide the Dell CSI Migrator Resizer image." .Values.migration.image}} + image: {{ required "Must provide the Dell CSI Migrator Resizer image." .Values.images.migration }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -287,7 +288,7 @@ spec: {{- if hasKey .Values.controller "resizer" }} {{- if eq .Values.controller.resizer.enabled true }} - name: resizer - image: {{ required "Must provide the CSI resizer container image." ( include "csi-powermax.resizerImage" . ) }} + image: {{ required "Must provide the CSI resizer container image." .Values.images.resizer }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -306,7 +307,7 @@ spec: {{- if eq .Values.authorization.enabled true }} - name: karavi-authorization-proxy imagePullPolicy: {{ .Values.imagePullPolicy }} - image: {{ required "Must provide the authorization sidecar container image." .Values.authorization.sidecarProxyImage }} + image: {{ required "Must provide the authorization sidecar container image." .Values.images.authorization }} env: - name: PROXY_HOST value: "{{ .Values.authorization.proxyHost }}" @@ -337,7 +338,7 @@ spec: {{- if eq .Values.controller.healthMonitor.enabled true }} - name: csi-external-health-monitor-controller imagePullPolicy: {{ .Values.imagePullPolicy }} - image: {{ required "Must provide the CSI external health monitor controller image." ( include "csi-powermax.healthmonitorImage" . ) }} + image: {{ required "Must provide the CSI external health monitor controller image." .Values.images.healthmonitor }} args: - "--v=5" - "--csi-address=$(ADDRESS)" @@ -355,7 +356,7 @@ spec: {{- end }} {{- end }} - name: driver - image: {{ required "Must provide the PowerMax driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }} + image: {{ required "Must provide the PowerMax driver image repository." .Values.images.driver }} imagePullPolicy: {{ .Values.imagePullPolicy }} command: [ "/csi-powermax.sh" ] args: @@ -459,7 +460,7 @@ spec: mountPath: /powermax-config-params {{- if eq .Values.csireverseproxy.deployAsSidecar true }} - name: reverseproxy - image: {{ required "Must provided an image for reverseproxy container." .Values.csireverseproxy.image }} + image: {{ required "Must provided an image for reverseproxy container." .Values.images.csireverseproxy }} imagePullPolicy: {{ .Values.imagePullPolicy }} env: - name: X_CSI_REVPROXY_CONFIG_DIR diff --git a/charts/csi-powermax/templates/csidriver.yaml b/charts/csi-powermax/templates/csidriver.yaml index 2717b327..88b7c7c7 100644 --- a/charts/csi-powermax/templates/csidriver.yaml +++ b/charts/csi-powermax/templates/csidriver.yaml @@ -4,7 +4,7 @@ metadata: {{- if eq .Values.customDriverName.enabled true}} name: {{ printf "%s-%s" .Release.Namespace .Values.customDriverName.value }} {{- else }} - name: csi-powermax + name: csi-powermax.dellemc.com {{- end }} spec: podInfoOnMount: true diff --git a/charts/csi-powermax/templates/node.yaml b/charts/csi-powermax/templates/node.yaml index 2d91c9b1..8b05dd82 100644 --- a/charts/csi-powermax/templates/node.yaml +++ b/charts/csi-powermax/templates/node.yaml @@ -106,7 +106,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: {{ required "Must provide the PowerMax driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }} + image: {{ required "Must provide the PowerMax driver image repository." .Values.images.driver }} imagePullPolicy: {{ .Values.imagePullPolicy }} command: [ "/csi-powermax.sh" ] env: @@ -245,7 +245,7 @@ spec: {{- end }} {{- end }} - name: registrar - image: {{ required "Must provide the CSI node registrar container image." ( include "csi-powermax.registrarImage" . ) }} + image: {{ required "Must provide the CSI node registrar container image." .Values.images.registrar }} args: - "--v=5" - "--csi-address=$(ADDRESS)" @@ -275,7 +275,7 @@ spec: add: [ "SYS_ADMIN" ] allowPrivilegeEscalation: true imagePullPolicy: {{ .Values.imagePullPolicy }} - image: {{ required "Must provide the node rescanner sidecar container image." .Values.migration.nodeRescanSidecarImage }} + image: {{ required "Must provide the node rescanner sidecar container image." .Values.images.noderescan }} args: - "--csi-address=$(ADDRESS)" - "--retry-interval-start=1s" @@ -313,7 +313,7 @@ spec: {{- if eq .Values.authorization.enabled true }} - name: karavi-authorization-proxy imagePullPolicy: {{ .Values.imagePullPolicy }} - image: {{ required "Must provide the authorization sidecar container image." .Values.authorization.sidecarProxyImage }} + image: {{ required "Must provide the authorization sidecar container image." .Values.images.authorization }} env: - name: PROXY_HOST value: "{{ .Values.authorization.proxyHost }}" diff --git a/charts/csi-powermax/values.yaml b/charts/csi-powermax/values.yaml index 4e449105..57dc3260 100644 --- a/charts/csi-powermax/values.yaml +++ b/charts/csi-powermax/values.yaml @@ -53,7 +53,23 @@ version: "v2.8.0" images: # "driver" defines the container image, used for the driver container. - driverRepository: dellemc + driver: dellemc/csi-powermax:v2.7.0 + csireverseproxy: dellemc/csipowermax-reverseproxy:v2.6.0 + # CSI sidecars + attacher: registry.k8s.io/sig-storage/csi-attacher:v4.3.0 + provisioner: registry.k8s.io/sig-storage/csi-provisioner:v3.5.0 + snapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v6.2.2 + resizer: registry.k8s.io/sig-storage/csi-resizer:v1.8.0 + registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.8.0 + healthmonitor: registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.9.0 + # CSM sidecars + replication: dellemc/dell-csi-replicator:v1.5.0 + authorization: dellemc/csm-authorization-sidecar:v1.7.0 + migration: dellemc/dell-csi-migrator:v1.1.1 + # Node rescan sidecar does a rescan on nodes for identifying new paths + # Default value: dellemc/dell-csi-node-rescanner:v1.0.1 + noderescan: dellemc/dell-csi-node-rescanner:v1.0.1 + ## K8S/DRIVER ATTRIBUTES ######################## # customDriverName: If enabled, sets the driver name to the @@ -260,10 +276,6 @@ enableCHAP: false # csireverseproxy: Refers to the subchart csireverseproxy csireverseproxy: - # image: Define the container images used for the reverse proxy - # Default value: None - # Example: "csipowermax-reverseproxy:v2.7.0" - image: dellemc/csipowermax-reverseproxy:v2.7.0 # "tlsSecret" defines the TLS secret that is created with certificate # and its associated key # Default value: None @@ -380,9 +392,6 @@ openshift: false # Default value: "false" replication: enabled: false - # Change this to use any specific version of the dell-csi-replicator sidecar - # Default value: None - image: dellemc/dell-csi-replicator:v1.5.0 # replicationContextPrefix enables side cars to read # required information from the volume context # Default value: "powermax" @@ -401,12 +410,6 @@ replication: # Default value: "false" migration: enabled: false - # Change this to use any specific version of the dell-csi-migrator sidecar - # Default value: None - image: dellemc/dell-csi-migrator:v1.1.1 - # Node rescan sidecar does a rescan on nodes for identifying new paths - # Default value: dellemc/dell-csi-node-rescanner:v1.0.1 - nodeRescanSidecarImage: dellemc/dell-csi-node-rescanner:v1.0.1 # migrationPrefix: Determine if migration is enabled # Default value: "migration.storage.dell.com" # Examples: "migration.storage.dell.com" @@ -421,9 +424,6 @@ migration: # Default value: "false" authorization: enabled: false - # sidecarProxyImage: the container image used for the csm-authorization-sidecar. - # Default value: dellemc/csm-authorization-sidecar:v1.7.0 - sidecarProxyImage: dellemc/csm-authorization-sidecar:v1.7.0 # proxyHost: hostname of the csm-authorization server # Default value: None proxyHost: