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