{{- if and .Values.fusionOperator.enabled (eq (include "parent.dataplaneMode" . ) "shared") }} {{- if ( and .Values.fusionOperator.job.serviceAccount.enabled ( not .Values.fusionOperator.job.serviceAccount.preexisting ) ) -}} apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "fusionOperator.job.serviceAccountName" . }} labels: {{- include "fusionOperator.labels" . | nindent 4 }} annotations: {{- with .Values.fusionOperator.job.serviceAccount.annotations }} {{- toYaml . }} {{- end }} "helm.sh/hook": pre-install,pre-upgrade,pre-delete "helm.sh/hook-weight": "-1" "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded automountServiceAccountToken: {{ .Values.fusionOperator.job.serviceAccount.automountServiceAccountToken }} {{- end }} {{- end }}