Skip to content
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

Annotations based enable/disable notifications for a particular object. #133

Closed
codenio opened this issue Jul 27, 2019 · 0 comments · Fixed by #138
Closed

Annotations based enable/disable notifications for a particular object. #133

codenio opened this issue Jul 27, 2019 · 0 comments · Fixed by #138
Assignees
Milestone

Comments

@codenio
Copy link
Contributor

@codenio codenio commented Jul 27, 2019

Is your feature request related to a problem? Please describe.
Disable notification for a particular noisy resource ( least important or consistantly crashing pod) based on
Kubernetes annotations at run time.

Describe the solution you'd like
Adding an annotation to a kubernetes resource at run time, for instance botkube.io/disable-notif: true
will skip the notifications from being sent to the channels.

This provides us control to enable or disable notifications of a particular object at run time.

This can be implemented by adding an annotations fliter.

@sanketsudake sanketsudake added this to the v0.9.0 milestone Aug 8, 2019
PrasadG193 added a commit that referenced this issue Aug 12, 2019
* Add Object Annotation filter

This commit, 
- enables filtering of events based on annotations present in objects at run time.
- annotation `botkube.io/disable: true` disables event notifications for the annotated object
- annotation `botkube.io/channel: <channel_name>` sends events notifications of the annotated object to the mentioned channel.
- adds func `ExtractAnnotations()`. It extract annotations from Event.InvolvedObject and adds them to event.Metadata.Annotations
- implements individual actions using internal functions.
- adds unit tests for internal functions.
- replaces Init() with InitialiseKubeClient() to decouple config.yaml and KubeClinet dependencies from unit testing

* Add build completion message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants