@@ -179,16 +179,23 @@ spec:
179179 securityContext :
180180 {{ toYaml .Values.containerSecurityContext | nindent 12 | trim }}
181181 {{- end }}
182- {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }}
182+ {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets }}
183183 volumeMounts :
184+ {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }}
184185 - name : cloudconfig
185186 mountPath : {{ .Values.cloudConfigPath }}
186187 readOnly : true
188+ {{- end }}
187189 {{- if and (eq .Values.cloudProvider "magnum") (.Values.magnumCABundlePath) }}
188190 - name : ca-bundle
189191 mountPath : {{ .Values.magnumCABundlePath }}
190192 readOnly : true
191193 {{- end }}
194+ {{- range $key, $value := .Values.extraVolumeSecrets }}
195+ - name : {{ $key }}
196+ mountPath : {{ required "Must specify mountPath!" $value.mountPath }}
197+ readOnly : true
198+ {{- end }}
192199 {{- end }}
193200 {{- if .Values.affinity }}
194201 affinity :
@@ -205,16 +212,27 @@ spec:
205212 securityContext :
206213 {{ toYaml .Values.securityContext | nindent 8 | trim }}
207214 {{- end }}
208- {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }}
215+ {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets }}
209216 volumes :
217+ {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }}
210218 - name : cloudconfig
211219 hostPath :
212220 path : {{ .Values.cloudConfigPath }}
221+ {{- end }}
213222 {{- if and (eq .Values.cloudProvider "magnum") (.Values.magnumCABundlePath) }}
214223 - name : ca-bundle
215224 hostPath :
216225 path : {{ .Values.magnumCABundlePath }}
217226 {{- end }}
227+ {{- range $key, $value := .Values.extraVolumeSecrets }}
228+ - name : {{ $key }}
229+ secret :
230+ secretName : {{ default (include "cluster-autoscaler.fullname" $) $value.name }}
231+ {{- if $value.items }}
232+ items :
233+ {{- toYaml $value.items | nindent 14 }}
234+ {{- end }}
235+ {{- end }}
218236 {{- end }}
219237 {{- if .Values.image.pullSecrets }}
220238 imagePullSecrets :
0 commit comments