Design Philosophy
Argo CD is designed with a component-based architecture that provides:Modularity
Components interact via interfaces, allowing replacement without system-wide changes
Single Responsibility
Clear boundaries help determine where functionality should be implemented
Reusability
Well-defined interfaces promote service discoverability and reuse
Architecture Overview
The default Argo CD installation includes multiple components and Kubernetes controllers. Controllers use proprietary interfaces (CRDs) and lack the modular nature of components.
Logical Layers
Argo CD’s architecture is organized into four logical layers with top-down dependencies:UI Layer
The presentation layer where users interact with Argo CD.Web App
Powerful web interface for managing applications deployed in Kubernetes clusters
CLI
Command-line tool for automation, scripting, and interacting with the Argo CD API
Application Layer
Provides capabilities supporting the UI layer.API Server
Exposes the proprietary API that powers both the Web App and CLI functionality. Handles authentication, authorization, and request routing.
Core Layer
Implements the main GitOps functionality through components and Kubernetes controllers.- Application Controller
- ApplicationSet Controller
- Repo Server
- Notifications Controller
Responsibilities:
- Reconciles Application resources in Kubernetes
- Synchronizes desired state (from Git) with live state (in Kubernetes)
- Reconciles Project resources
- Continuously monitors and maintains application health
Infrastructure Layer
Tools that Argo CD depends on for its infrastructure.Redis
Redis
Purpose:
- Provides caching layer to reduce requests to Kubernetes API and Git providers
- Supports UI operations
- Improves performance and responsiveness
Kubernetes API
Kubernetes API
Purpose:
- Controllers connect to Kubernetes API for the reconciliation loop
- Stores all Argo CD resources and configuration
- Target for application deployments
Git/Helm/OCI Repository
Git/Helm/OCI Repository
Purpose:
- Stores desired state of Kubernetes resources
- Source of truth for GitOps workflows
- Supports Git repos, Helm repos, and OCI artifact repos
Dex
Dex
Purpose:
- Provides authentication with external OIDC providers
- Enables SSO integration
- Can be replaced with other OIDC solutions
Component Dependencies
The diagram shows dependencies between components:
Dependency Rules:
- Components in upper layers may depend on components in lower layers
- Components in lower layers never depend on components in upper layers
- This maintains clear separation of concerns and prevents circular dependencies
Development Implications
Working with the Repo Server
When developing features that involve manifest generation:Understand the Pipeline
Source (Git/Helm/OCI) → Repo Server → Manifests → Application Controller → Kubernetes
Consider Caching
Redis caches results to improve performance. Clear cache during development for testing.
Working with Controllers
When modifying controller behavior:API Server Development
When adding API endpoints:Port Reference
When running locally or debugging:| Component | API Port | Metrics Port | Debug Port |
|---|---|---|---|
| argocd-server | 8080 | 8083 | 9345 |
| argocd-repo-server | 8081 | 8084 | 9346 |
| argocd-redis | 6379 | - | - |
| argocd-applicationset-controller | - | 8085 | 9347 |
| argocd-application-controller | - | 8086 | 9348 |
| argocd-notifications-controller | - | 8087 | 9349 |
Resource Storage
Argo CD stores its state in Kubernetes as Custom Resources:- Application
- ApplicationSet
- AppProject
Next Steps
Running Locally
Run Argo CD components locally for development
Debugging
Debug Argo CD components
UI Extensions
Extend the Argo CD web interface
Custom Health Checks
Add health checks for custom resources