diff --git a/k8s/charts/seaweedfs/templates/_helpers.tpl b/k8s/charts/seaweedfs/templates/_helpers.tpl index d8261eb32..4f4b27157 100644 --- a/k8s/charts/seaweedfs/templates/_helpers.tpl +++ b/k8s/charts/seaweedfs/templates/_helpers.tpl @@ -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 }} +{{- if kindIs "string" . }} + - name: {{ . }} {{- else }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} +{{- range . }} + {{- if kindIs "string" . }} - name: {{ . }} + {{- else }} + - {{ toYaml . }} + {{- end}} {{- end }} {{- end }} {{- end }}