Commit Graph

14 Commits

Author SHA1 Message Date
Matheus Pimenta ae6cc4b4f6 Reduce logging repeated code in event server
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2023-06-12 14:26:59 +01:00
Hidde Beydals b7cccbee81 Prefix event key attributes with identifier
This to prevent collisions between different event attributes.

For example when first an event with revision `foo` is received
without a token, after which a token `foo` is received without a
revision.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-05-24 15:52:46 +02:00
Matheus Pimenta 8c11d8a19b Fix Alert .spec.eventMetadata behavior
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2023-05-24 11:27:27 +01:00
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
Stefan Prodan 44c08a2659
Allow disabling cross-namespace event sources
Introduce the flag `--no-cross-namespace-refs` (defaults to false) for allowing cluster admins to disable cross-namespace event sources for alerts.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-28 10:30:31 +02:00
Ali AKCA 7ded18f850
chore: Drop deprecated io/ioutil
Signed-off-by: Ali AKCA <ali@akca.io>
2021-10-27 09:44:51 +02:00
Philip Laine 97e4e2e552 Fix log verbosity and document event rate limiting
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2021-04-01 10:47:33 +02:00
Philip Laine 295c8f792d Add debug logging when rate limiting events
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2021-04-01 10:21:20 +02: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
Michael Bridgen 440d96487a Test case for minimal event forwarding
This adds some scaffolding for testing that events are forwarded as
specified by alerts.

The controllers themselves aren't needed; but since the
internal/server package refer directly to Kubernetes resources, the
tests share prerequisites with controller tests. For that reason I
have started by putting these tests in controllers/.

I have tried not to touch the server code itself, but it was necessary
to change it to use a fresh http.ServerMux rather than the (global)
default, so that the tests can create an event server each.

Signed-off-by: Michael Bridgen <michael@weave.works>
2021-02-23 12:17:51 +00:00
Stefan Prodan 2437884a97
Change copyright to Flux authors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-27 18:52:14 +02:00
stefanprodan 368c13af28 Implement GitRepository hook 2020-07-03 18:32:34 +03:00