-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Slack app #245
Conversation
@stefanprodan @phillebaba I'm sorry to ping you guys, but is this PR blocked by something, or is there something I can do? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmitriishaburov can you please add a Slack App section to the API docs here: https://github.com/fluxcd/notification-controller/blob/main/docs/spec/v1beta1/provider.md#example
@dmitriishaburov have you tested this? How did you generated the token? can the same token be used to post to different channels? |
@stefanprodan thanks, will update docs soon.
Only by building docker image and running it in our cluster, checking that both webhook and app methods working properly.
Yes, that's the main reason behind PR - you can use same set of credentials to post into different channels. One main issue - Slack is ignoring the Edit: here's an example from Grafana docs, which supports Slack app https://grafana.com/docs/grafana/latest/alerting/old-alerting/notifications/#slack |
@dmitriishaburov thanks for answering my questions. I think the token generation steps and the username omission should be added to the docs along with an example. |
+1 for this - anything I can do to help, let me know. |
Sorry for being lost for a while.
Did some research on username omission with Slack app. Although it is possible to grant apps rights to change username, that brings:
Probably it's better to avoid this functionality. Also there is minor (or not?) issue. |
Signed-off-by: Dmitrii Shaburov <dmitrii.shaburov@bolt.eu>
Signed-off-by: Dmitrii Shaburov <dmitrii.shaburov@bolt.eu>
Signed-off-by: Dmitrii Shaburov <dmitrii.shaburov@bolt.eu>
We read the secret from Kubernetes API each time https://github.com/fluxcd/notification-controller/blob/main/internal/server/event_handlers.go#L143 but the client has an internal cache. Please open an issue if the failure persists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @dmitriishaburov 🏅
Closes #244
Add token support for Slack notification provider, combined with configuring webhook url to https://slack.com/api/chat.postMessage will allow to send notifications as Slack App.
Do I need to write documentation for Slack notification provider?
Currently project doesn't have any, so it won't be clear that Slack apps are supported.