ingress-nginx-helm/charts/ingress-nginx/templates/controller-serviceaccount.yaml
Matt Lauber dacb8da058
Fix yaml formatting error with multiple annotations (#9104)
When using multiple values for the `serviceAccount.annotations` values, the first line ends up indented 2 further than the following lines, resulting in a invalid yaml
2022-09-30 08:06:29 -07:00

18 lines
623 B
YAML

{{- if or .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
{{- include "ingress-nginx.labels" . | nindent 4 }}
app.kubernetes.io/component: controller
{{- with .Values.controller.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "ingress-nginx.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- if .Values.serviceAccount.annotations }}
annotations:
{{- toYaml .Values.serviceAccount.annotations | indent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}