Show worker capacity per control plane #687

Merged
tobru merged 2 commits from feat/control-plane-capacity into main 2026-09-22 06:15:02 +00:00
Owner

The staff control plane list said nothing about headroom, so answering "can we still place a service here" meant opening a terminal.

Adds a Capacity column with the usable worker node count and the largest compute plan that still fits, plus a plan-by-plan table on the detail page.

The staff control plane list said nothing about headroom, so answering "can we still place a service here" meant opening a terminal. Adds a Capacity column with the usable worker node count and the largest compute plan that still fits, plus a plan-by-plan table on the detail page.
feat(staff): show worker capacity per control plane
All checks were successful
Tests / test (push) Successful in 2m22s
62db8b67c3
The staff control plane list said nothing about headroom, so answering
"can we still place a service here" meant opening a terminal.

Adds a Capacity column with the usable worker node count and the largest
compute plan that still fits, plus a plan-by-plan table on the detail page.

Two things drive the design:

- Headroom is measured in requests, not usage, because that is what the
  scheduler admits on.
- A fit is tested per node, never on the sum. Four nodes with 2 free cores
  each fit nothing that needs 4.

Worker nodes are found by excluding the control-plane, master, infra and
etcd roles. The obvious label cluster.servala.com/type=workload sits on
every node of a plane, masters included, and real workers carry no role
label at all.

No new Kubernetes call and no new RBAC: the status pill endpoint already
fetches and caches the whole cluster state per row, so the capacity cell
rides along on that response as an out-of-band swap rather than racing it
with a second request.

A fit is an upper bound. A running AppCat pod can request more than its
plan because of sidecars, so "fits" can still fail to schedule while
"does not fit" is certain. The detail card says so.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
feat(staff): trade the K8s server column for hover text
All checks were successful
Tests / test (push) Successful in 1m42s
901f830aee
The control plane list carried a full API server URL in a column of its
own. It is long, it pushed the table sideways, and it is rarely what
someone scans the list for. It moves to the control plane name's tooltip,
where it stays one hover away.

The Capacity header gets a tooltip too. "Capacity" alone invites two wrong
readings: that the number is real usage, and that it is the sum over the
plane. It is neither, and both mistakes point the wrong way when deciding
whether a service still fits.

Both use data-bs-toggle="tooltip", which staff/base.html already
initialises and re-runs after HTMX swaps.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tobru merged commit 9eca54c874 into main 2026-09-22 06:15:02 +00:00
tobru deleted branch feat/control-plane-capacity 2026-09-22 06:15:02 +00:00
Sign in to join this conversation.
No description provided.