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-powerstore] Centralize all images to one place #310

Merged
merged 5 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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-powerstore/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-powerstore.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.4.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-powerstore.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.6.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-powerstore.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.3.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-powerstore.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.9.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-powerstore.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.9.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-powerstore.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.10.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Return true if storage capacity tracking is enabled and is supported based on k8s version
*/}}
Expand Down
22 changes: 12 additions & 10 deletions charts/csi-powerstore/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ spec:
metadata:
labels:
name: {{ .Release.Name }}-controller
annotations:
kubectl.kubernetes.io/default-container: driver
spec:
{{ if .Values.controller.nodeSelector }}
nodeSelector:
Expand All @@ -195,7 +197,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 }}
Expand Down Expand Up @@ -223,7 +225,7 @@ spec:
{{ if .Values.dev.enableTracing }}{{- include "pstore.tracing" . | nindent 8 }}{{ end }}
{{- end }}
- name: attacher
image: {{ required "Must provide the CSI attacher container image." ( include "csi-powerstore.attacherImage" . ) }}
image: {{ required "Must provide the CSI attacher container image." .Values.images.attacher }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--csi-address=$(ADDRESS)"
Expand All @@ -241,7 +243,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-powerstore.resizerImage" . ) }}
image: {{ required "Must provide the CSI resizer container image." .Values.images.resizer }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--csi-address=$(ADDRESS)"
Expand All @@ -256,7 +258,7 @@ spec:
{{end}}
{{end}}
- name: provisioner
image: {{ required "Must provide the CSI provisioner container image." ( include "csi-powerstore.provisionerImage" . ) }}
image: {{ required "Must provide the CSI provisioner container image." .Values.images.provisioner }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--csi-address=$(ADDRESS)"
Expand Down Expand Up @@ -287,7 +289,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-powerstore.snapshotterImage" . ) }}
image: {{ required "Must provide the CSI snapshotter container image." .Values.images.snapshotter }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--csi-address=$(ADDRESS)"
Expand All @@ -305,7 +307,7 @@ spec:
{{- if hasKey .Values.controller "vgsnapshot" }}
{{- if eq .Values.controller.vgsnapshot.enabled true }}
- name: vg-snapshotter
image: {{ required "Must provide the vgsnapshotter container image." .Values.controller.vgsnapshot.image }}
image: {{ required "Must provide the vgsnapshotter container image." .Values.images.vgsnapshotter }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
env:
- name: ADDRESS
Expand All @@ -318,7 +320,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)"
Expand Down Expand Up @@ -346,7 +348,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 controller image." ( include "csi-powerstore.healthmonitorImage" . ) }}
image: {{ required "Must provide the CSI external health monitor controller image." .Values.images.healthmonitor }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--v=5"
Expand All @@ -365,7 +367,7 @@ spec:
{{- end }}
{{- end }}
- name: csi-metadata-retriever
image: {{ required "Must provide the CSI Metadata retriever container image." .Values.controller.metadataretriever }}
image: {{ required "Must provide the CSI Metadata retriever container image." .Values.images.metadataretriever }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command: [ "/csi-metadata-retriever" ]
env:
Expand All @@ -380,7 +382,7 @@ spec:
- name: socket-dir
mountPath: /var/run/csi
- name: driver
image: {{ required "Must provide the PowerStore driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }}
image: {{ required "Must provide the PowerStore driver image repository." .Values.images.driver }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command: [ "/csi-powerstore" ]
env:
Expand Down
8 changes: 5 additions & 3 deletions charts/csi-powerstore/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ spec:
{{- if .Values.podmon.enabled }}
driver.dellemc.com: dell-storage
{{- end }}
annotations:
kubectl.kubernetes.io/default-container: driver
spec:
{{ if .Values.node.nodeSelector }}
nodeSelector:
Expand All @@ -118,7 +120,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 }}
Expand Down Expand Up @@ -171,7 +173,7 @@ spec:
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: {{ required "Must provide the Powerstore driver image repository." .Values.images.driverRepository }}/{{ .Chart.Name }}:{{ .Values.version }}
image: {{ required "Must provide the Powerstore driver image repository." .Values.images.driver }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command: [ "/csi-powerstore" ]
env:
Expand Down Expand Up @@ -264,7 +266,7 @@ spec:
- name: powerstore-config-params
mountPath: /powerstore-config-params
- name: registrar
image: {{ required "Must provide the CSI node registrar container image." ( include "csi-powerstore.registrarImage" . ) }}
image: {{ required "Must provide the CSI node registrar container image." .Values.images.registrar }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--v=5"
Expand Down
35 changes: 16 additions & 19 deletions charts/csi-powerstore/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,22 @@
# Default value: None
driverName: "csi-powerstore.dellemc.com"

# Driver version required to pull the latest driver image
version: "v2.9.0"
images:
# "driver" defines the container image, used for the driver container.
driver: dellemc/csi-powerstore:v2.9.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
replication: dellemc/dell-csi-replicator:v1.6.0
vgsnapshotter: dellemc/csi-volumegroup-snapshotter:v1.3.0
podmon: dellemc/podmon:v1.7.0
metadataretriever: dellemc/csi-metadata-retriever:v1.5.0

# Specify kubelet config dir path.
# Ensure that the config.yaml file is present at this path.
Expand Down Expand Up @@ -103,10 +117,6 @@ controller:
# false: disable volume-group-snapshot feature(do not install vg-snapshotter sidecar)
# Default value: false
enabled: false
# image: Image to use for volume-group-snapshotter. This shouldn't be changed
# Allowed values: string
# Default value: dellemc/csi-volumegroup-snapshotter:v1.3.0
image: dellemc/csi-volumegroup-snapshotter:v1.3.0

# snapshot: allows to enable/disable snapshot feature
# snapshot CRDs needs to be installed before enabling this feature
Expand Down Expand Up @@ -155,11 +165,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.6.0

# replicationContextPrefix: prefix to use for naming of resources created by replication feature
# Allowed values: string
# Default value: powerstore
Expand All @@ -170,9 +175,6 @@ controller:
# Default value: replication.storage.dell.com
replicationPrefix: "replication.storage.dell.com"

# Image for csi-metadata-retriever
metadataretriever: dellemc/csi-metadata-retriever:v1.5.0

# nodeSelector: Define node selection constraints for controller pods.
# For the pod to be eligible to run on a node, the node must have each
# of the indicated key-value pairs as labels.
Expand Down Expand Up @@ -318,7 +320,6 @@ storageCapacity:
# Enable this feature only after contact support for additional information
podmon:
enabled: false
image: dellemc/podmon:v1.7.0
controller:
args:
- "--csisock=unix:/var/run/csi/csi.sock"
Expand All @@ -342,7 +343,3 @@ podmon:
- "--driver-config-params=/powerstore-config-params/driver-config-params.yaml"
- "--driverPodLabelValue=dell-storage"
- "--ignoreVolumelessPods=false"

images:
# "driver" defines the container image, used for the driver container.
driverRepository: dellemc
Loading