fleet
fleet copied to clipboard
Replace RequeueAfter with polling factory
Fleet's current polling implementation for GitOps relies on an implementation detail of how controller-runtime interacts with the client-go queue.
More specifically, the fact that, for a given object, controller-runtime drops events with a higher timestamp from the queue if an event with a lower timestamp already exists enables Fleet to run fewer reconcile cycles for GitRepo resources.
We need to refactor this as it exposes Fleet to unwanted surges in reconcile cycles if that behaviour were to be altered. Instead, Fleet should schedule polling jobs, for instance using go-quartz.
Related to https://github.com/rancher/fleet/issues/3746.