{{- if and .Values.deploy.operator .Values.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ .Release.Name }} namespace: {{ .Release.Namespace }} {{- with .Values.operator.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} {{- if or .Values.serviceAccount.repoCredentials .Values.imagePullSecrets }} imagePullSecrets: {{- with .Values.serviceAccount.repoCredentials }} {{- range . }} - name: {{ . }} {{- end }} {{- end }} {{- with .Values.imagePullSecrets }} {{ . | toYaml }} {{- end }} {{- end }} {{- end }}