Baseline for the Kong replacement on api.riotpiao.com. Brings the working tree under version control for the first time: gateway source, the task board that drives the agent runs, test fixtures, and K8s manifests. Anchor the gateway ignore rule to the repo root. Unanchored, "gateway" also matched the cmd/gateway/ source directory, so the program entrypoint was excluded from every commit. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2.2 KiB
2.2 KiB
6.4 — Deploy unexposed alongside Kong (GREEN)
Phase: 6 — Deploy and cutover Stage: GREEN Depends on: 6.3
The gateway runs in the cluster against the real predictors while Kong continues to serve every byte of live traffic. This is the last step before anything user-visible changes, and it is fully reversible — deleting the Application removes it.
- The gateway is running in namespace
apiand is reachable only in-cluster athttp://<svc>.api.svc.cluster.local - No Ingress points at the gateway. Ingress
api/apistill sends/onapi.riotpiao.comtokong-proxy:80 - Its configured upstreams are the real Services:
reasoning-predictor.llm-serving:80,ornith-predictor.llm-serving:80,embeddings-predictor.llm-serving:80,reranker-predictor.llm-serving:80, andagent-hub.agent-pod:9090 - Note
reasoning-predictorlistens on port 80, not 8080 - A real chat completion succeeds in-cluster against
reasoning, returningreasoning_contentandcontentas separate fields - A streaming chat completion delivers tokens incrementally in-cluster, not as one buffered blob at completion
- Embeddings and rerank both answer correctly, with rerank reaching the upstream's
/rerankpath - A client disconnect mid-stream is observed to cancel the upstream generation and release its sequence slot
- Prometheus is scraping the gateway and the metrics reflect this in-cluster traffic
api.riotpiao.comis unaffected throughout — verified before and after
Verify
kubectl -n api get ingress api -o jsonpath='{.spec.rules[0].http.paths[0].backend.service.name}{"\n"}'
# expected: kong-proxy — the gateway is still unexposed
kubectl -n api run probe --rm -it --image=curlimages/curl --restart=Never -- sh -c '
curl -sN -X POST http://homelab-frontend.api.svc.cluster.local/v1/chat/completions \
-H "content-type: application/json" \
-d "{\"model\":\"reasoning\",\"stream\":true,\"messages\":[{\"role\":\"user\",\"content\":\"count to 5\"}]}"'
# expected: multiple data: chunks arriving over time, terminated by data: [DONE]
curl -s -o /dev/null -w '%{http_code}\n' https://api.riotpiao.com/v1/models
# expected: 200 — public traffic still served by Kong, untouched