{{- if ( and .Values.inboundWorker.serviceAccount.enabled ( not .Values.inboundWorker.serviceAccount.preexisting ) ) -}} apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "inbound-worker.serviceAccountName" . }} labels: {{- include "inbound-worker.labels" . | nindent 4 }} {{- with .Values.inboundWorker.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.inboundWorker.serviceAccount.automountServiceAccountToken }} {{- end }}