This is a comprehensive GitOps implementation for deploying the red-infrastructure components (Traefik, Kube-Prometheus-Stack, and KEDA) using ArgoCD following industry best practices.
Get running in 15 minutes! → Quick Start Guide
- GitOps Workflow: Declarative infrastructure management through Git
- ArgoCD: Automated deployment and synchronization
- Multi-Environment Support: Dev, staging, and production configurations
- Security Best Practices: RBAC, secrets management, and secure defaults
- Monitoring: Built-in observability for the GitOps pipeline
- Production Ready: Comprehensive documentation and operational procedures
red-infrastructure-gitops/
├── red-infra/ # Infrastructure & ArgoCD Setup
│ ├── terraform/ # Infrastructure as Code
│ │ ├── main.tf # Main Terraform configuration
│ │ ├── variables.tf # Variable definitions
│ │ ├── outputs.tf # Output values
│ │ └── modules/ # Terraform modules
│ │ ├── network/ # VPC and networking
│ │ ├── iam/ # IAM and Workload Identity
│ │ └── gke/ # GKE cluster configuration
│ ├── argocd-bootstrap/ # ArgoCD installation and config
│ │ ├── install.yaml # ArgoCD installation manifests
│ │ ├── rbac.yaml # RBAC configuration
│ │ ├── projects.yaml # ArgoCD projects
│ │ └── root-app.yaml # Root app pointing to red-apps
│ └── scripts/ # Automation scripts
│ └── bootstrap-argocd.sh # ArgoCD bootstrap script
├── red-apps/ # Applications managed by ArgoCD
│ ├── applications/ # ArgoCD Application definitions
│ │ ├── traefik.yaml # Traefik load balancer
│ │ ├── vault.yaml # HashiCorp Vault
│ │ ├── kube-prometheus-stack.yaml # Monitoring stack
│ │ └── keda.yaml # Event-driven autoscaling
│ ├── helm-charts/ # Helm chart configurations
│ │ ├── traefik/ # Traefik configuration
│ │ ├── vault/ # Vault configuration
│ │ ├── kube-prometheus-stack/ # Monitoring configuration
│ │ └── keda/ # KEDA configuration
│ ├── environments/ # Environment-specific overrides
│ │ └── prod/ # Production values
│ └── k8s-manifests/ # Additional Kubernetes resources
│ └── ingress-routes.yaml # Traefik ingress routes
└── COMPLETE-SETUP-GUIDE.md # Comprehensive setup guide
- Infrastructure Foundation: GKE cluster provisioned via Terraform
- ArgoCD Bootstrap: ArgoCD installed and configured on cluster
- Application Deployment: ArgoCD manages all application deployments
- Configuration Management: Environment-specific values through Git
- Continuous Sync: Automatic synchronization of desired state
| Component | Purpose | Namespace |
|---|---|---|
| ArgoCD | GitOps controller and UI | argocd |
| Vault | Secrets management and encryption | vault |
| Traefik | Load balancer, ingress controller, SSL termination | traefik-v2 |
| Kube-Prometheus-Stack | Monitoring (Prometheus, Grafana, Alertmanager) | monitoring |
| KEDA | Event-driven autoscaling | keda |
- Complete Setup Guide - Comprehensive guide explaining every file and process
- red-infra README - Infrastructure and ArgoCD setup
- red-apps README - Application management guide
- GKE cluster running (from red-infrastructure Terraform)
kubectlconfigured and connected to clusterhelm3.x installed- Git repository access
- Domain name (optional, for ingress)
# Deploy everything (infrastructure + ArgoCD) in one command!
cd red-infra/terraform
terraform init && terraform apply
# Check status
kubectl get applications -n argocd
kubectl get pods -A
# Access ArgoCD UI
kubectl port-forward svc/argocd-server -n argocd 8080:443
# Visit: https://localhost:8080
# Make application changes (ArgoCD auto-syncs)
vim red-apps/helm-charts/traefik/values.yaml
git add . && git commit -m "Update config" && git push- RBAC: Role-based access control for ArgoCD
- Workload Identity: Secure GCP service account integration
- SSL/TLS: Automatic certificate management via Let's Encrypt
- Network Policies: Pod-to-pod communication restrictions
- Secret Management: Kubernetes secrets integration
- Security Contexts: Non-root containers with minimal privileges
| Aspect | Terraform Approach | GitOps Approach |
|---|---|---|
| Deployment | Manual terraform apply |
Automatic sync from Git |
| Rollbacks | Manual state management | One-click rollback in UI |
| Visibility | CLI/logs only | Rich UI with status/health |
| Multi-Environment | Multiple tfvars files | Environment-specific overlays |
| Team Collaboration | Shared state file | Git-based collaboration |
| Drift Detection | Manual terraform plan |
Automatic drift detection |
| Application Updates | Terraform + Helm complexity | Simple Git commit |
Choose your path:
→ Follow the Quick Start Guide
→ Read the Detailed Setup Guide
→ Review GitOps Best Practices
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Issues: Create GitHub issues for bugs or feature requests
- Discussions: Use GitHub discussions for questions
- Documentation: Check the docs/ directory for detailed guides
After successful deployment:
- Configure DNS: Point domains to LoadBalancer IP
- Customize Values: Update environment-specific configurations
- Add Applications: Extend the GitOps pattern to your applications
- Set Up Monitoring: Configure alerts and dashboards
- Implement CI/CD: Integrate with your development workflow
Ready to embrace GitOps? Start with the Quick Start Guide! 🚀