{{- if and .Values.preflight.enabled .Values.serviceAccounts.preflight.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ .Values.serviceAccounts.preflight.name | quote }}
  namespace: {{ .Release.Namespace }}
  {{- if .Values.serviceAccounts.preflight.annotations }}
  annotations:
    {{ toYaml .Values.serviceAccounts.preflight.annotations | nindent 4 }}
  {{- end }}
{{- end }}
