Interview Prep/GitOps & Argo CD/Argo CD Architecture & Internals

How does Argo CD watch so many resource kinds without polling the API server?

AdvancedConceptArgo CD Architecture & Internals
Answer

On startup per cluster, the controller discovers all API resources and starts a watch (list then watch) for each kind it is allowed to see, except excluded ones. Updates stream into the cluster cache, which maintains parent-child relationships via ownerReferences to build resource trees. When a watched object belonging to an app changes, the app is queued for a refresh. That is efficient for reads but costly in memory and initial sync time on large clusters, which is why resource.exclusions and resource.inclusions exist.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Argo CD Architecture & Internals