From 9d5f62b4c60e3bbeac9ab6d18f422d525730caec Mon Sep 17 00:00:00 2001 From: Indra Gunawan Date: Wed, 6 Jul 2022 12:15:25 +0800 Subject: [PATCH] docs: sync slack integration docs Signed-off-by: Indra Gunawan --- docs/services/slack.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/services/slack.md b/docs/services/slack.md index 6119a32a..2291166e 100644 --- a/docs/services/slack.md +++ b/docs/services/slack.md @@ -39,7 +39,7 @@ The Slack notification service configuration includes following settings: ``` 1. Define service type slack in data section of `argocd-notifications-cm` configmap: -service + ```yaml apiVersion: v1 kind: ConfigMap @@ -60,6 +60,26 @@ service notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my_channel ``` +1. Annotation with more than one trigger multiple of destinations and recipients + + ```yaml + apiVersion: argoproj.io/v1alpha1 + kind: Application + metadata: + annotations: + notifications.argoproj.io/subscriptions: | + - trigger: [on-scaling-replica-set, on-rollout-updated, on-rollout-step-completed] + destinations: + - service: slack + recipients: [my-channel-1, my-channel-2] + - service: email + recipients: [recipient-1, recipient-2, recipient-3 ] + - trigger: [on-rollout-aborted, on-analysis-run-failed, on-analysis-run-error] + destinations: + - service: slack + recipients: [my-channel-21, my-channel-22] + ``` + ## Templates Notification templates can be customized to leverage slack message blocks and attachments @@ -145,3 +165,5 @@ template.app-sync-failed: | groupingKey: "{{.app.status.sync.revision}}" notifyBroadcast: true ``` + +The message is sent according to the `deliveryPolicy` string field under the `slack` field. The available modes are `Post` (default), `PostAndUpdate`, and `Update`. The `PostAndUpdate` and `Update` settings require `groupingKey` to be set.