@@ -67,20 +67,24 @@ app.kubernetes.io/instance: {{ .Release.Name }}
6767{ {- end } }
6868
6969{ {/*
70- imagePullSecrets helpers
70+ imagePullSecrets helper - supports global.imagePullSecrets, operator.imagePullSecrets and root imagePullSecrets fallback
7171*/} }
72- { {- define " network-operator.operator.imagePullSecrets" } }
73- { {- $imagePullSecrets := list } }
74- { {- if .Values.operator.imagePullSecrets } }
75- { {- range .Values.operator.imagePullSecrets } }
76- { {- $imagePullSecrets = append $imagePullSecrets (dict " name" . ) } }
77- { {- end } }
78- { {- else } }
79- { {- if .Values.imagePullSecrets } }
80- { {- range .Values.imagePullSecrets } }
81- { {- $imagePullSecrets = append $imagePullSecrets (dict " name" . ) } }
82- { {- end } }
83- { {- end } }
84- { {- end } }
72+ { {- define " network-operator.operator.imagePullSecrets" -} }
73+ { {- $imagePullSecrets := list -} }
74+ { {- if .Values.operator.imagePullSecrets -} }
75+ { {- range .Values.operator.imagePullSecrets -} }
76+ { {- $imagePullSecrets = append $imagePullSecrets (dict " name" .) -} }
77+ { {- end -} }
78+ { {- else if .Values.imagePullSecrets -} }
79+ { {- range .Values.imagePullSecrets -} }
80+ { {- $imagePullSecrets = append $imagePullSecrets (dict " name" .) -} }
81+ { {- end -} }
82+ { {- else if .Values.global.imagePullSecrets -} }
83+ { {- range .Values.global.imagePullSecrets -} }
84+ { {- $imagePullSecrets = append $imagePullSecrets (dict " name" .) -} }
85+ { {- end -} }
86+ { {- end -} }
87+ { {- if $imagePullSecrets -} }
8588{ {- $imagePullSecrets | toJson } }
86- { {- end } }
89+ { {- end -} }
90+ { {- end -} }
0 commit comments