The ClusterDecisionResource generator relies on periodic requeuing to detect changes to the duck-type resource being used for decisions. It would be great if we were able to detect changes without requeuing.
Motivation
It's desirable for ArgoCD to react to changes to the decision resource as fast as possible. The default requeue interval in the generator is 3m and the examples on the docs suggest a requeue interval of 1m. However, most of the time this is just wasting CPU cycles on both the controller and the k8s API server, and it gets worse as we lower the requeue interval if one wants to detect changes faster.
Proposal
Instead of relying only on requeues, the controller could create an Informer for the duck-type resource and WATCH it for changes instead. This would require some rework on the main appset controller but it should be doable. If there are no objections I can try working on a PR for this.
Summary
The ClusterDecisionResource generator relies on periodic requeuing to detect changes to the duck-type resource being used for decisions. It would be great if we were able to detect changes without requeuing.
Motivation
It's desirable for ArgoCD to react to changes to the decision resource as fast as possible. The default requeue interval in the generator is 3m and the examples on the docs suggest a requeue interval of 1m. However, most of the time this is just wasting CPU cycles on both the controller and the k8s API server, and it gets worse as we lower the requeue interval if one wants to detect changes faster.
Proposal
Instead of relying only on requeues, the controller could create an Informer for the duck-type resource and WATCH it for changes instead. This would require some rework on the main appset controller but it should be doable. If there are no objections I can try working on a PR for this.