argoproj-labs / argocd-notifications

Notifications for Argo CD
https://argocd-notifications.readthedocs.io/
Apache License 2.0
493 stars 141 forks source link

Approval from Slack for Syncing #93

Open RyanSiu1995 opened 4 years ago

RyanSiu1995 commented 4 years ago

Slack support an interactive notification on the incoming webhook. We can turn the notification as a sync request and make this as ChatOps. This can let the user approve/disapprove the important sync.

nhuray commented 4 years ago

I have the same idea also to easily rollback to a previous version.

But considering argocd can be configured with OIDC or SAML I'm not sure it's easy to call the API directly, but we can from the Slack notification open ArgoCD for the right project

matoszz commented 4 years ago

I've been trying to do something like this, I think it's possible but I haven't figured out a great way to do it without having access to Argo's CLI. I got the notifier to send the message to slack with a button, something like this:

                  "type": "actions",
                  "elements": [
                    {
                      "type": "button",
                      "text": {
                        "type": "plain_text",
                        "emoji": true,
                        "text": "Sync App"
                      },
                      "url": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?deploy=all"
                    }
                  ]
                }
              ]

The URL behind the button I just point back to ArgoCD's UI on the sync screen but you could also have this point back to Argo's API to initiate a sync operation from slack. It would be even better to just develop this as a native slack app similar to how PagerDuty does their interactive buttons

vainkop commented 2 years ago

Any ETA on this feature availability? :)