fluxcd / notification-controller

The GitOps Toolkit event forwarder and notification dispatcher
https://fluxcd.io
Apache License 2.0
150 stars 133 forks source link

Support `warning` as event severity #950

Open viceice opened 1 week ago

viceice commented 1 week ago

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"
stefanprodan commented 1 week ago

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

viceice commented 1 week ago

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

why the drift events are shown as warning then? 🤔

stefanprodan commented 1 week ago

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

viceice commented 1 week ago

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