aboutsummaryrefslogtreecommitdiff
path: root/k8s
diff options
context:
space:
mode:
authorGregor Tudan <Gregor@tudan.de>2025-02-13 18:02:02 +0100
committerGitHub <noreply@github.com>2025-02-13 09:02:02 -0800
commit903d288e086f9f293ab811b7915d28e17746afa5 (patch)
tree23ed822d27a33c92cd69c9fdeb3e50e8e6d1c1d5 /k8s
parent485c881c108563900f1ad3ebc7ecbd06f6d235f3 (diff)
downloadseaweedfs-903d288e086f9f293ab811b7915d28e17746afa5.tar.xz
seaweedfs-903d288e086f9f293ab811b7915d28e17746afa5.zip
Helm: Support map format for image pull secrets (#6546)
Support map format for image pull secrets
Diffstat (limited to 'k8s')
-rw-r--r--k8s/charts/seaweedfs/templates/_helpers.tpl13
1 files changed, 8 insertions, 5 deletions
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 }}