Skip to content

Adopt pkg/runtime/events.EventRecorder in reconcilers#889

Draft
adri1197 wants to merge 1 commit into
fluxcd:mainfrom
adri1197:event-recorder
Draft

Adopt pkg/runtime/events.EventRecorder in reconcilers#889
adri1197 wants to merge 1 commit into
fluxcd:mainfrom
adri1197:event-recorder

Conversation

@adri1197

@adri1197 adri1197 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Replace k8s.io/client-go/tools/record.EventRecorder with github.com/fluxcd/pkg/runtime/events.EventRecorder in both ImageRepositoryReconciler and ImagePolicyReconciler.

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:

  • Switch reconciler EventRecorder field to events.EventRecorder
  • Remove the eventLogf helper in favor of direct Eventf calls
  • Update notify to accept events.EventRecorder (drops unused ctx param)
  • Bump event API import from event/v1beta1 to event/v1
  • Update all test fakes to events.NewFakeRecorder

Closes fluxcd/flux2#5761

 - 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implementation new K8s Events API - v1

1 participant