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-powermax] Driver images in one place #256

Closed
wants to merge 6 commits into from
Closed
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-powermax/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-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") -}}
Expand Down
21 changes: 11 additions & 10 deletions charts/csi-powermax/templates/controller.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -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)"
Expand All @@ -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)"
Expand Down Expand Up @@ -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)"
Expand All @@ -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)"
Expand All @@ -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)"
Expand All @@ -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)"
Expand All @@ -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 }}"
Expand Down Expand Up @@ -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)"
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/csi-powermax/templates/csidriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions charts/csi-powermax/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 }}"
Expand Down
34 changes: 17 additions & 17 deletions charts/csi-powermax/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.8.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.6.0
authorization: dellemc/csm-authorization-sidecar:v1.8.0
migration: dellemc/dell-csi-migrator:v1.2.0
# 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.1.0

## K8S/DRIVER ATTRIBUTES
########################
# customDriverName: If enabled, sets the driver name to the
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.6.0
# replicationContextPrefix enables side cars to read
# required information from the volume context
# Default value: "powermax"
Expand All @@ -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.2.0
# Node rescan sidecar does a rescan on nodes for identifying new paths
# Default value: None
nodeRescanSidecarImage: dellemc/dell-csi-node-rescanner:v1.1.0
# migrationPrefix: Determine if migration is enabled
# Default value: "migration.storage.dell.com"
# Examples: "migration.storage.dell.com"
Expand All @@ -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.8.0
sidecarProxyImage: dellemc/csm-authorization-sidecar:v1.8.0
# proxyHost: hostname of the csm-authorization server
# Default value: None
proxyHost:
Expand Down
Loading