argoproj/argo-cd
Notifications
Argo CD's notifications subsystem reacts to Application state changes and sends messages over Slack, email, webhooks, and many other channels.
Components
graph LR
AppCh[Application changes] --> Watcher[notification_controller]
Watcher --> Eval[Evaluate triggers - util/notification/expression]
Eval --> Subs[Read subscriptions - argocd-cm + app annotations]
Subs --> Tmpl[Render template]
Tmpl --> Engine[notifications-engine services]
Engine --> Slack[Slack/Teams/Email/...]| Path | Purpose |
|---|---|
notification_controller/ |
The controller binary's runtime. |
util/notification/argocd/ |
Glue that maps Argo CD types into the engine. |
util/notification/expression/ |
Trigger expression evaluator (CEL/expr based). |
util/notification/k8s/ |
Loaders for ConfigMap/Secret-backed configuration. |
util/notification/settings/ |
Parsing of triggers/templates from settings. |
notifications_catalog/ |
Out-of-the-box trigger/template YAML. |
Triggers
A trigger is a CEL/expr predicate that evaluates against the Application object. Built-in triggers (in notifications_catalog/triggers/) include:
on-sync-succeeded,on-sync-failed,on-sync-status-unknown.on-deployed(sync succeeded and healthy).on-health-degraded,on-app-health-progressing.on-created,on-deleted.
Custom triggers can be added by extending argocd-notifications-cm.
Templates
A template renders the matched event into a payload. Built-ins live in notifications_catalog/templates/. They cover the same set of triggers but produce service-specific payloads (Slack JSON, email HTML, Teams adaptive cards, …).
Subscriptions
Subscriptions can live in two places:
Cluster-wide in
argocd-notifications-cm:subscriptions: | - recipients: - slack:my-team triggers: [on-sync-failed]Per-Application as annotations on the Application:
metadata: annotations: notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my-team
The latter is gated by the --self-service-notification-enabled flag on the controller.
Services
Service implementations come from the upstream argoproj/notifications-engine library. Configured services live under service.<name> keys in the ConfigMap, with credentials in argocd-notifications-secret. Common services: slack, email, webhook, teams, mattermost, rocketchat, telegram, opsgenie, pagerduty, github, gitlab, googlechat.
Observability
Per-app notification state is persisted on the Application as the annotation notified.notifications.argoproj.io. This is also referenced from applicationset/controllers/applicationset_controller.go so that the AppSet controller can preserve the annotation across template renders.
CLI
argocd admin notifications (cmd/argocd/commands/admin/notifications.go) lets operators dry-run triggers/templates against a running cluster, which is the recommended way to debug a misconfigured subscription.
See also
- Notifications controller — the runtime.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.