From 3f39a08a33c5ef02c28d45e404bf14452d29b433 Mon Sep 17 00:00:00 2001 From: kk3 Date: Thu, 10 Feb 2022 12:43:24 +0530 Subject: [PATCH 1/3] added sidecar changes --- helm/csi-unity/templates/_helpers.tpl | 46 +++++++-------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/helm/csi-unity/templates/_helpers.tpl b/helm/csi-unity/templates/_helpers.tpl index afb2e56..5e4332e 100644 --- a/helm/csi-unity/templates/_helpers.tpl +++ b/helm/csi-unity/templates/_helpers.tpl @@ -3,71 +3,47 @@ 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 ) "21" }} - {{- print "k8s.gcr.io/sig-storage/csi-attacher:v3.2.1" -}} - {{- 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" -}} + {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}} + {{- print "k8s.gcr.io/sig-storage/csi-attacher:v3.4.0" -}} {{- end -}} {{- end -}} {{- end -}} {{- define "csi-unity.provisionerImage" -}} {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }} - {{- print "k8s.gcr.io/sig-storage/csi-provisioner:v2.2.1" -}} - {{- 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" -}} + {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}} + {{- print "k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0" -}} {{- end -}} {{- end -}} {{- end -}} {{- define "csi-unity.snapshotterImage" -}} {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }} - {{- print "k8s.gcr.io/sig-storage/csi-snapshotter:v4.1.0" -}} - {{- 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" -}} + {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}} + {{- print "k8s.gcr.io/sig-storage/csi-snapshotter:v5.0.1" -}} {{- end -}} {{- end -}} {{- end -}} {{- define "csi-unity.resizerImage" -}} {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }} - {{- print "k8s.gcr.io/sig-storage/csi-resizer:v1.2.0" -}} - {{- 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" -}} + {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}} + {{- print "k8s.gcr.io/sig-storage/csi-resizer:v1.4.0" -}} {{- end -}} {{- end -}} {{- end -}} {{- define "csi-unity.registrarImage" -}} {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }} - {{- print "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.2.0" -}} - {{- 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" -}} + {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}} + {{- print "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0" -}} {{- end -}} {{- end -}} {{- end -}} {{- define "csi-unity.healthmonitorImage" -}} {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- if eq ( trimSuffix "+" .Capabilities.KubeVersion.Minor ) "21" }} - {{- print "gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.4.0" -}} - {{- 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 -}} + {{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}} {{- print "gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.4.0" -}} {{- end -}} {{- end -}} From e67e168061b3cb17e81446a967ce112d793ba746 Mon Sep 17 00:00:00 2001 From: kk3 Date: Thu, 10 Feb 2022 12:45:59 +0530 Subject: [PATCH 2/3] added sidecar changes --- helm/csi-unity/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/csi-unity/templates/_helpers.tpl b/helm/csi-unity/templates/_helpers.tpl index 5e4332e..0439ddf 100644 --- a/helm/csi-unity/templates/_helpers.tpl +++ b/helm/csi-unity/templates/_helpers.tpl @@ -43,7 +43,7 @@ Return the appropriate sidecar images based on k8s version {{- define "csi-unity.healthmonitorImage" -}} {{- if eq .Capabilities.KubeVersion.Major "1" }} - {{- else if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}} + {{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "23") -}} {{- print "gcr.io/k8s-staging-sig-storage/csi-external-health-monitor-controller:v0.4.0" -}} {{- end -}} {{- end -}} From 06f6255ccf657354d0e726ff6dab25a32d658b2c Mon Sep 17 00:00:00 2001 From: kk3 Date: Thu, 10 Feb 2022 17:57:48 +0530 Subject: [PATCH 3/3] added patch command --- helm/csi-unity/templates/controller.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/csi-unity/templates/controller.yaml b/helm/csi-unity/templates/controller.yaml index 2f0bd69..333ac87 100644 --- a/helm/csi-unity/templates/controller.yaml +++ b/helm/csi-unity/templates/controller.yaml @@ -63,7 +63,7 @@ rules: verbs: ["get", "list", "watch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents"] - verbs: ["create", "get", "list", "watch", "update", "delete"] + verbs: ["create", "get", "list", "watch", "update", "delete", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots/status"] verbs: ["update"] @@ -78,7 +78,7 @@ rules: verbs: ["create", "list", "watch", "delete"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents/status"] - verbs: ["update"] + verbs: ["update", "patch"] # below for resizer - apiGroups: [""] resources: ["persistentvolumeclaims/status"]