From cb6d292a241b89d5234384387707f99c6e2b1ff2 Mon Sep 17 00:00:00 2001 From: "Joseph (Jy) Yaworski" Date: Wed, 8 Sep 2021 08:42:10 -0400 Subject: [PATCH] [chart] Support image.pullPolicy for csi-resizer image Signed-off-by: Joseph (Jy) Yaworski --- charts/aws-ebs-csi-driver/CHANGELOG.md | 4 ++++ charts/aws-ebs-csi-driver/Chart.yaml | 2 +- charts/aws-ebs-csi-driver/templates/controller.yaml | 6 +++++- .../aws-ebs-csi-driver/templates/node-windows.yaml | 3 +++ charts/aws-ebs-csi-driver/templates/node.yaml | 3 +++ charts/aws-ebs-csi-driver/values.yaml | 10 ++++++++-- deploy/kubernetes/base/controller.yaml | 6 +++++- deploy/kubernetes/base/node.yaml | 13 ++++++++----- 8 files changed, 37 insertions(+), 10 deletions(-) diff --git a/charts/aws-ebs-csi-driver/CHANGELOG.md b/charts/aws-ebs-csi-driver/CHANGELOG.md index d299e363f8..f4418ce37a 100644 --- a/charts/aws-ebs-csi-driver/CHANGELOG.md +++ b/charts/aws-ebs-csi-driver/CHANGELOG.md @@ -1,5 +1,9 @@ # Helm chart +## v2.2.0 + +* Support setting imagePullPolicy for all containers + ## v2.1.1 * Bump app/driver version to `v1.2.1` diff --git a/charts/aws-ebs-csi-driver/Chart.yaml b/charts/aws-ebs-csi-driver/Chart.yaml index d272bd609d..567431f323 100644 --- a/charts/aws-ebs-csi-driver/Chart.yaml +++ b/charts/aws-ebs-csi-driver/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 1.2.1 name: aws-ebs-csi-driver description: A Helm chart for AWS EBS CSI Driver -version: 2.1.1 +version: 2.2.0 kubeVersion: ">=1.17.0-0" home: https://github.com/kubernetes-sigs/aws-ebs-csi-driver sources: diff --git a/charts/aws-ebs-csi-driver/templates/controller.yaml b/charts/aws-ebs-csi-driver/templates/controller.yaml index 7cc165ba4e..fc88ccddec 100644 --- a/charts/aws-ebs-csi-driver/templates/controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/controller.yaml @@ -140,6 +140,7 @@ spec: {{- end }} - name: csi-provisioner image: {{ printf "%s:%s" .Values.sidecars.provisioner.image.repository .Values.sidecars.provisioner.image.tag }} + imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.provisioner.image.pullPolicy }} args: - --csi-address=$(ADDRESS) - --v={{ .Values.sidecars.provisioner.logLevel }} @@ -167,6 +168,7 @@ spec: {{- end }} - name: csi-attacher image: {{ printf "%s:%s" .Values.sidecars.attacher.image.repository .Values.sidecars.attacher.image.tag }} + imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.attacher.image.pullPolicy }} args: - --csi-address=$(ADDRESS) - --v={{ .Values.sidecars.attacher.logLevel }} @@ -190,6 +192,7 @@ spec: {{- if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1" }} - name: csi-snapshotter image: {{ printf "%s:%s" .Values.sidecars.snapshotter.image.repository .Values.sidecars.snapshotter.image.tag }} + imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.snapshotter.image.pullPolicy }} args: - --csi-address=$(ADDRESS) - --leader-election=true @@ -212,7 +215,7 @@ spec: {{- end }} - name: csi-resizer image: {{ printf "%s:%s" .Values.sidecars.resizer.image.repository .Values.sidecars.resizer.image.tag }} - imagePullPolicy: Always + imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.resizer.image.pullPolicy }} args: - --csi-address=$(ADDRESS) - --v={{ .Values.sidecars.resizer.logLevel }} @@ -234,6 +237,7 @@ spec: {{- end }} - name: liveness-probe image: {{ printf "%s:%s" .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }} + imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.livenessProbe.image.pullPolicy }} args: - --csi-address=/csi/csi.sock volumeMounts: diff --git a/charts/aws-ebs-csi-driver/templates/node-windows.yaml b/charts/aws-ebs-csi-driver/templates/node-windows.yaml index 09b00a2e00..9d0f02d053 100644 --- a/charts/aws-ebs-csi-driver/templates/node-windows.yaml +++ b/charts/aws-ebs-csi-driver/templates/node-windows.yaml @@ -57,6 +57,7 @@ spec: containers: - name: ebs-plugin image: {{ printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) (toString .Values.image.tag)) }} + imagePullPolicy: {{ .Values.image.pullPolicy }} args: - node - --endpoint=$(CSI_ENDPOINT) @@ -108,6 +109,7 @@ spec: {{- end }} - name: node-driver-registrar image: {{ printf "%s:%s" .Values.sidecars.nodeDriverRegistrar.image.repository .Values.sidecars.nodeDriverRegistrar.image.tag }} + imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.nodeDriverRegistrar.image.pullPolicy }} args: - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) @@ -134,6 +136,7 @@ spec: {{- end }} - name: liveness-probe image: {{ printf "%s:%s" .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }} + imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.livenessProbe.image.pullPolicy }} args: - --csi-address=unix:/csi/csi.sock volumeMounts: diff --git a/charts/aws-ebs-csi-driver/templates/node.yaml b/charts/aws-ebs-csi-driver/templates/node.yaml index c7fcb70f28..112e79ab89 100644 --- a/charts/aws-ebs-csi-driver/templates/node.yaml +++ b/charts/aws-ebs-csi-driver/templates/node.yaml @@ -59,6 +59,7 @@ spec: securityContext: privileged: true image: {{ printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) (toString .Values.image.tag)) }} + imagePullPolicy: {{ .Values.image.pullPolicy }} args: - node - --endpoint=$(CSI_ENDPOINT) @@ -106,6 +107,7 @@ spec: {{- end }} - name: node-driver-registrar image: {{ printf "%s:%s" .Values.sidecars.nodeDriverRegistrar.image.repository .Values.sidecars.nodeDriverRegistrar.image.tag }} + imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.nodeDriverRegistrar.image.pullPolicy }} args: - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) @@ -132,6 +134,7 @@ spec: {{- end }} - name: liveness-probe image: {{ printf "%s:%s" .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }} + imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.livenessProbe.image.pullPolicy }} args: - --csi-address=/csi/csi.sock volumeMounts: diff --git a/charts/aws-ebs-csi-driver/values.yaml b/charts/aws-ebs-csi-driver/values.yaml index c1ec5c1d8a..ddacc9eebf 100644 --- a/charts/aws-ebs-csi-driver/values.yaml +++ b/charts/aws-ebs-csi-driver/values.yaml @@ -12,6 +12,7 @@ sidecars: provisioner: env: [] image: + pullPolicy: IfNotPresent repository: k8s.gcr.io/sig-storage/csi-provisioner tag: "v2.1.1" logLevel: 2 @@ -19,6 +20,7 @@ sidecars: attacher: env: [] image: + pullPolicy: IfNotPresent repository: k8s.gcr.io/sig-storage/csi-attacher tag: "v3.1.0" logLevel: 2 @@ -26,18 +28,21 @@ sidecars: snapshotter: env: [] image: + pullPolicy: IfNotPresent repository: k8s.gcr.io/sig-storage/csi-snapshotter tag: "v3.0.3" logLevel: 2 resources: {} livenessProbe: image: + pullPolicy: IfNotPresent repository: k8s.gcr.io/sig-storage/livenessprobe tag: "v2.2.0" resources: {} resizer: env: [] image: + pullPolicy: IfNotPresent repository: k8s.gcr.io/sig-storage/csi-resizer tag: "v1.0.0" logLevel: 2 @@ -45,6 +50,7 @@ sidecars: nodeDriverRegistrar: env: [] image: + pullPolicy: IfNotPresent repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar tag: "v2.1.0" logLevel: 2 @@ -104,8 +110,8 @@ controller: # cpu: 100m # memory: 128Mi serviceAccount: - create: true # A service account will be created for you if set to true. Set to false if you want to use your own. - name: ebs-csi-controller-sa # Name of the service-account to be used/created. + create: true # A service account will be created for you if set to true. Set to false if you want to use your own. + name: ebs-csi-controller-sa # Name of the service-account to be used/created. annotations: {} tolerations: [] # TSCs without the label selector stanza diff --git a/deploy/kubernetes/base/controller.yaml b/deploy/kubernetes/base/controller.yaml index 2d65ee3d0d..9a13a040a0 100644 --- a/deploy/kubernetes/base/controller.yaml +++ b/deploy/kubernetes/base/controller.yaml @@ -82,6 +82,7 @@ spec: failureThreshold: 5 - name: csi-provisioner image: k8s.gcr.io/sig-storage/csi-provisioner:v2.1.1 + imagePullPolicy: IfNotPresent args: - --csi-address=$(ADDRESS) - --v=2 @@ -97,6 +98,7 @@ spec: mountPath: /var/lib/csi/sockets/pluginproxy/ - name: csi-attacher image: k8s.gcr.io/sig-storage/csi-attacher:v3.1.0 + imagePullPolicy: IfNotPresent args: - --csi-address=$(ADDRESS) - --v=2 @@ -109,6 +111,7 @@ spec: mountPath: /var/lib/csi/sockets/pluginproxy/ - name: csi-snapshotter image: k8s.gcr.io/sig-storage/csi-snapshotter:v3.0.3 + imagePullPolicy: IfNotPresent args: - --csi-address=$(ADDRESS) - --leader-election=true @@ -120,7 +123,7 @@ spec: mountPath: /var/lib/csi/sockets/pluginproxy/ - name: csi-resizer image: k8s.gcr.io/sig-storage/csi-resizer:v1.0.0 - imagePullPolicy: Always + imagePullPolicy: IfNotPresent args: - --csi-address=$(ADDRESS) - --v=2 @@ -132,6 +135,7 @@ spec: mountPath: /var/lib/csi/sockets/pluginproxy/ - name: liveness-probe image: k8s.gcr.io/sig-storage/livenessprobe:v2.2.0 + imagePullPolicy: IfNotPresent args: - --csi-address=/csi/csi.sock volumeMounts: diff --git a/deploy/kubernetes/base/node.yaml b/deploy/kubernetes/base/node.yaml index 90c7c69fec..94561b9990 100644 --- a/deploy/kubernetes/base/node.yaml +++ b/deploy/kubernetes/base/node.yaml @@ -26,11 +26,11 @@ spec: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - - matchExpressions: - - key: eks.amazonaws.com/compute-type - operator: NotIn - values: - - fargate + - matchExpressions: + - key: eks.amazonaws.com/compute-type + operator: NotIn + values: + - fargate nodeSelector: kubernetes.io/os: linux serviceAccountName: ebs-csi-node-sa @@ -46,6 +46,7 @@ spec: securityContext: privileged: true image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.2.1 + imagePullPolicy: IfNotPresent args: - node - --endpoint=$(CSI_ENDPOINT) @@ -80,6 +81,7 @@ spec: failureThreshold: 5 - name: node-driver-registrar image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0 + imagePullPolicy: IfNotPresent args: - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) @@ -96,6 +98,7 @@ spec: mountPath: /registration - name: liveness-probe image: k8s.gcr.io/sig-storage/livenessprobe:v2.2.0 + imagePullPolicy: IfNotPresent args: - --csi-address=/csi/csi.sock volumeMounts: