{{- $proxy := mustMergeOverwrite (mustDeepCopy .Values) .Values.proxy -}}
{{- if $proxy.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "teleport-cluster.proxy.serviceAccountName" . }}
  namespace: {{ .Release.Namespace }}
{{- if $proxy.annotations.serviceAccount }}
  annotations: {{- toYaml $proxy.annotations.serviceAccount | nindent 4 }}
{{- end -}}
{{- end }}
