Major architecture change: everything now deploys to the apexalgo-iad
Kubernetes cluster via ArgoCD GitOps.
Replaced:
- Cloudflare Pages → Nginx container in Web Pod
- Cloudflare Workers → Go API container in Web Pod (same pod, shared PVC)
- Cloudflare D1 → CNPG PostgreSQL (cnpg-apexalgo cluster)
- Cloudflare R2 → SATA (Cinder CSI) PersistentVolume
- Rackspace Spot → K8s Deployments in ai-code-battle namespace
New infrastructure:
- Web Pod: 2-container pod (Nginx + Go API) sharing an RWO SATA PVC
- Match workers: K8s Deployment with configurable replicas
- Strategy bots: individual Deployments + Services
- Job queue: Valkey (Redis-compatible, existing cluster resource)
- Cron jobs: K8s CronJobs for index building, replay pruning, health checks
- CI/CD: Argo Workflows + Events (GitHub webhook triggers)
- Secrets: SealedSecrets encrypted in git
- TLS: Traefik IngressRoutes + cert-manager
- CDN: Cloudflare free plan as reverse proxy only (no CF services)
- D1 SQLite schema → PostgreSQL (proper types, FKs, indexes, JSONB)
Storage: SATA Cinder CSI (RWO). Web Pod and Index Builder CronJob
share the PVC via node affinity (both scheduled to same node).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>