Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion internal/controller/kustomization_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ func (r *KustomizationReconciler) Reconcile(ctx context.Context, req ctrl.Reques
r.event(obj, revision, originRevision, eventv1.EventSeverityInfo,
fmt.Sprintf("Health checks canceled due to new reconciliation triggered by %s/%s/%s",
qes.Kind, qes.Namespace, qes.Name), nil)
return ctrl.Result{}, nil

// Requeue immediately to ensure the object is reconciled against the new revision in the eventuality
// of stale runtime cache that would cause the source predicate filter to drop the reconcile request.
// In the case where the cache is fresh and the object is already in the queue, the new reconcile request
// will be dropped by the controller runtime dedupe logic, so we don't risk reconciling twice the same revision.
return ctrl.Result{Requeue: true}, nil
Copy link
Copy Markdown
Member

@matheuscscp matheuscscp Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return ctrl.Result{Requeue: true}, nil
return ctrl.Result{RequeueAfter: 1}, nil

Requeue: true is deprecated, the equivalent is RequeueAfter: 1

Last night I also ran tons of tests with and without this fix. I never observed something being reconciled twice after the cancellation and never saw anything get stuck. Without a fix, I was also able to reproduce the issue and managed to make some Kustomizations get stuck.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with Requeue: true in this PR as it's used everywhere. In Flux 2.9 we could replace it in all controllers.

}

// Broadcast the reconciliation failure and requeue at the specified retry interval.
Expand Down
Loading