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]>
1.2 KiB
1.2 KiB
0.3 — Health endpoints (GREEN)
Phase: 0 — Foundations Stage: GREEN Depends on: 0.2
GET /healthzreturns200whenever the process is aliveGET /healthzcontacts no upstream and performs no network I/OGET /readyzreturns200only when configuration is valid and, if auth is enabled, JWKS has been fetched at least onceGET /readyzreturns a non-2xxstatus while configuration is invalid or JWKS has never been fetched- Neither endpoint requires authentication, even when the auth flag is on
- Neither path is proxied to any upstream, and neither can be shadowed by a configured route
/healthz backs the liveness probe, so it must stay cheap and must not fail because
an upstream is down — restarting the gateway does not fix a sick vLLM pod. /readyz
backs the readiness probe and is allowed to fail, taking the pod out of the nginx
endpoint pool until it can actually serve.
Verify
go test ./internal/server/... -run TestHealthEndpoints -v
# expected: passes — /healthz is 200 with upstreams unreachable; /readyz is non-2xx
# before first JWKS fetch and 200 after; both answer with no Authorization header