{{- if and .Values.spark.enabled .Values.spark.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "jaeger.spark.serviceAccountName" . }}
  namespace: {{ .Release.Namespace  }}
  labels:
    {{- include "jaeger.labels" . | nindent 4 }}
    app.kubernetes.io/component: spark
{{- end -}}
