@@ -179,16 +179,23 @@ spec:
179
179
securityContext :
180
180
{{ toYaml .Values.containerSecurityContext | nindent 12 | trim }}
181
181
{{- 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 }}
183
183
volumeMounts :
184
+ {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }}
184
185
- name : cloudconfig
185
186
mountPath : {{ .Values.cloudConfigPath }}
186
187
readOnly : true
188
+ {{- end }}
187
189
{{- if and (eq .Values.cloudProvider "magnum") (.Values.magnumCABundlePath) }}
188
190
- name : ca-bundle
189
191
mountPath : {{ .Values.magnumCABundlePath }}
190
192
readOnly : true
191
193
{{- end }}
194
+ {{- range $key, $value := .Values.extraVolumeSecrets }}
195
+ - name : {{ $key }}
196
+ mountPath : {{ required "Must specify mountPath!" $value.mountPath }}
197
+ readOnly : true
198
+ {{- end }}
192
199
{{- end }}
193
200
{{- if .Values.affinity }}
194
201
affinity :
@@ -205,16 +212,27 @@ spec:
205
212
securityContext :
206
213
{{ toYaml .Values.securityContext | nindent 8 | trim }}
207
214
{{- 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 }}
209
216
volumes :
217
+ {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }}
210
218
- name : cloudconfig
211
219
hostPath :
212
220
path : {{ .Values.cloudConfigPath }}
221
+ {{- end }}
213
222
{{- if and (eq .Values.cloudProvider "magnum") (.Values.magnumCABundlePath) }}
214
223
- name : ca-bundle
215
224
hostPath :
216
225
path : {{ .Values.magnumCABundlePath }}
217
226
{{- 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 }}
218
236
{{- end }}
219
237
{{- if .Values.image.pullSecrets }}
220
238
imagePullSecrets :
0 commit comments