github.com/argoproj/argo-cd/v2@v2.10.9/docs/operator-manual/notifications/subscriptions.md (about) 1 The subscription to Argo CD application events can be defined using `notifications.argoproj.io/subscribe.<trigger>.<service>: <recipient>` annotation. 2 For example, the following annotation subscribes two Slack channels to notifications about every successful synchronization of the Argo CD application: 3 4 ```yaml 5 apiVersion: argoproj.io/v1alpha1 6 kind: Application 7 metadata: 8 annotations: 9 notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my-channel1;my-channel2 10 ``` 11 12 The annotation key consists of following parts: 13 14 * `on-sync-succeeded` - trigger name 15 * `slack` - notification service name 16 * `my-channel1;my-channel2` - a semicolon separated list of recipients 17 18 You can create subscriptions for all applications of an Argo CD project by adding the same annotation to the AppProject resource: 19 20 ```yaml 21 apiVersion: argoproj.io/v1alpha1 22 kind: AppProject 23 metadata: 24 annotations: 25 notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my-channel1;my-channel2 26 ``` 27 28 ## Default Subscriptions 29 30 The subscriptions might be configured globally in the `argocd-notifications-cm` ConfigMap using the `subscriptions` field. The default subscriptions 31 are applied to all applications. The trigger and applications might be configured using the 32 `triggers` and `selector` fields: 33 34 ```yaml 35 apiVersion: v1 36 kind: ConfigMap 37 metadata: 38 name: argocd-notifications-cm 39 data: 40 # Contains centrally managed global application subscriptions 41 subscriptions: | 42 # subscription for on-sync-status-unknown trigger notifications 43 - recipients: 44 - slack:test2 45 - email:test@gmail.com 46 triggers: 47 - on-sync-status-unknown 48 # subscription restricted to applications with matching labels only 49 - recipients: 50 - slack:test3 51 selector: test=true 52 triggers: 53 - on-sync-status-unknown 54 ``` 55 56 If you want to use webhook in subscriptions, you need to store the custom webhook name in the subscription's `recipients` field. 57 58 ```yaml 59 apiVersion: v1 60 kind: ConfigMap 61 metadata: 62 name: argocd-notifications-cm 63 data: 64 service.webhook.<webhook-name>: | 65 (snip) 66 subscriptions: | 67 - recipients: 68 - <webhook-name> 69 triggers: 70 - on-sync-status-unknown 71 ```