Adopt pkg/runtime/events.EventRecorder in reconcilers#889
Draft
adri1197 wants to merge 1 commit into
Draft
Conversation
- The changes replace k8s.io/client-go/tools/record.EventRecorder with github.com/fluxcd/pkg/runtime/events.EventRecorder. - Remove the now-unused eventLogf helper, update the notify function signature, switch to event/v1 from event/v1beta1. - Update all test fakes to use events.NewFakeRecorder. Signed-off-by: Adrian Fernandez De La Torre <adri1197@gmail.com>
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace
k8s.io/client-go/tools/record.EventRecorderwithgithub.com/fluxcd/pkg/runtime/events.EventRecorderin bothImageRepositoryReconcilerandImagePolicyReconciler.This aligns the controller with the Flux event recording interface, which routes events through the notification system and supports trace-level severity via
event/v1.Changes:
EventRecorderfield toevents.EventRecordereventLogfhelper in favor of directEventfcallsnotifyto acceptevents.EventRecorder(drops unusedctxparam)event/v1beta1toevent/v1events.NewFakeRecorderCloses fluxcd/flux2#5761