Commit Graph

6 Commits

Author SHA1 Message Date
Sunny 19a60e98ea event handler: Add k8s events for Alerts
Emit events in the event handler along with logs on the respective alert
to make the message visible on the alert it belongs to.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-11-28 16:17:03 +05:30
Sunny 80f7237673 Refactor event handler
- Break down the EventServer.handleEvent() implementation into multiple
  smaller functions which are extensively tested on their own.
  - New implementation of filter Alerts for Event
  - New implementation of Event matches Alert
- Remove any readiness check on Alert or Provider.
- Add kubebuilder marker for generating RBAC permissions to create and
  patch events, and query Alert and Provider objects.
- Convert the event handler test from controllers/ dir to work with
  just EventServer without any reconciler, keeping all the test cases
  and slightly modified test set up code.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2023-11-28 16:17:03 +05:30
Matheus Pimenta 4e05bc8ee2 Include eventv1.MetaTokenKey on event rate limiting key calculation
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2023-05-24 11:30:14 +02:00
Matheus Pimenta a8af5647e8 Fix revision discarded on event rate limiting key calculation
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2023-05-11 20:10:38 +01:00
Stefan Prodan 224b12a2b8 Refactor notifiers to use Event API v1beta1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-11-22 11:00:25 +00:00
Philip Laine e58fc2c96c Add rate limiter to receiver and event http servers
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2021-04-01 09:48:45 +02:00