Go backend uses Kustomize overlays to manage environment-specific configurations while sharing a common base definition.

🎯 Environment Strategy

We maintain four distinct environments with increasing levels of automation and resource allocation:

1. Development (dev)

  • Namespace: development
  • Replicas: 1
  • Auto-Sync: Fully enabled
  • Goal: Rapid iteration for developers.

2. UAT (uat)

  • Namespace: uat
  • Replicas: 2
  • Auto-Sync: Fully enabled
  • Goal: User acceptance testing and QA.

3. Staging (staging)

  • Namespace: staging
  • Replicas: 3
  • Auto-Sync: Semi-automated (manual approval)
  • Goal: Pre-production validation in a production-identical environment.

4. Production (prod)

  • Namespace: production
  • Replicas: 5+
  • Auto-Sync: Manual only
  • Goal: High availability and stability for end users.

🏗 Directory Structure

backend/k8s/
├── base/              # Common configuration
└── overlays/          # Environment overrides
    ├── development/
    ├── uat/
    ├── staging/
    └── production/

🚀 Promotion Workflow

  1. Feature branch is merged into develop.
  2. ArgoCD auto-deploys to the development environment.
  3. After verification, develop is merged into uat.
  4. After QA sign-off, uat is merged into staging.
  5. Finally, staging is merged into main for Production deployment.

Summary

This multi-environment approach ensures that features are thoroughly tested before reaching production, minimizing the risk of regressions.