Why is the application controller a StatefulSet rather than a Deployment?
AdvancedConceptArgo CD Architecture & Internals
Answer
For sharding. Each replica needs a stable ordinal (argocd-application-controller-0, -1...) to know which clusters it owns. With ARGOCD_CONTROLLER_REPLICAS=N, each pod computes its shard from its ordinal and processes only clusters assigned to that shard. A Deployment's random pod names would not give that stable identity. (Newer releases also offer dynamic cluster distribution, which runs the controller as a Deployment and stores assignments in a ConfigMap.)
More on Argo CD Architecture & Internals
What are the main components of Argo CD?BeginnerWhat does the argocd-repo-server do, and what does it not do?BeginnerWhat does the application controller do on each reconcile?IntermediateWhat is stored in Redis, and what happens if Redis is lost?IntermediateWhere does Argo CD keep its configuration?BeginnerHow does the Argo CD CLI talk to the server?Beginner