kubewarden / kubewarden-controller

Manage admission policies in your Kubernetes cluster with ease
https://kubewarden.io
Apache License 2.0
189 stars 33 forks source link

Emit Kubernetes events for policy status change #616

Open viccuad opened 7 months ago

viccuad commented 7 months ago

This comes from https://www.youtube.com/watch?v=KbKQu3AqhBY.

Currently only tracing and monitoring give insights on Kubewarden policy state.

Policies have status (unscheduled, pending, active). But that that if policies are already deployed and active in a policy-server, scheduling a change of them (for rules, settings, etc), would not move back to pending and again to active. Since the old instantiated policy is still reachable via the webhook and the old policy-server pod. This can be confusing in UI and for new users.

Acceptance criteria

viccuad commented 7 months ago

Having events would help downstream (such as Kubewarden UI) in checking against them, instead of only looking at state. Amelioriating things like https://github.com/rancher/kubewarden-ui/issues/543.