From d760d1c9a549ea6ee838d9da82e1225b970651f3 Mon Sep 17 00:00:00 2001
From: Prow Bot <prow@amazonaws.com>
Date: Wed, 12 Oct 2022 13:12:22 -0400
Subject: [PATCH] Use imagePullSecrets instead of pullSecrets

---
 charts/cluster-autoscaler/templates/deployment.yaml | 10 ++++------
 charts/cluster-autoscaler/values.yaml               | 10 +++-------
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/charts/cluster-autoscaler/templates/deployment.yaml b/charts/cluster-autoscaler/templates/deployment.yaml
index bbd22d27f..5cfca0daf 100644
--- a/charts/cluster-autoscaler/templates/deployment.yaml
+++ b/charts/cluster-autoscaler/templates/deployment.yaml
@@ -36,6 +36,10 @@ spec:
 {{ toYaml .Values.podLabels | indent 8 }}
       {{- end }}
     spec:
+      {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
       {{- if .Values.priorityClassName }}
       priorityClassName: "{{ .Values.priorityClassName }}"
       {{- end }}
@@ -288,11 +292,5 @@ spec:
           secret:
             secretName: {{ .Values.clusterAPIKubeconfigSecret }}
       {{- end }}
-      {{- end }}
-      {{- if .Values.image.pullSecrets }}
-      imagePullSecrets:
-      {{- range .Values.image.pullSecrets }}
-        - name: {{ . }}
-      {{- end }}
     {{- end }}
 {{- end }}
diff --git a/charts/cluster-autoscaler/values.yaml b/charts/cluster-autoscaler/values.yaml
index e556795f2..f88d5e60d 100644
--- a/charts/cluster-autoscaler/values.yaml
+++ b/charts/cluster-autoscaler/values.yaml
@@ -238,13 +238,9 @@ image:
   digest: {{kubernetes/autoscaler}}
   # image.pullPolicy -- Image pull policy
   pullPolicy: IfNotPresent
-  ## Optionally specify an array of imagePullSecrets.
-  ## Secrets must be manually created in the namespace.
-  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
-  ##
-  # image.pullSecrets -- Image pull secrets
-  pullSecrets:
-    - regcred
+
+# image pull secrets
+imagePullSecrets: []
 
 # kubeTargetVersionOverride -- Allow overriding the `.Capabilities.KubeVersion.GitVersion` check. Useful for `helm template` commands.
 kubeTargetVersionOverride: ""
-- 
2.30.1 (Apple Git-130)