From 7e4717b7e01a33e3acf2eaabaf727e9fb5d95e25 Mon Sep 17 00:00:00 2001 From: coulof Date: Thu, 24 Aug 2023 03:13:43 -0400 Subject: [PATCH] Centralize all images to one place --- charts/csi-vxflexos/templates/_helpers.tpl | 61 ----------------- charts/csi-vxflexos/templates/controller.yaml | 20 +++--- charts/csi-vxflexos/templates/node.yaml | 8 +-- charts/csi-vxflexos/values.yaml | 65 ++++++++++--------- 4 files changed, 48 insertions(+), 106 deletions(-) delete mode 100644 charts/csi-vxflexos/templates/_helpers.tpl diff --git a/charts/csi-vxflexos/templates/_helpers.tpl b/charts/csi-vxflexos/templates/_helpers.tpl deleted file mode 100644 index 621f38fc..00000000 --- a/charts/csi-vxflexos/templates/_helpers.tpl +++ /dev/null @@ -1,61 +0,0 @@ -{{/* -Return the appropriate sidecar images based on k8s version -*/}} -{{- define "csi-vxflexos.attacherImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-attacher:v4.3.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-vxflexos.provisionerImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-provisioner:v3.5.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-vxflexos.snapshotterImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-snapshotter:v6.2.2" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-vxflexos.resizerImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-resizer:v1.8.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-vxflexos.registrarImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "28") -}} - {{- print "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.8.0" -}} - {{- end -}} - {{- end -}} -{{- end -}} - -{{- define "csi-vxflexos.healthmonitorImage" -}} - {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (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 -*/}} -{{- define "csi-vxflexos.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/charts/csi-vxflexos/templates/controller.yaml b/charts/csi-vxflexos/templates/controller.yaml index acecc2e2..a59865f2 100644 --- a/charts/csi-vxflexos/templates/controller.yaml +++ b/charts/csi-vxflexos/templates/controller.yaml @@ -192,7 +192,7 @@ spec: {{- if hasKey .Values "podmon" }} {{- if eq .Values.podmon.enabled true }} - name: podmon - image: {{ required "Must provide the podmon container image." .Values.podmon.image }} + image: {{ required "Must provide the podmon container image." .Values.images.podmon }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: {{- toYaml .Values.podmon.controller.args | nindent 12 }} @@ -217,7 +217,7 @@ spec: {{- end }} {{- end }} - name: attacher - image: {{ required "Must provide the CSI attacher container image." ( include "csi-vxflexos.attacherImage" . ) }} + image: {{ required "Must provide the CSI attacher container image." .Values.images.attacher }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -232,7 +232,7 @@ spec: {{- 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.controller.replication.image}} + image: {{ required "Must provide the Dell CSI Replicator image." .Values.images.replication }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -258,7 +258,7 @@ spec: {{- end }} {{- end }} - name: provisioner - image: {{ required "Must provide the CSI provisioner container image." ( include "csi-vxflexos.provisionerImage" . ) }} + image: {{ required "Must provide the CSI provisioner container image." .Values.images.provisioner }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -290,7 +290,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-vxflexos.healthmonitorImage" . ) }} + image: {{ required "Must provide the CSI external health monitor image." .Values.images.healthmonitor }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -311,7 +311,7 @@ spec: {{- if hasKey .Values "vgsnapshotter" }} {{- if eq .Values.vgsnapshotter.enabled true }} - name: vg-snapshotter - image: {{ required "Must provide the vgsnapshotter container image." .Values.vgsnapshotter.image }} + image: {{ required "Must provide the vgsnapshotter container image." .Values.images.vgsnapshotter }} imagePullPolicy: {{ .Values.imagePullPolicy }} env: - name: ADDRESS @@ -324,7 +324,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-vxflexos.snapshotterImage" . ) }} + image: {{ required "Must provide the CSI snapshotter container image. " .Values.images.snapshotter }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -342,7 +342,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-vxflexos.resizerImage" . ) }} + image: {{ required "Must provide the CSI resizer container image." .Values.images.resizer }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--csi-address=$(ADDRESS)" @@ -359,7 +359,7 @@ spec: {{- if hasKey .Values "authorization" }} {{- if eq .Values.authorization.enabled true }} - name: karavi-authorization-proxy - image: {{ required "Must provide the authorization sidecar container image." .Values.authorization.sidecarProxyImage }} + image: {{ required "Must provide the authorization sidecar container image." .Values.images.authorization }} imagePullPolicy: {{ .Values.imagePullPolicy }} env: - name: PROXY_HOST @@ -388,7 +388,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 }}" imagePullPolicy: {{ .Values.imagePullPolicy }} command: [ "/csi-vxflexos.sh" ] args: diff --git a/charts/csi-vxflexos/templates/node.yaml b/charts/csi-vxflexos/templates/node.yaml index 44806fb0..dca17375 100644 --- a/charts/csi-vxflexos/templates/node.yaml +++ b/charts/csi-vxflexos/templates/node.yaml @@ -106,7 +106,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: {{ required "Must provide the podmon container image." .Values.podmon.image }} + image: {{ required "Must provide the podmon container image." .Values.images.podmon }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: {{- toYaml .Values.podmon.node.args | nindent 12 }} @@ -148,7 +148,7 @@ spec: {{- if hasKey .Values "authorization" }} {{- if eq .Values.authorization.enabled true }} - name: karavi-authorization-proxy - image: {{ required "Must provide the authorization sidecar container image." .Values.authorization.sidecarProxyImage }} + image: {{ required "Must provide the authorization sidecar container image." .Values.images.authorization }} imagePullPolicy: {{ .Values.imagePullPolicy }} env: - name: PROXY_HOST @@ -182,7 +182,7 @@ spec: allowPrivilegeEscalation: true capabilities: add: ["SYS_ADMIN"] - 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 }}" imagePullPolicy: {{ .Values.imagePullPolicy }} command: [ "/csi-vxflexos.sh" ] args: @@ -238,7 +238,7 @@ spec: readOnly: true {{- end}} - name: registrar - image: {{ required "Must provide the CSI registrar container image." ( include "csi-vxflexos.registrarImage" . ) }} + image: {{ required "Must provide the CSI registrar container image." .Values.images.registrar }} imagePullPolicy: {{ .Values.imagePullPolicy }} args: - "--v=5" diff --git a/charts/csi-vxflexos/values.yaml b/charts/csi-vxflexos/values.yaml index b076e5bd..f74d9ff8 100644 --- a/charts/csi-vxflexos/values.yaml +++ b/charts/csi-vxflexos/values.yaml @@ -5,12 +5,26 @@ # Not recommend to change version: v2.8.0 +# Defines the image locations of every containers used by the CSI Driver & CSM +# You can replace them with an internal registry location if needed images: # "driver" defines the container image, used for the driver container. - driverRepository: dellemc - + driver: dellemc/csi-vxflexos:v2.8.0 # "powerflexSdc" defines the SDC image for init container. powerflexSdc: dellemc/sdc:3.6.1 + # 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 + vgsnapshotter: dellemc/csi-volumegroup-snapshotter:v1.2.0 + podmon: dellemc/podmon:v1.6.0 + authorization: dellemc/csm-authorization-sidecar:v1.7.0 # Represents number of certificate secrets, which user is going to create for ssl authentication. (vxflexos-cert-0..vxflexos-cert-n) @@ -127,11 +141,6 @@ controller: # Default value: false enabled: false - # image: Image to use for dell-csi-replicator. This shouldn't be changed - # Allowed values: string - # Default value: None - image: dellemc/dell-csi-replicator:v1.5.0 - # replicationContextPrefix: prefix to use for naming of resources created by replication feature # Allowed values: string # Default value: powerflex @@ -321,31 +330,29 @@ monitor: # These options control the running of the vgsnapshotter container vgsnapshotter: enabled: false - image: dellemc/csi-volumegroup-snapshotter:v1.2.0 # Podmon is an optional feature under development and tech preview. # Enable this feature only after contact support for additional information podmon: enabled: false - image: dellemc/podmon:v1.6.0 - #controller: - # args: - # - "--csisock=unix:/var/run/csi/csi.sock" - # - "--labelvalue=csi-vxflexos" - # - "--mode=controller" - # - "--skipArrayConnectionValidation=false" - # - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml" - # - "--driverPodLabelValue=dell-storage" - # - "--ignoreVolumelessPods=false" - #node: - # args: - # - "--csisock=unix:/var/lib/kubelet/plugins/vxflexos.emc.dell.com/csi_sock" - # - "--labelvalue=csi-vxflexos" - # - "--mode=node" - # - "--leaderelection=false" - # - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml" - # - "--driverPodLabelValue=dell-storage" - # - "--ignoreVolumelessPods=false" + controller: + args: + - "--csisock=unix:/var/run/csi/csi.sock" + - "--labelvalue=csi-vxflexos" + - "--mode=controller" + - "--skipArrayConnectionValidation=false" + - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" + node: + args: + - "--csisock=unix:/var/lib/kubelet/plugins/vxflexos.emc.dell.com/csi_sock" + - "--labelvalue=csi-vxflexos" + - "--mode=node" + - "--leaderelection=false" + - "--driver-config-params=/vxflexos-config-params/driver-config-params.yaml" + - "--driverPodLabelValue=dell-storage" + - "--ignoreVolumelessPods=false" # CSM module attributes # authorization: enable csm-authorization for RBAC @@ -357,10 +364,6 @@ podmon: 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: