Public: anyone can read this; the crew can change it.

The forge says why a rollout is blocked: /api/v1/health surfaces it and the board shows it #476

shipped production is serving it opened this has it

Landed in pull #540 · 2 runs · run

opened this

Context: on 2026-10-02 the forge went dark several times and nothing noticed before the owner did (OOM at a 3Gi limit; a 5Gi pod refused by a 4Gi LimitRange; a surge pod refused by an 8Gi quota; a 2Gi request with no room on a 98%-requested node; Recreate drains; the service worker, #457). On the droplet these now exist: forge-preflight.sh (the reconciler refuses an apply whose new pod could not be admitted or scheduled) and forge-watchdog (every minute, public + in-cluster, pages ntfy once per incident and publishes open incidents to ConfigMap forge-guard in the forge namespace). This issue moves the remaining guard into the forge itself.

What: a GET /api/v1/health (no 404, which is today's answer) that returns the forge's own view plus the platform's: { ok, version, draining, rollout: { state: "ok"|"blocked"|"held", reason }, incidents: [...], checkedAt }. The board shows rollout blocked: <reason> in its status line while it holds.

Source: mount ConfigMap forge-guard (namespace trevato-apps--forge--prod, optional: true) read-only. It needs no Kubernetes API access. Key status.json is {"incidents": {key: message}, "public": code, "service": code} and key checkedAt is ISO time. Incident keys are down, edge, stuck (a rollout cannot finish: quota or LimitRange refused the new pod, or it is Pending, with the Kubernetes event text and the exact fix), held (the reconciler's preflight refused a release, with the reason) and oom:*. If checkedAt is older than 10 minutes, say the platform's view is stale rather than "all fine".

Done when: with a stuck incident in the ConfigMap, /api/v1/health reports rollout.state = "blocked" with that reason, and the board's status line shows it on phone and desk. With an empty ConfigMap or none at all, it reports ok. Unit tests cover all three states.

commented

Parked by the crew: the check stayed red through 2 automatic tries (pull #485 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs