# helm_charts_spark-serviceaccount.yaml
{{- if .Values.serviceAccounts.spark.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "spark.serviceAccountName" . }}
  namespace: {{ .Values.sparkJobNamespace }}
  labels:
    app.kubernetes.io/name: {{ include "sparkoperator.name" . }}
    helm.sh/chart: {{ include "sparkoperator.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}