runtime: Migrate to new Kubernentes event API - #1144
Conversation
|
What's the minimum k8s version for this to work? |
matheuscscp
left a comment
There was a problem hiding this comment.
The lib should support related and let callers decide whether or not to use it
We should also add |
Looks like it became GA in 1.19 - KEP-383 |
stefanprodan
left a comment
There was a problem hiding this comment.
Please undo all changes to events/v1beta1 and add events/v1.
Also go.mod changes are unrelated, please undo.
|
Shall the naming conventions be aligned, Table (KEP-383)
|
70e41ea to
7532591
Compare
7ebb1d7 to
d51ad46
Compare
141e229 to
7f5628b
Compare
|
|
||
| require ( | ||
| github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 | ||
| github.com/fluxcd/cli-utils v1.2.2 |
There was a problem hiding this comment.
There seems to be a dependency with controller-runtime, which downgrades cli-utils to github.com/fluxcd/cli-utils v1.2.0. Shall it be upgraded there first? - fluxcd/cli-utils#38
Add apis/event/v1 typed schema and update the runtime events recorder to emit eventsv1.Event objects instead of the legacy corev1.Event type. Introduce a FakeRecorder for testing and a GetEvents helper in runtime/testenv for asserting on emitted events in integration tests. Signed-off-by: Adrian Fernandez De La Torre <adri1197@gmail.com>

Event Recorder implementation to fully support the Kubernetes Events API
events.k8s.io/v1(replacingk8s.io/client-go/tools/recordtok8s.io/client-go/tools/eventsmodule). The recorder implements theevents.EventRecorderinterface, enabling compatibility with modern Kubernetes event handling while maintaining backward compatibility for existing webhook-based notifications.Closes fluxcd/flux2#5761