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

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.)

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

More on Argo CD Architecture & Internals