diff --git a/applications/job/templates/cronjob.yaml b/applications/job/templates/cronjob.yaml index 1308ba100..fd2114a4a 100644 --- a/applications/job/templates/cronjob.yaml +++ b/applications/job/templates/cronjob.yaml @@ -59,7 +59,7 @@ spec: {{ else }} serviceAccountName: {{ include "docker-template.serviceAccountName" . }} {{- end }} - {{- if and (.Values.image) (.Values.image.imagePullSecret) }} + {{- if and .Values.image .Values.image.imagePullSecret }} imagePullSecrets: - name: {{ .Values.image.imagePullSecret }} {{- end }} diff --git a/applications/job/templates/hook-configmap.yaml b/applications/job/templates/hook-configmap.yaml index d3427b430..e65852250 100644 --- a/applications/job/templates/hook-configmap.yaml +++ b/applications/job/templates/hook-configmap.yaml @@ -67,7 +67,7 @@ data: options: - name: edns0 {{- end }} - {{- if and (.Values.image) (.Values.image.imagePullSecret) }} + {{- if and .Values.image .Values.image.imagePullSecret }} imagePullSecrets: - name: {{ .Values.image.imagePullSecret }} {{- end }} diff --git a/applications/job/templates/hook.yaml b/applications/job/templates/hook.yaml index 3c5d87b30..0dc8e40c2 100644 --- a/applications/job/templates/hook.yaml +++ b/applications/job/templates/hook.yaml @@ -23,7 +23,7 @@ spec: spec: serviceAccountName: {{ include "docker-template.fullname" . }} restartPolicy: Never - {{- if and (.Values.image) (.Values.image.imagePullSecret) }} + {{- if and .Values.image .Values.image.imagePullSecret }} imagePullSecrets: - name: {{ .Values.image.imagePullSecret }} {{- end }} diff --git a/applications/web/templates/deployment-blue-green.yaml b/applications/web/templates/deployment-blue-green.yaml index f3276495f..bb5c0c08b 100644 --- a/applications/web/templates/deployment-blue-green.yaml +++ b/applications/web/templates/deployment-blue-green.yaml @@ -35,7 +35,7 @@ spec: options: - name: edns0 {{- end }} - {{- if and ($.Values.image) ($.Values.image.imagePullSecret) }} + {{- if and $.Values.image $.Values.image.imagePullSecret }} imagePullSecrets: - name: {{ $.Values.image.imagePullSecret }} {{- end }} diff --git a/applications/web/templates/deployment.yaml b/applications/web/templates/deployment.yaml index 61741048d..814a60acf 100644 --- a/applications/web/templates/deployment.yaml +++ b/applications/web/templates/deployment.yaml @@ -49,6 +49,10 @@ spec: options: - name: edns0 {{- end }} + {{- if and .Values.image .Values.image.imagePullSecret }} + imagePullSecrets: + - name: {{ .Values.image.imagePullSecret }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: @@ -353,10 +357,6 @@ spec: mountPath: /secrets/ readOnly: true {{ end }} - {{- if and (.Values.image) (.Values.image.imagePullSecret) }} - imagePullSecrets: - - name: {{ .Values.image.imagePullSecret }} - {{- end }} {{- if gt (len .Values.nodeSelector) 0}} nodeSelector: {{- range $k, $v := .Values.nodeSelector }} diff --git a/applications/worker/templates/deployment.yaml b/applications/worker/templates/deployment.yaml index 804734d21..eda45f383 100644 --- a/applications/worker/templates/deployment.yaml +++ b/applications/worker/templates/deployment.yaml @@ -50,6 +50,10 @@ spec: options: - name: edns0 {{- end }} + {{- if and .Values.image .Values.image.imagePullSecret }} + imagePullSecrets: + - name: {{ .Values.image.imagePullSecret }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: @@ -286,10 +290,6 @@ spec: mountPath: /secrets/ readOnly: true {{ end }} - {{- if and (.Values.image) (.Values.image.imagePullSecret) }} - imagePullSecrets: - - name: {{ .Values.image.imagePullSecret }} - {{- end }} {{- if gt (len .Values.nodeSelector) 0}} nodeSelector: {{- range $k, $v := .Values.nodeSelector }}