{{- if or .Values.serviceAccount.enabled -}} apiVersion: v1 kind: ServiceAccount metadata: {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} labels: app: {{ template "oauth2-proxy.name" . }} {{- include "oauth2-proxy.labels" . | indent 4 }} name: {{ template "oauth2-proxy.serviceAccountName" . }} automountServiceAccountToken : {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end -}}