{{ if and .Values.notifications.enabled .Values.notifications.bots.slack.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: {{ template "argo-cd.notifications.fullname" . }}-bot roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: {{ template "argo-cd.notifications.fullname" . }}-bot subjects: - kind: ServiceAccount name: {{ template "argo-cd.notificationsBotsSlackServiceAccountName" . }} {{ end }}