{{- if .Values.pluginDaemon.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "dify.pluginDaemon.serviceAccountName" . }} labels: {{- include "dify.labels" . | nindent 4 }} component: plugin-daemon {{- if or .Values.pluginDaemon.serviceAccount.annotations (include "dify.ud.annotations" .) }} {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.pluginDaemon.serviceAccount.annotations (include "dify.ud.annotations" .) ) "context" . ) }} annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.pluginDaemon.serviceAccount.automountServiceAccountToken }} {{- end }}