Repository navigation
Migrate event recorder to fluxcd/pkg/runtime/events.Recorder - #1621
Conversation
f54cb01 to
b3a664e
Compare
|
Hey @adri1197 please rebase all your PRs, we have upgraded to k8s 1.37 across all controllers and bumped most fluxcd/pkg packages. The only remaining dep for you to bump across your PRs is fluxcd/pkg/runtime. Please start with kustomize-controller as there's another PR depending on the runtime bump 🙏 |
b3a664e to
5d3f654
Compare
matheuscscp
left a comment
There was a problem hiding this comment.
LGTM! 🚀
Thanks @adri1197!
This is not true, deduplication will never happen now because |
|
We will do what's described here now: #1742 (comment) Please rebase after that! 🙏 |
|
@adri1197 All done, please rebase! 🙏 |
dcd41bb to
34ff9e9
Compare
matheuscscp
left a comment
There was a problem hiding this comment.
LGTM! 🚀
Thanks @adri1197!
34ff9e9 to
92400d2
Compare
|
Found some major blockers:
|
|
Given the 1024 limit of the event message, we can not ship this as is, all of Flux observability is built on the assumption that the events cary the desired state changes and errors. With 1024 limit, KC can no longer issue events with the list of applied changes, dry-run errors will no longer be surfaced to users, HC can no longer report helm upgrade errors, etc. |
92400d2 to
ef61d64
Compare
ef61d64 to
34a7389
Compare
|
@adri1197 Please regenerate the api docs, they are having a diff in CI 🙏 |
34a7389 to
b7ade87
Compare
Done! 😃 |
a7161bc to
d2cad74
Compare
d2cad74 to
f5326ca
Compare
matheuscscp
left a comment
There was a problem hiding this comment.
LGTM! 🚀
Thanks @adri1197!
|
Hey @adri1197 Stefan just found an issue, we are defining lots of Action constants that arent used anywhere, we cant do that, lets remove them pls 🙏 Also, if you 're using an LLM please disclose it as described in our AI guidelines 🙏 |
Sorry, my bad.. Just used it to summarize the actions within the existing events. Working on it. Will add the trailing message about AI in the commit msg, as well. |
- Replace kuberecorder.EventRecorder with events.Recorder to support structured event metadata including source object and action type - Upgrade event API from event/v1beta1 to event/v1 - Add action parameter (Reconciled, Failed, Waiting, Applied, Deleted, Progressing) to all event calls for richer event semantics - Pass source reference through reconcile, apply, prune, checkHealth, and finalize methods - Update tests to use events.Recorder Signed-off-by: Adrian Fernandez De La Torre <adri1197@gmail.com> Assisted-by: Kiro/Auto
f5326ca to
acd6b9d
Compare
|
Thanks @adri1197, next please do source-controller and image-automation-controller as the pkg/runtime upgrade is blocking these PRs: |
Migrate the controller's event recorder to
fluxcd/pkg/runtime/events.Recorderand the Kubernetes event API from v1beta1 to v1, so events carry structured metadata (source object reference and action type).kuberecorder.EventRecorderwithevents.Recorder, constructed viaevents.NewRecorder(...,events.WithManager(mgr)).Actioninapi/v1describing the observable stages of the reconcile loop, and emit one on every event call:Reconcile,CheckDependencies,ResolveSource, etc.reconcile,apply,prune,checkHealth, andfinalizeso each event records the originating source.fluxcd/pkg/runtimeto v0.115.0 andfluxcd/pkg/apis/eventto v0.30.0.events.Recorderandevents.k8s.io/v1event API.Part of - fluxcd/flux2#5761