From 903d288e086f9f293ab811b7915d28e17746afa5 Mon Sep 17 00:00:00 2001 From: Gregor Tudan Date: Thu, 13 Feb 2025 18:02:02 +0100 Subject: [PATCH] Helm: Support map format for image pull secrets (#6546) Support map format for image pull secrets --- k8s/charts/seaweedfs/templates/_helpers.tpl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 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 }} -{{- else }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} +{{- if kindIs "string" . }} - name: {{ . }} +{{- else }} +{{- range . }} + {{- if kindIs "string" . }} + - name: {{ . }} + {{- else }} + - {{ toYaml . }} + {{- end}} {{- end }} {{- end }} {{- end }}