generated from coulomb/repo-seed
Core Hub production deployment (hub.coulomb.social cutover)
30-ingress.yaml is the cutover flip — do NOT apply it while the inter-hub
ingress still claims hub.coulomb.social.
Sequence
# 1. Image (operator: registry push)
IMAGE_REPOSITORY=gitea.coulomb.social/coulomb/core-hub IMAGE_TAG=<sha> make container-build
docker push gitea.coulomb.social/coulomb/core-hub:<sha>
# 2. Prod DB + secret (operator: shared-DB DDL)
# role core_hub / db core_hub on apps-pg; secret core-hub-prod-env with
# CORE_HUB_DATABASE_URL (postgresql+asyncpg://...apps-pg-rw.databases...:5432/core_hub)
# and CORE_HUB_API_TOKEN (generated)
# 3. Deploy (no traffic yet)
kubectl apply -f k8s/railiance-production/00-namespace.yaml
kubectl apply -f k8s/railiance-production/20-runtime.yaml
kubectl -n core-hub set image job/core-hub-prod-migrate migrate=gitea.coulomb.social/coulomb/core-hub:<sha>
kubectl -n core-hub set image deploy/core-hub-api api=gitea.coulomb.social/coulomb/core-hub:<sha>
kubectl -n core-hub wait --for=condition=complete job/core-hub-prod-migrate --timeout=180s
kubectl -n core-hub rollout status deploy/core-hub-api --timeout=180s
# 4. Final data import (fresh Inter-Hub export at cutover time)
kubectl exec -i -n databases net-kingdom-pg-1 -- psql -U postgres -d interhub -tA \
< scripts/migration/inter_hub_export.sql > final-bundle.json
# validate, then import in-cluster (see scripts/migration/README.md)
# 5. THE FLIP (operator approval point)
kubectl -n inter-hub delete ingress inter-hub
kubectl apply -f k8s/railiance-production/30-ingress.yaml
# cert-manager issues core-hub-tls for hub.coulomb.social (~1 min)
# 6. Verify
curl -s https://hub.coulomb.social/healthz # 200
curl -s https://hub.coulomb.social/api/v2/widget-types | head -c 200
curl -s -o /dev/null -w '%{http_code}' https://hub.coulomb.social/api/v2/hubs # 401 = hardened contract
## Rollback (any time; Inter-Hub deployment stays running)
kubectl delete -f k8s/railiance-production/30-ingress.yaml
kubectl -n inter-hub apply -f <saved inter-hub ingress> # or helm upgrade inter-hub
Keep the Inter-Hub deployment/service running untouched until stabilization passes (CORE-WP-0005-T04); only the ingress moves.