{{- if and .Values.notifications.enabled .Values.notifications.bots.slack.enabled .Values.notifications.bots.slack.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount automountServiceAccountToken: {{ .Values.notifications.bots.slack.serviceAccount.automountServiceAccountToken }} metadata: name: {{ template "argo-cd.notificationsBotsSlackServiceAccountName" . }} {{- if .Values.notifications.bots.slack.serviceAccount.annotations }} annotations: {{- range $key, $value := .Values.notifications.bots.slack.serviceAccount.annotations }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.bots.slack.name "name" .Values.notifications.bots.slack.name) | nindent 4 }} {{- end }}