{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "capsule.serviceAccountName" . }}
  labels:
    {{- include "capsule.labels" . | nindent 4 }}
  {{- if or (.Values.serviceAccount.annotations) (.Values.customAnnotations)  }}
  annotations:
    {{- include "capsule.serviceAccountAnnotations" . | nindent 4 }}
  {{- end }}
{{- end }}
