rancher-partner-charts/charts/dell/csi-powerstore/templates/_helpers.tpl

50 lines
2.1 KiB
Smarty
Raw Normal View History

{{/*
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) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}}
{{- print "k8s.gcr.io/sig-storage/csi-attacher:v3.5.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "csi-powerstore.provisionerImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}}
{{- print "k8s.gcr.io/sig-storage/csi-provisioner:v3.2.1" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "csi-powerstore.snapshotterImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}}
{{- print "k8s.gcr.io/sig-storage/csi-snapshotter:v6.0.1" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "csi-powerstore.resizerImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}}
{{- print "k8s.gcr.io/sig-storage/csi-resizer:v1.5.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "csi-powerstore.registrarImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}}
{{- print "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.1" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "csi-powerstore.healthmonitorImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "24") -}}
{{- print "gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.6.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}