From 8621a19e62cdbd86600bf5ccb46887060e78c554 Mon Sep 17 00:00:00 2001 From: Aaron Tye Date: Tue, 7 Nov 2023 12:53:44 -0500 Subject: [PATCH] [charts/csi-unity] Centralize all images to one place (#312) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * PowerFlex v2.8.0 release (#250) * Centralized images * Adding CSI Powerstore driver’s effective pod security profile for supporting ephemeral volumes as part of Openshift 4.13 support (#261) Co-authored-by: Surya Gupta <109594002+suryagupta4@users.noreply.github.com> * removed externalAccess from powerflex manifests. (#283) * Revert "Adding CSI Powerstore driver’s effective pod security profile for supporting ephemeral volumes as part of Openshift 4.13 support (#261)" (#284) This reverts commit c1dd93b953980d99351488593b343c6903633768. * Bump sidecars versions * Bump up observability version for CSM 1.9 (#314) * Bump-up observability version for CSM 1.9 * add patch verb to powerscale * Add codeowners * update attacher sidecar for powerflex and powerstore. (#315) * [charts/csi-powerstore] Centralize all images to one place (#310) * One place to configure all images * Use latest versions of CSI official sidecars * Set Default container to the driver and avoid podmon logs by default * Fix annotation and remove driverVersion * [charts/csi-powerflex] Centralize all images to one place #263 (#311) * Centralize all images to one place * Use latest CSI sidecars and default container to driver * Add default annotation * Use bleeding edge helm validation action to workaround cosign issue * [charts/csi-powermax] Container images in one place (#309) * One place to configure all images * Fix the csi provisioner to use the full name * Use latest versions of CSI official sidecars * remove duplicate podmon image --------- Co-authored-by: KshitijaKakde <111420075+KshitijaKakde@users.noreply.github.com> Co-authored-by: coulof Co-authored-by: alankar-verma <125348121+alankar-verma@users.noreply.github.com> Co-authored-by: Surya Gupta <109594002+suryagupta4@users.noreply.github.com> Co-authored-by: VamsiSiddu-7 <103578883+VamsiSiddu-7@users.noreply.github.com> Co-authored-by: coulof <49235405+coulof@users.noreply.github.com> Co-authored-by: panigs7 <92028646+panigs7@users.noreply.github.com> --- charts/csi-unity/templates/_helpers.tpl | 51 ---------------------- charts/csi-unity/templates/controller.yaml | 14 +++--- charts/csi-unity/templates/node.yaml | 6 +-- charts/csi-unity/values.yaml | 19 +++++--- 4 files changed, 24 insertions(+), 66 deletions(-) diff --git a/charts/csi-unity/templates/_helpers.tpl b/charts/csi-unity/templates/_helpers.tpl index c20b246f..4031377c 100644 --- a/charts/csi-unity/templates/_helpers.tpl +++ b/charts/csi-unity/templates/_helpers.tpl @@ -1,54 +1,3 @@ -{{/* -Return the appropriate sidecar images based on k8s version -*/}} -{{- define "csi-unity.attacherImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-attacher:v4.3.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-unity.provisionerImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-provisioner:v3.5.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-unity.snapshotterImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-snapshotter:v6.2.2" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-unity.resizerImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-resizer:v1.8.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-unity.registrarImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.8.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-unity.healthmonitorImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.9.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - {{/* Return true if storage capacity tracking is enabled and is supported based on k8s version */}} diff --git a/charts/csi-unity/templates/controller.yaml b/charts/csi-unity/templates/controller.yaml index 2b126072..1f3e2220 100644 --- a/charts/csi-unity/templates/controller.yaml +++ b/charts/csi-unity/templates/controller.yaml @@ -152,7 +152,7 @@ spec: {{- if .Values.podmon.enabled }} - name: podmon imagePullPolicy: {{ .Values.imagePullPolicy }} - image: {{ required "Must provide the podmon container image." .Values.podmon.image }} + image: {{ required "Must provide the podmon container image." .Values.images.podmon }} args: {{- toYaml .Values.podmon.controller.args | nindent 12 }} env: @@ -175,7 +175,7 @@ spec: mountPath: /unity-config {{- end }} - name: attacher - image: {{ required "Must provide the CSI attacher container image." ( include "csi-unity.attacherImage" . ) }} + image: {{ required "Must provide the CSI attacher container image." .Values.images.attacher }} args: - "--csi-address=$(ADDRESS)" - "--v=5" @@ -187,7 +187,7 @@ spec: - name: socket-dir mountPath: /var/run/csi - name: provisioner - image: {{ required "Must provide the CSI provisioner container image." ( include "csi-unity.provisionerImage" . ) }} + image: {{ required "Must provide the CSI provisioner container image." .Values.images.provisioner }} args: - "--csi-address=$(ADDRESS)" - "--volume-name-prefix={{ required "Must provide a Volume Name Prefix." .Values.controller.volumeNamePrefix }}" @@ -220,7 +220,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-unity.snapshotterImage" . ) }} + image: {{ required "Must provide the CSI snapshotter container image. " .Values.images.snapshotter }} args: - "--csi-address=$(ADDRESS)" - "--snapshot-name-prefix={{ required "Must privided a Snapshot Name Prefix" .Values.controller.snapshot.snapNamePrefix }}" @@ -239,7 +239,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-unity.resizerImage" . ) }} + image: {{ required "Must provide the CSI resizer container image." .Values.images.resizer }} args: - "--csi-address=$(ADDRESS)" - "--v=5" @@ -255,7 +255,7 @@ spec: {{- 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 image." ( include "csi-unity.healthmonitorImage" . ) }} + image: {{ required "Must provide the CSI external health monitor image." .Values.images.healthmonitor }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--v=5" @@ -274,7 +274,7 @@ spec: {{- end }} {{- end }} - name: driver - image: "{{ required "Must provide the driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }}" + image: "{{ required "Must provide the driver image repository." .Values.images.driver }}" args: - "--driver-name=csi-unity.dellemc.com" - "--driver-config=/unity-config/driver-config-params.yaml" diff --git a/charts/csi-unity/templates/node.yaml b/charts/csi-unity/templates/node.yaml index d013812e..9358b0cd 100644 --- a/charts/csi-unity/templates/node.yaml +++ b/charts/csi-unity/templates/node.yaml @@ -97,7 +97,7 @@ spec: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true imagePullPolicy: {{ .Values.imagePullPolicy }} - image: {{ required "Must provide the podmon container image." .Values.podmon.image }} + image: {{ required "Must provide the podmon container image." .Values.images.podmon }} args: {{- toYaml .Values.podmon.node.args | nindent 12 }} env: @@ -145,7 +145,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: "{{ required "Must provide the driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }}" + image: "{{ required "Must provide the driver image repository." .Values.images.driver }}" args: - "--driver-name=csi-unity.dellemc.com" - "--driver-config=/unity-config/driver-config-params.yaml" @@ -204,7 +204,7 @@ spec: - name: unity-secret mountPath: /unity-secret - name: registrar - image: {{ required "Must provide the CSI registrar container image." ( include "csi-unity.registrarImage" . ) }} + image: {{ required "Must provide the CSI registrar container image." .Values.images.registrar }} args: - "--v=5" - "--csi-address=$(ADDRESS)" diff --git a/charts/csi-unity/values.yaml b/charts/csi-unity/values.yaml index 56825fae..d86fa7ed 100644 --- a/charts/csi-unity/values.yaml +++ b/charts/csi-unity/values.yaml @@ -6,6 +6,20 @@ # Examples : "v2.8.0" , "nightly" version: "v2.8.0" +images: + # "driver" defines the container image, used for the driver container. + driver: dellemc/csi-unity:v2.8.0 + # CSI sidecars + attacher: registry.k8s.io/sig-storage/csi-attacher:v4.4.0 + provisioner: registry.k8s.io/sig-storage/csi-provisioner:v3.6.0 + snapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v6.3.0 + resizer: registry.k8s.io/sig-storage/csi-resizer:v1.9.0 + registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.9.0 + healthmonitor: registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.10.0 + + # CSM sidecars + podmon: dellemc/podmon:v1.7.0 + # LogLevel is used to set the logging level of the driver. # Allowed values: "error", "warn"/"warning", "info", "debug" # Default value: "info" @@ -194,7 +208,6 @@ podmon: # allowed values - string # default value : None # Example : "podman:latest", "pod:latest" - image: dellemc/podmon:v1.7.0 controller: args: - "--csisock=unix:/var/run/csi/csi.sock" @@ -255,7 +268,3 @@ storageCapacity: # Allowed values: 1m,2m,3m,...,10m,...,60m etc # Default value: 5m pollInterval: 5m - -images: - # "driver" defines the container image, used for the driver container. - driverRepository: dellemc