Skip to content

Commit

Permalink
Merge pull request #54 from dell/k8s_version_change
Browse files Browse the repository at this point in the history
KRV-2251 : Removing 1.20 yaml and adding 1.23 yaml
  • Loading branch information
karthikk92 authored Jan 18, 2022
2 parents 2736235 + 1a00b89 commit 185bd25
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 27 deletions.
6 changes: 3 additions & 3 deletions helm/csi-unity/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: csi-unity
version: 2.1.0
appVersion: 2.1.0
kubeVersion: ">= 1.20.0 <= 1.23.0"
version: 2.2.0
appVersion: 2.2.0
kubeVersion: ">= 1.21 <= 1.23"
description: |
Unity CSI (Container Storage Interface) driver Kubernetes
integration. This chart includes everything required to provision via CSI as
Expand Down
36 changes: 12 additions & 24 deletions helm/csi-unity/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ Return the appropriate sidecar images based on k8s version
*/}}
{{- define "csi-unity.attacherImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "19" }}
{{- print "k8s.gcr.io/sig-storage/csi-attacher:v3.1.0" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "20") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") -}}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }}
{{- print "k8s.gcr.io/sig-storage/csi-attacher:v3.2.1" -}}
{{- else if ge (trimSuffix "+" .Capabilities.KubeVersion.Minor ) "22" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "22") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}}
{{- print "k8s.gcr.io/sig-storage/csi-attacher:v3.3.0" -}}
{{- else -}}
{{- print "k8s.gcr.io/sig-storage/csi-attacher:v3.1.0" -}}
Expand All @@ -17,11 +15,9 @@ Return the appropriate sidecar images based on k8s version

{{- define "csi-unity.provisionerImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "19" }}
{{- print "k8s.gcr.io/sig-storage/csi-provisioner:v2.1.0" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "20") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") -}}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }}
{{- print "k8s.gcr.io/sig-storage/csi-provisioner:v2.2.1" -}}
{{- else if ge (trimSuffix "+" .Capabilities.KubeVersion.Minor ) "22" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "22") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}}
{{- print "k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0" -}}
{{- else -}}
{{- print "k8s.gcr.io/sig-storage/csi-provisioner:v2.1.0" -}}
Expand All @@ -31,11 +27,9 @@ Return the appropriate sidecar images based on k8s version

{{- define "csi-unity.snapshotterImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "19" }}
{{- print "k8s.gcr.io/sig-storage/csi-snapshotter:v3.0.3" -}}
{{- else if or (eq (trimSuffix "+" .Capabilities.KubeVersion.Minor) "20") (eq (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") -}}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }}
{{- print "k8s.gcr.io/sig-storage/csi-snapshotter:v4.1.0" -}}
{{- else if ge (trimSuffix "+" .Capabilities.KubeVersion.Minor ) "22" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "22") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}}
{{- print "k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1" -}}
{{- else -}}
{{- print "k8s.gcr.io/sig-storage/csi-snapshotter:v3.0.3" -}}
Expand All @@ -45,11 +39,9 @@ Return the appropriate sidecar images based on k8s version

{{- define "csi-unity.resizerImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "19" }}
{{- print "k8s.gcr.io/sig-storage/csi-resizer:v1.1.0" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "19") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") -}}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }}
{{- print "k8s.gcr.io/sig-storage/csi-resizer:v1.2.0" -}}
{{- else if ge (trimSuffix "+" .Capabilities.KubeVersion.Minor ) "22" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "22") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}}
{{- print "k8s.gcr.io/sig-storage/csi-resizer:v1.3.0" -}}
{{- else -}}
{{- print "k8s.gcr.io/sig-storage/csi-resizer:v1.1.0" -}}
Expand All @@ -59,11 +51,9 @@ Return the appropriate sidecar images based on k8s version

{{- define "csi-unity.registrarImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "19" }}
{{- print "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "20") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") -}}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }}
{{- print "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.2.0" -}}
{{- else if ge (trimSuffix "+" .Capabilities.KubeVersion.Minor ) "22" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "22") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}}
{{- print "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0" -}}
{{- else -}}
{{- print "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0" -}}
Expand All @@ -73,11 +63,9 @@ Return the appropriate sidecar images based on k8s version

{{- define "csi-unity.healthmonitorImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "19" }}
{{- print "gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.4.0" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "20") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") -}}
{{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }}
{{- print "gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.4.0" -}}
{{- else if ge (trimSuffix "+" .Capabilities.KubeVersion.Minor ) "22" -}}
{{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "22") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}}
{{- print "gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.4.0" -}}
{{- else -}}
{{- print "gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.4.0" -}}
Expand Down

0 comments on commit 185bd25

Please sign in to comment.