Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[charts/csi-unity] Centralize all images to one place #312

Merged
merged 14 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions charts/csi-unity/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -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
*/}}
Expand Down
14 changes: 7 additions & 7 deletions charts/csi-unity/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand All @@ -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 }}"
Expand Down Expand Up @@ -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 }}"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions charts/csi-unity/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)"
Expand Down
19 changes: 14 additions & 5 deletions charts/csi-unity/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
shaynafinocchiaro marked this conversation as resolved.
Show resolved Hide resolved

# LogLevel is used to set the logging level of the driver.
# Allowed values: "error", "warn"/"warning", "info", "debug"
# Default value: "info"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Loading