Production-grade GitOps deployment patterns with ArgoCD, demonstrating multi-cluster Kubernetes management, sealed secrets, and declarative application orchestration.
This repository showcases enterprise GitOps patterns using ArgoCD ApplicationSets to manage applications across multiple Kubernetes clusters.
The implementation demonstrates automated application deployment, environment-specific configurations, and GitOps best practices for production infrastructure.
- ApplicationSet generators for automated app deployment across environments
- Separate production and development cluster configurations
- App-of-apps pattern for managing ArgoCD itself
- Kustomize base + overlay pattern for environment-specific configs
- Native Helm chart integration via ArgoCD Applications
- Structured approach to configuration reuse and environment isolation
- Sealed Secrets for encrypted credentials in Git
- Cert-Manager integration for automated TLS certificate management
- Network policies and ingress security controls
apexvirtual-gitops/
├── appsets/
│ ├── prod-cluster-appset.yml # Production cluster ApplicationSet
│ └── dev-cluster-appset.yml # Development cluster ApplicationSet
├── apps/
│ ├── vaultwarden/ # Secure credential management
│ │ ├── base/ # Helm chart Application definition
│ │ └── envs/
│ │ └── prod/ # Production overlay with TLS, ingress
│ ├── traefik/ # Ingress controller
│ │ ├── base/ # Helm chart Application definition
│ │ └── envs/
│ │ ├── prod/ # Production configuration
│ │ └── dev/ # Development configuration
│ ├── cert-manager/ # Automated certificate management
│ ├── monitoring/ # Prometheus + Grafana observability stack
│ └── [additional apps]/ # Following the same pattern
└── root-app.yaml # App of apps entrypoint
The repository uses Git directory generators to automatically discover and deploy applications.
-
Production ApplicationSet (
appsets/prod-cluster-appset.yml):- Scans for
apps/*/envs/proddirectories - Deploys to the local cluster
- Creates Applications named
{app-name}-prod
- Scans for
-
Development ApplicationSet (
appsets/dev-cluster-appset.yml):- Scans for
apps/*/envs/devdirectories - Deploys to remote dev cluster at
https://dev-cluster.lab.apexvirtual.internal:6443 - Creates Applications named
{app-name}-dev
- Scans for
Each application follows a consistent structure:
apps/{app-name}/
├── base/
│ ├── {app-name}-app.yaml # ArgoCD Application (for Helm charts)
│ └── kustomization.yaml
└── envs/
├── prod/
│ ├── helm-values-patch.yaml
│ ├── kustomization.yaml
│ └── [additional resources]
└── dev/
├── helm-values-patch.yaml
├── kustomization.yaml
└── [additional resources]
The base defines the Application resource pointing to a Helm chart, while environment overlays provide values patches and additional resources like Certificates and IngressRoutes.
- Base (
apps/vaultwarden/base/vaultwarden-app.yaml): Defines ArgoCD Application pointing to the Vaultwarden Helm chart - Production Overlay (
apps/vaultwarden/envs/prod/):- Custom Helm values via strategic merge patch
- Certificate resource for TLS via cert-manager
- IngressRoutes for external and internal access
- Sealed secret for admin credentials
- Traefik: Ingress controller with TLS termination and middleware
- Cert-Manager: Automated Let's Encrypt certificate management
- Sealed Secrets: Encrypted secrets for GitOps workflows
- Vaultwarden: Self-hosted password manager
- Monitoring Stack: Prometheus operator, Grafana, node-exporter, kube-state-metrics
- Longhorn: Distributed block storage
- Portainer: Container management interface
- Homepage: Internal dashboard (manifests available upon request)
- ApplicationSets continuously scan the Git repository
- New directories matching
apps/*/envs/{prod|dev}are detected → Applications are created - ArgoCD syncs Applications to their target clusters
- Kustomize merges base configurations with environment overlays
- Resources are applied with automated pruning and self-healing
- GitOps: ArgoCD with ApplicationSets
- Configuration: Kustomize with strategic merge patches
- Package Management: Helm charts via ArgoCD integration
- Secrets: Sealed Secrets (Bitnami)
- Ingress: Traefik with custom middlewares
- Certificates: Cert-Manager with Let's Encrypt
- Monitoring: Prometheus Operator + Grafana
- Why ApplicationSets? → Scalable automation, no manual Application creation.
- Why Kustomize patches? → Modify base Applications with environment-specific values while staying DRY.
- Why base + overlays? → Maximize reuse, allow per-environment customization.
- Infrastructure Provisioning: apexvirtual-terraform - Terraform IaC for multi-cluster Kubernetes
- Configuration Management: apexvirtual-ansible - Ansible automation for bare metal and VMs
- Main Platform Overview: corneb - Complete ApexVirtual platform documentation
Status: Production-ready infrastructure patterns
Maintained: Active development
GitOps deployment architecture for the ApexVirtual platform - showcasing declarative Kubernetes management at scale.