Overview

Argo CD Notifications continuously monitors Argo CD applications and provides a flexible way to notify users about important changes in the application state. Using a flexible mechanism of triggers and templates you can configure when the notification should be sent as well as notification content. Argo CD Notifications includes the catalog of useful triggers and templates. So you can just use them instead of reinventing new ones.

Getting Started

  • Install Triggers and Templates from the catalog
  1. kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/notifications_catalog/install.yaml
  • Add Email username and password token to argocd-notifications-secret secret
  1. export EMAIL_USER=<your-username>
  2. export PASSWORD=<your-password>
  3. kubectl apply -n argocd -f - << EOF
  4. apiVersion: v1
  5. kind: Secret
  6. metadata:
  7. name: argocd-notifications-secret
  8. stringData:
  9. email-username: $EMAIL_USER
  10. email-password: $PASSWORD
  11. type: Opaque
  12. EOF
  • Register Email notification service
  1. kubectl patch cm argocd-notifications-cm -n argocd --type merge -p '{"data": {"service.email.gmail": "{ username: $email-username, password: $email-password, host: smtp.gmail.com, port: 465, from: $email-username }" }}'
  • Subscribe to notifications by adding the notifications.argoproj.io/subscribe.on-sync-succeeded.slack annotation to the Argo CD application or project:
  1. kubectl patch app <my-app> -n argocd -p '{"metadata": {"annotations": {"notifications.argoproj.io/subscribe.on-sync-succeeded.slack":"<my-channel>"}}}' --type merge

Try syncing and application and get the notification once sync is completed.