Skip to content

docs(k8s): add the Kubernetes guideline and the capacity decisions - #5492

Merged
dan-petty merged 2 commits into
mainfrom
docs/5444-k8s-performance-spec
Nov 14, 2026
Merged

dan-petty merged 2 commits into
mainfrom
docs/5444-k8s-performance-spec

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

This adds docs/guidelines/kubernetes.md, the Kubernetes guideline, which applies with no change to each managed project. The owner directions of 2026-11-13 replace the measured baseline: programs give the metrics, and no agent updates a measured value by hand.

  • Each target names the alert, report, check or metric that measures it. A probe rule and a batch Job rule (asynchronous, started by an event or a schedule, safe to run again) are new.
  • The measured state, the node tables, the queries and the gap table go.
  • "Capacity targets" in k8s/README.md holds the decisions of this cluster and links gap tracker feat(k8s): track the Kubernetes spec gaps #5542.
  • The guideline index, docs/index.md, docs/CLUSTER.md and the SRE guideline link the guideline. The terms "Managed project" and "Guideline" are new.
  • tests/invariants/test_guidelines.py of docs(monitoring): split the SRE spec into a guideline and decisions #5567 checks the guideline.

Closes #5444

Change: openspec/changes/archive/2026-11-13-5444-add-the-kubernetes-performance-tuning-spec/

@dan-petty dan-petty added type/docs Type docs: a change to the documents scope/k8s Kubernetes commands, Helm charts, pods, services, and policies labels Nov 13, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Checks and review record

Local checks on the final branch (base origin/main 2b79f35):

  • uv run devops docs check: all documentation files are up to date.
  • uv run devops ci --check --only lint,format,docs,openspec,domain: all rows pass.
  • uv run devops ci test tests/docs: 125 passed. The 17 other test files that read docs/CLUSTER.md, docs/index.md or .nav.yml: 518 passed.
  • uv run devops docs site build --strict: no issues, 113 pages.

Review findings: all fixed, with two changes to the proposed fix.

Gaps: filed #5485 (runner placement). Mapped the node reserve, PID limit and graceful shutdown to dan-petty/homelab#13 (comment with the state of 2026-11-13), and the image pull metric to #4616 (comment). Removed the row for the two namespaces of another project: a person owns them, so the spec puts them out of scope. Rule 11: filed #5486 (devops k8s logs cannot run a LogQL metric query) and #5487 (devops prometheus query ends in a traceback on HTTP 400).

@dan-petty

Copy link
Copy Markdown
Owner Author

Amendment: the spec split (design sections 5.1 and 9, owner decisions of 2026-11-13)

The owner directions in the comment on #5444 replace the measured baseline. This push changes the pull request as follows.

Change Design rule or owner decision
docs/K8S_PERFORMANCE.md moves to docs/guidelines/kubernetes.md. It keeps only the guideline rows of design section 2.4: scope, principles, targets, tuning loop, tune-down formula, A/B method, area rules, rules for agents and jobs, sources. 5.1 step 2; decision 9 (guidelines in docs/guidelines/)
Each target names its kubernetes-mixin alert, node-mixin alert, KRR report, kube-linter check or metric. The upstream sources confirm the alert names, the cpuThrottlingPercent default and the 3 control-plane node condition of KubeMemoryOvercommit. 5.1 step 2
A probe rule (readiness, liveness, startup; kube-linter no-readiness-probe, no-liveness-probe) is new. It is the owner of readiness row CAP-2. 5.1 step 2
A batch Job rule is new: batch work runs as a Job or a Workflow that an event or a schedule starts, no service waits for it, a Job name from the event id makes a second run safe, and each Job is bounded. Owner request: "jobs should run async and ready for event driven triggers"
The node table, the measured state, the kubelet table of each node, the queries and every measured sentence go. 5.1 step 4; rule 1; decision 2 (live values out of git)
The guideline names no issue, date, node, environment tree path, today, currently or state row id. Rules 4 and 6
k8s/README.md gets the section "Capacity targets": pod start, runner start, runner placement, the profiler decision and the infra repo of the node settings. It links tracker #5542 and holds no gap row. 5.1 step 3; decision 4 (gaps in GitHub)
tests/docs/test_k8s_performance_spec.py goes. tests/invariants/test_guidelines.py is new and listed in docs/TESTING.md. It failed on the old text first (1 failed, 13 passed), then passed. 5.1 step 5
docs/guidelines/index.md is new. .nav.yml gets a Guidelines tab with the index first and the glob docs/guidelines/*.md. docs/index.md gets one line for the folder. 5.1 step 6
CONTEXT.md gets the terms "Managed project" and "Guideline". The term "Guideline" links the index, so the index is within two links of AGENTS.md. Task scope
AGENTS.md does not change. #5536 adds the route to the guideline index. Decision 9 (AGENTS.md links the index once, through #5536)
docs/CLUSTER.md, k8s/README.md and docs/SRE.md link the guideline. docs/SRE.md now names target T6 of the guideline (T8 of the first draft). 5.1 step 6; AGENTS.md rule 8
The OpenSpec change (proposal, design, tasks) has the new scope. The archive commit stays last. 5.1 step 7

The guideline numbers its targets T1 to T10 and its rules R1 to R8. The first draft never merged, so no other document keeps its ids. The id map for PR 3 (#5538) and #5489: T2 to T1, T3 to T2, T4 to T3, T5 to T4, T6 to T5, T8 to T6, T9 to T7, T10 to T8, T11 to T9, T12 to T10; R1 and R2 stay, R5 to R3, R8 to R4, R10 to R5, R11 to R6; R7 (probes) and R8 (batch Jobs) are new. T7, T13 and T14 are decisions in "Capacity targets".

Table 1. Local checks on the head commit.

Check Result Link
uv run devops ci --check --only lint,format,domain,docs,openspec Pass -
uv run --group docs devops docs site build --strict Pass -
uv run devops ci test tests/invariants tests/docs Pass -

dan-petty added a commit that referenced this pull request Nov 13, 2026
The owner directions of 2026-11-13 replace the measured baseline: the
guideline applies with no change to each managed project, programs give
the metrics, and no agent updates a measured value by hand.

- Move the spec to docs/guidelines/agentic-jobs.md. Keep the scope,
  the principles, the default targets, the job model, the measure of a
  job, the tuning loop, the model, context, tool, telemetry and eval
  methods, and the AW rules, each with one line of rule text.
- Move the method parts of docs/roadmap/job-success.md into it: the
  ratio p, the Wilson interval, the efficiency, the 80% rule and the
  LogQL form of the ratio. The page keeps the result line contract and
  the grade table.
- Add P10 and AW-J7: an event or a schedule starts each job, no caller
  waits, a reconcile pass finds a lost event, and a unit name from the
  input stops a second run.
- Remove the baseline tables, the queries and the gap table. Add
  "Agentic jobs in devops-cli" to docs/ROADMAP_WORKFLOW.md with the
  owner map and a link to gap tracker #5543.
- Rename the safety rules AW-S1 to AW-S4 to AW-G1 to AW-G4, because the
  guideline test refuses a state row id.
- Add the guideline index, the Guidelines tab and the guideline test,
  the same files as PR #5492.
dan-petty added a commit that referenced this pull request Nov 13, 2026
The owner directions of 2026-11-13 replace the measured baseline: the
guideline applies with no change to each managed project, programs give
the metrics, and no agent updates a measured value by hand.

- Move the spec to docs/guidelines/agentic-jobs.md. Keep the scope,
  the principles, the default targets, the job model, the measure of a
  job, the tuning loop, the model, context, tool, telemetry and eval
  methods, and the AW rules, each with one line of rule text.
- Move the method parts of docs/roadmap/job-success.md into it: the
  ratio p, the Wilson interval, the efficiency, the 80% rule and the
  LogQL form of the ratio. The page keeps the result line contract and
  the grade table.
- Add P10 and AW-J7: an event or a schedule starts each job, no caller
  waits, a reconcile pass finds a lost event, and a unit name from the
  input stops a second run.
- Remove the baseline tables, the queries and the gap table. Add
  "Agentic jobs in devops-cli" to docs/ROADMAP_WORKFLOW.md with the
  owner map and a link to gap tracker #5543.
- Rename the safety rules AW-S1 to AW-S4 to AW-G1 to AW-G4, because the
  guideline test refuses a state row id.
- Add the guideline index, the Guidelines tab and the guideline test,
  the same files as PR #5492.
@devops-cli-service

Copy link
Copy Markdown
Contributor

Pull request #5492 has merge conflicts with main at commit bfa8dabf9a10. GitHub cannot merge it. Rebase the branch onto the current main, resolve the conflicts and push the branch.

dan-petty added a commit that referenced this pull request Nov 13, 2026
…5567)

Move `docs/SRE.md` to `docs/guidelines/sre.md`, a guideline that applies
with no change to each managed project. Principle 9 and the incident
steps make the response event-driven: an event starts each job, and no
service waits for it.

Add `docs/guidelines/production-readiness.md` from the draft. Each row
names the check that measures it and holds no state.

`k8s/catalog.toml` holds the tier, data class and dependencies of each
service. "Service levels" in `k8s/README.md` holds the decisions of this
cluster and links tracker #5541. No document holds a measured value or a
gap row.

The guideline index, the Guidelines tab and the guideline test are the
same files as in #5492.

Closes #5538

Change: `openspec/changes/archive/2026-11-13-5538-split-the-sre-spec/`
dan-petty added a commit that referenced this pull request Nov 13, 2026
The owner directions of 2026-11-13 replace the measured baseline: the
guideline applies with no change to each managed project, programs give
the metrics, and no agent updates a measured value by hand.

- Move the spec to docs/guidelines/agentic-jobs.md. Keep the scope,
  the principles, the default targets, the job model, the measure of a
  job, the tuning loop, the model, context, tool, telemetry and eval
  methods, and the AW rules, each with one line of rule text.
- Move the method parts of docs/roadmap/job-success.md into it: the
  ratio p, the Wilson interval, the efficiency, the 80% rule and the
  LogQL form of the ratio. The page keeps the result line contract and
  the grade table.
- Add P10 and AW-J7: an event or a schedule starts each job, no caller
  waits, a reconcile pass finds a lost event, and a unit name from the
  input stops a second run.
- Remove the baseline tables, the queries and the gap table. Add
  "Agentic jobs in devops-cli" to docs/ROADMAP_WORKFLOW.md with the
  owner map and a link to gap tracker #5543.
- Rename the safety rules AW-S1 to AW-S4 to AW-G1 to AW-G4, because the
  guideline test refuses a state row id.
- Add the guideline index, the Guidelines tab and the guideline test,
  the same files as PR #5492.
@dan-petty
dan-petty force-pushed the docs/5444-k8s-performance-spec branch from bfa8dab to c2d9542 Compare November 14, 2026 00:07
The owner directions of 2026-11-13 replace the measured baseline of the
first draft: the guideline applies with no change to each managed
project, programs give the metrics, and no agent updates a measured
value by hand.

- Add docs/guidelines/kubernetes.md with the targets, each with the
  alert, report, check or metric that measures it, the tuning loop, the
  tune-down formula, the A/B method, the area rules, a probe rule and a
  batch Job rule (asynchronous, started by an event or a schedule, safe
  to run again on the same event).
- Add "Capacity targets" to k8s/README.md with the decisions of this
  cluster and a link to gap tracker #5542.
- Add the line of the guideline to docs/guidelines/index.md and
  docs/index.md, link it from docs/CLUSTER.md and
  docs/guidelines/sre.md, and add the terms "Managed project" and
  "Guideline". PR #5567 added the index, the Guidelines tab and
  tests/invariants/test_guidelines.py first.
@dan-petty
dan-petty force-pushed the docs/5444-k8s-performance-spec branch from 87cff8d to 6b77d05 Compare November 14, 2026 01:34
@dan-petty
dan-petty enabled auto-merge (squash) November 14, 2026 01:38
@dan-petty
dan-petty merged commit 3f08f8a into main Nov 14, 2026
24 checks passed
@dan-petty
dan-petty deleted the docs/5444-k8s-performance-spec branch November 14, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/docs Type docs: a change to the documents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(k8s): add the Kubernetes performance tuning spec

1 participant