Open-Source Wikis

/

Argo CD

/

Argo CD

/

Architecture

argoproj/argo-cd

Architecture

Argo CD runs as multiple cooperating Kubernetes deployments. Each binary is built from the same Go module (github.com/argoproj/argo-cd/v3) and dispatched by cmd/main.go based on the binary name. The same image therefore produces the API server, application controller, repo server, ApplicationSet controller, commit server, CMP server, notifications controller, and small helper binaries.

graph TD
    subgraph Users
      CLI[argocd CLI]
      UI[Web UI - React]
      Hooks[Git/CI Webhooks]
    end

    subgraph ArgoCD["Argo CD control plane"]
      Server[argocd-server\nAPI + Web]
      Controller[argocd-application-controller]
      RepoServer[argocd-repo-server]
      AppSet[argocd-applicationset-controller]
      Notifications[argocd-notifications-controller]
      CommitSrv[argocd-commit-server]
      CMP[argocd-cmp-server]
      Dex[argocd-dex\n(OIDC bridge)]
    end

    subgraph External
      Git[(Git/Helm/OCI repos)]
      K8sAPI[(Kubernetes API)]
      Redis[(Redis cache)]
    end

    CLI -->|gRPC over HTTP/2| Server
    UI -->|gRPC-Web/REST| Server
    Hooks --> Server
    Server --> K8sAPI
    Server --> Redis
    Server --> Dex

    Controller --> K8sAPI
    Controller --> RepoServer
    Controller --> CommitSrv
    Controller --> Redis

    RepoServer --> Git
    RepoServer --> Redis
    RepoServer --> CMP

    AppSet --> K8sAPI
    AppSet --> Git
    Notifications --> K8sAPI

The binaries

The single cmd/main.go switches on binaryName (or the ARGOCD_BINARY_NAME env var) and starts one of these commands. See cmd/main.go for the dispatch table.

Binary Source Purpose
argocd cmd/argocd/commands/root.go CLI used by humans and CI to talk to the API server.
argocd-server cmd/argocd-server/commands/argocd_server.go gRPC + REST API + static UI.
argocd-application-controller cmd/argocd-application-controller/commands/argocd_application_controller.go Reconciles Application CRs, orchestrates sync.
argocd-repo-server cmd/argocd-repo-server/commands/argocd_repo_server.go Renders manifests from Git/Helm/OCI/Kustomize/CMP.
argocd-applicationset-controller cmd/argocd-applicationset-controller/commands/ Generates Applications from ApplicationSet generators.
argocd-commit-server cmd/argocd-commit-server/commands/ Receives hydrated manifests, commits them back to Git.
argocd-cmp-server cmd/argocd-cmp-server/commands/ Sidecar Config Management Plugin gRPC server.
argocd-notifications cmd/argocd-notification/commands/ Sends notifications based on triggers/templates.
argocd-dex cmd/argocd-dex/commands/ Wraps Dex with Argo CD OIDC config.
argocd-git-ask-pass cmd/argocd-git-ask-pass/commands/ Helper invoked by git as the GIT_ASKPASS provider.
argocd-k8s-auth cmd/argocd-k8s-auth/commands/ Helper used as a kubectl exec plugin for cluster auth.

Core data flow: from Git to cluster

sequenceDiagram
    actor Dev
    participant Git
    participant Webhook as argocd-server (webhook)
    participant AppCtrl as argocd-application-controller
    participant RepoSrv as argocd-repo-server
    participant K8s as Kubernetes API

    Dev->>Git: Push manifests
    Git->>Webhook: Webhook notification
    Webhook->>AppCtrl: Refresh Application
    AppCtrl->>RepoSrv: GenerateManifests(repo, revision)
    RepoSrv->>Git: Clone / fetch
    RepoSrv-->>AppCtrl: Rendered manifests
    AppCtrl->>K8s: Diff vs live state
    AppCtrl->>K8s: Apply (sync)
    AppCtrl-->>Dev: Application status (UI/CLI)

The application controller pulls manifests from the repo server and applies them to the target cluster using the same gitops-engine library that powers Argo Rollouts. The repo server is the only component that talks to source repositories. The API server never touches Git directly; it brokers user requests and proxies to the controller and repo server through cached state and Kubernetes resources.

Process boundaries

  • Stateless services. All components are stateless. State lives in Kubernetes (Applications, AppProjects, Secrets, ConfigMaps), Git (desired state), and Redis (cache + queues). See util/cache/ and util/cache/appstate/.
  • Redis as the message bus. The application controller publishes app state into Redis; the API server reads from Redis to serve UI requests without thrashing the controller. The cache key schema and clients are in util/cache/cache.go.
  • CRD-driven control plane. Every "thing" Argo CD manages is a CRD: Application, AppProject, ApplicationSet. CRDs are defined in pkg/apis/application/v1alpha1/. CRD YAMLs are generated under manifests/crds/.

Frontend

The web UI is a React + TypeScript single-page application built with webpack (ui/src/app/webpack.config.js). The compiled bundle is embedded into the argocd-server binary via ui/embed.go and served on the same listener that hosts the gRPC-Web and REST endpoints.

UI source layout (ui/src/app/):

  • applications/ — application list, details, tree, sync UI
  • settings/ — repo, cluster, project, account, certificate, GPG key, plugin admin
  • login/, user-info/ — authentication flows
  • help/, ui-banner/, sidebar/, shared/ — shared components and chrome

See also

  • Applications — per-binary deep dives.
  • Features — sync, RBAC, ApplicationSets, notifications, hydrator.
  • Primitives — the CRDs that drive everything.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Architecture – Argo CD wiki | Factory