diff --git a/charts/nginx-gateway-fabric/templates/rbac.yaml b/charts/nginx-gateway-fabric/templates/rbac.yaml index 69e4992605..a5e5188e31 100644 --- a/charts/nginx-gateway-fabric/templates/rbac.yaml +++ b/charts/nginx-gateway-fabric/templates/rbac.yaml @@ -7,17 +7,17 @@ metadata: {{- include "nginx-gateway.labels" . | nindent 4 }} annotations: {{- toYaml .Values.serviceAccount.annotations | nindent 4 }} - {{- if or .Values.serviceAccount.imagePullSecret .Values.serviceAccount.imagePullSecrets }} - imagePullSecrets: - {{- if .Values.serviceAccount.imagePullSecret }} - - name: {{ .Values.serviceAccount.imagePullSecret }} - {{- end }} - {{- if .Values.serviceAccount.imagePullSecrets }} - {{- range .Values.serviceAccount.imagePullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} +{{- if or .Values.serviceAccount.imagePullSecret .Values.serviceAccount.imagePullSecrets }} +imagePullSecrets: + {{- if .Values.serviceAccount.imagePullSecret }} + - name: {{ .Values.serviceAccount.imagePullSecret }} {{- end }} + {{- if .Values.serviceAccount.imagePullSecrets }} + {{- range .Values.serviceAccount.imagePullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} +{{- end }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole