Conversation
|
Looks like we can do this here in this controller because it does not use |
Correct — this controller only uses Eventf, so the migration is a direct swap 😃. |
|
@adri1197 CI is failing, PTAL 🙏 |
Unfortunately, we may have to wait till kubernetes-sigs/controller-runtime#3509 and therefore the upstream k8s MR, in order to merge fluxcd/pkg#1144, which includes |
03a029a to
43987d1
Compare
|
@adri1197 please go over all the PRs and update their description, we are not moving away from core/v1 and the PR should say it. |
43987d1 to
49445c5
Compare
Migrate to fluxcd/pkg/runtime/events.Recorder and emit the GitRepository as the related object so notification-controller can correlate events with their source. Add an Action type and attribute each failure to its reconcile stage. Upgrade the event payload from event/v1beta1 to event/v1. Signed-off-by: Adrian Fernandez De La Torre <adri1197@gmail.com>
49445c5 to
c22a809
Compare
matheuscscp
left a comment
There was a problem hiding this comment.
LGTM! 🚀
Thanks @adri1197!
@stefanprodan main attention point is probably actionForReason(), which looks reasonable to me.
Migrate from the local
eventLogfhelper tofluxcd/pkg/runtime/events.Recorder, aligning with other Flux controllers.events.Recorderand wire it inmain.goviaWithManager(core/v1Kubernetes Event backend); drop the redundant local logging.GitRepositoryas the related object so notification-controller can correlate events with their source.event/v1beta1toevent/v1.Actiontype for the reconcile stages (Reconcile,ListPolicies,ConfigureSource,ApplyPolicies,CommitAndPush) and attribute each failure to its stage.notifytest to assert both theevent/v1webhook payload and thecore/v1Kubernetes Event for every outcome.Part-of: fluxcd/flux2#5761