notification-controller icon indicating copy to clipboard operation
notification-controller copied to clipboard

Support `warning` as event severity

Open viceice opened this issue 1 year ago • 4 comments

https://github.com/fluxcd/notification-controller/blob/2ebbf4803aa83d49a29d1068b2925cd1b0f19f70/api/v1beta3/alert_types.go#L36-L41

I like to get notifications for helm drift detection warnings, but not for normal info events. Currently the setting can only be set to info or error.

Alert/flux-system/warnings dry-run failed (Invalid): Alert.notification.toolkit.fluxcd.io "warnings" is invalid: spec.eventSeverity: Unsupported value: "warning": supported values: "info", "error"

viceice avatar Oct 10 '24 12:10 viceice

Flux events are Kubernetes events which only support two states success or error.

stefanprodan avatar Oct 10 '24 12:10 stefanprodan

Flux events are Kubernetes events which only support two states success or error.

why the drift events are shown as warning then? 🤔

viceice avatar Oct 10 '24 16:10 viceice

Kubernetes event type is Normal and Warning, there is no middle ground.

stefanprodan avatar Oct 10 '24 17:10 stefanprodan

OK, so the drift warning should be send as error via flux alert config? Why i don't get it send then? 🤔

viceice avatar Oct 11 '24 09:10 viceice

Ok, i now know it. My alert only listen on flux-system namespace 🤦‍♂️

Can we make the namespace to allow wildcard? so i don't need to repeat the eventSources for each namespace?

viceice avatar Oct 24 '24 08:10 viceice

  • #784

viceice avatar Oct 24 '24 08:10 viceice