-
Notifications
You must be signed in to change notification settings - Fork 121
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
Slack notification integration #158
Conversation
Added attachment to slack notification Fixed tests for notifier, added slack
@GaruGaru Thank you! That looks pretty complete. 😃 Do you mind if I push some slight changes here and there? |
Hi @linki Feel free to make as many changes as needed ! |
@GaruGaru I refactored it a bit but didn't change any behaviour. |
I changed the notification interface to take a Pod directly. I hope that's ok. NotifyTermination(pod v1.Pod) error |
Thank you for the feedback! Looks good to me, the only thing that I'm not sure about is the Notifier interface NotifyTermination method, in the future chaoskube may support node (or other resources) termination, so the |
@GaruGaru I understand and it makes sense. In this project I tried to keep things simple and don't think too far ahead even if it breaks the API later. So I'm in favour of But honestly I'm fine with both, so let's do the version you prefer 😃 |
I get your point and thank you for letting me choose the method naming :D I think that NotifyPodTermination is more coherent with the method signature. |
@GaruGaru Thank you very much! |
Released in version v0.17.0. |
Nice, Thank you very much ! |
As proposed in #101 this add the support for notifications with slack webhooks and also add a notifier interface that allows the implementation of other providers (as proposed by @linki ) with tests for both chaoskube integration and slack specific code.
The notifier is enabled by the
--slack-webhook
flag, the notifier itself is also wrapped by aNotifiers
struct that allow the support for multiple notifiers at once (like prometheus alert manger notification system).Result