Helm: Support map format for image pull secrets (#6546)

Support map format for image pull secrets
This commit is contained in:
Gregor Tudan 2025-02-13 18:02:02 +01:00 committed by GitHub
parent 485c881c10
commit 903d288e08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -134,14 +134,17 @@ Inject extra environment vars in the format key:value, if populated
{{/* Return the proper imagePullSecrets */}}
{{- define "seaweedfs.imagePullSecrets" -}}
{{- if .Values.global.imagePullSecrets }}
{{- if kindIs "string" .Values.global.imagePullSecrets }}
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.global.imagePullSecrets }}
{{- else }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
{{- if kindIs "string" . }}
- name: {{ . }}
{{- else }}
{{- range . }}
{{- if kindIs "string" . }}
- name: {{ . }}
{{- else }}
- {{ toYaml . }}
{{- end}}
{{- end }}
{{- end }}
{{- end }}