{{- if and .Values.enabled .Values.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "temporal-worker.serviceAccountName" . }} namespace: {{ include "temporal-worker.namespace" . }} labels: {{- include "temporal-worker.labels" . | nindent 4 }} app.kubernetes.io/component: temporal-worker {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken | default true }} {{- end }}