Overview
The notification system consists of three main components:- Triggers - Define when notifications should be sent
- Templates - Define the content and format of notifications
- Services - Define where notifications are delivered (Slack, email, etc.)
Getting Started
1
Install notification catalog
2
Configure notification service
For email notifications:
3
Register service in ConfigMap
4
Subscribe to notifications
Triggers
Triggers define conditions for sending notifications using predicate expressions.Basic Trigger
Condition Bundles
Multiple conditions with different templates:Use the
?. operator for optional fields. For example, app.status?.operationState.phase won’t fail if operationState is nil.Avoid Duplicate Notifications
UseoncePer to send notifications only when a field changes:
Common Triggers
- Sync Success
- Sync Failure
- Health Degraded
- Deployment Running
Default Triggers
Set default triggers for services:Templates
Templates define notification content for different services.Basic Template
Available Variables
object
The Application object containing metadata, spec, and status
object
Context information including:
argocdUrl- Argo CD server URLnotificationsUrl- Notifications controller URL
object
Repository metadata
string
The notification service type (slack, email, etc.)
string
The notification recipient
Template Functions
Use built-in functions in templates:Notification Services
Configure delivery channels for notifications.Slack
- Gmail
- AWS SES
- Generic SMTP
Microsoft Teams
Webhook
PagerDuty
Opsgenie
Subscriptions
Subscribe applications or projects to notifications:Application Subscriptions
Project Subscriptions
Namespace-Based Configuration
Allow teams to configure notifications in their own namespaces:Enable Self-Service Notifications
Team Namespace Configuration
Advanced Features
Conditional Subscriptions
Use annotations to conditionally enable notifications:Custom Annotations in Triggers
Grafana Annotations
Automatically create Grafana annotations:Troubleshooting
Check Notification Controller Logs
Test Notifications
Common Issues
Notifications not being sent
Notifications not being sent
- Verify trigger condition matches application state
- Check service configuration and credentials
- Ensure subscription annotation is correct
- Review controller logs for errors
Duplicate notifications
Duplicate notifications
- Use
oncePerfield in trigger configuration - Check for overlapping trigger conditions
- Verify both global and namespace configs
Template rendering errors
Template rendering errors
- Validate template syntax
- Use
?.for optional fields - Test templates with argocd admin command
Best Practices
Use the catalog
Start with built-in triggers and templates from the catalog
Avoid notification spam
Use
oncePer to prevent duplicate notificationsSecure credentials
Store service credentials in Kubernetes Secrets
Test before deploying
Use
argocd admin notifications to test configurationEnable self-service
Allow teams to configure their own notifications
Monitor the controller
Set up alerts for notification controller errors