Go backend uses Kustomize overlays to manage environment-specific configurations while sharing a common base definition. The K8s cluster is for development and testing (see AGENTS.md section 8); the Go backend’s main deployment is the Fly app gremlin-go-api.

🎯 Environments

Production (production)

  • Namespace: production
  • ArgoCD app: backend-prod, branch main
  • Replicas: 3
  • Auto-Sync: Enabled (prune, selfHeal). .github/workflows/backend-k8s-deploy.yml builds each tested main commit and bumps newTag.
  • Host: go-api-k8s.gremlin.my (Cloudflare Tunnel)
  • Data: extra replicas of the Fly Go backend, on the same go_core_uat database, NATS broker, Redis and secrets. Keep the overlay in step with backend/go/fly.toml.
  • Bun: the Bun backend runs in the same namespace (backend/bun/k8s, ArgoCD app bun-prod, public host bun-api-k8s.gremlin.my). The Go pods reach it in-cluster: BETTER_AUTH_URL=http://prod-bun-backend-service and, for Bun’s private API, BETTER_AUTH_INTERNAL_URL=http://prod-bun-backend-service:3101.

πŸ— Directory Structure