{{ if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "sealed-secrets.serviceAccountName" . }}
  namespace: {{ include "sealed-secrets.namespace" . }}
  {{- if .Values.commonAnnotations }}
  annotations: {{- toYaml .Values.commonAnnotations | nindent 4 }}
  {{- end }}
  labels: {{- include "sealed-secrets.labels" . | nindent 4 }}
    {{- if .Values.serviceAccount.labels }}
    {{- include "sealed-secrets.render" ( dict "value" .Values.serviceAccount.labels "context" $) | nindent 4 }}
    {{- end }}
{{ end }}
