Skip to content

docs(runbook): add the node-headroom deploy pre-flight (#812) - #866

Merged
bpalermo merged 2 commits into
mainfrom
docs/812-deploy-preflight
Sep 20, 2026
Merged

bpalermo merged 2 commits into
mainfrom
docs/812-deploy-preflight

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Closes #812.

#812 had three items. Two are already done; this is the third.

item state
1. edge maxSurge preemption fixed — edge-deployment.yaml is surge-free by default at replicaCount >= 2, so no 400m surge pod needs placing and the scheduler is out of the edge rollout path
3. k6 runner preempted as a priority-0 victim mitigated — aether-soak-loader PriorityClass (#811)
2. deploy pre-flight this PR

What it adds

A §7 subsection that runs before a helm upgrade, not after it goes wrong. It separates the two exposures, because only one of them was fixable in the chart:

  • the edge Deployment is fixed by default now, and the pre-flight only matters if someone overrides edge.rollingUpdate back to a surging strategy;
  • the DaemonSets are not fixable by any strategy — a DaemonSet pod lands on its own node or nowhere — so headroom on each node has to be checked rather than designed away.

It also asserts nothing is stuck Terminating: such a pod keeps its CPU request and makes its node ineligible for preemption outright (preemption: not eligible due to a terminating pod on the nominated node), which is the #796 mechanism.

The commands were run before they were written down

That caught two defects that would otherwise have shipped as a runbook people trust:

  1. The ranking sorted lexically. sort -k3 -r on (58%) / (100%) puts (100%) last — the check would have hidden the single node it exists to find. Now sorts on an extracted numeric percentage.
  2. The pod query was unquoted. -o custom-columns=...containers[*]... is a glob; zsh — the shell in use here — fails it with no matches found before kubectl ever runs.

Verified output on talos-main (currently 58 % peak, comfortably clear):

  58.0  main-worker-01 2310m (58%)
  55.0  main-worker-04 2180m (55%)
  55.0  main-worker-03 2180m (55%)
  50.0  main-worker-02 2 (50%)
  49.0  main-worker-05 1970m (49%)
  15.0  main-cp-01     595m (15%)

Docs only — no chart change, so no Chart.yaml bump.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

bpalermo and others added 2 commits September 20, 2026 14:23
A roll is a scheduling event. #812 fixed the edge Deployment's half by
making the default strategy surge-free at >= 2 replicas, which takes the
scheduler out of that rollout path entirely. The DaemonSets' half cannot
be fixed by a strategy — a DaemonSet pod lands on its node or nowhere —
so it needs a check before the roll rather than a diagnosis after it.

Adds §7 "Pre-flight: node headroom before a roll": rank nodes by CPU
request, name the tenants on any node over the line, and assert nothing
is stuck Terminating (which holds its CPU request and makes the node
ineligible for preemption outright — #796).

All three commands were run against talos-main before being written down,
which caught two defects that would have shipped:

  - the ranking sorted the percentage lexically, so "(100%)" sorted below
    "(58%)" and hid the single node the check exists to find;
  - the pod query left kubectl's custom-columns "[*]" unquoted, so zsh
    failed it with "no matches found" before kubectl ever ran.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo merged commit 961c1db into main Sep 20, 2026
22 checks passed
@bpalermo
bpalermo deleted the docs/812-deploy-preflight branch September 20, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rollouts on a full node: edge maxSurge pod can be preempted; deploy pre-flight should check node requests

1 participant