Skip to content

docs(OK-170): gate-enforced producer Service ownership handover in the maintenance procedure - #182

Merged
stks01 merged 5 commits into
mainfrom
docs/ok-170-ownership-handover
Nov 26, 2026
Merged

stks01 merged 5 commits into
mainfrom
docs/ok-170-ownership-handover

Conversation

@stks01

@stks01 stks01 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Why

OK-170 comment 15439 approved Option A (a non-forced, identity-only release of the producer Service fields co-owned by ok-173-breakglass) as the approach for the ok-shared rollout, not for live use. The merged maintenance procedure could not carry it out: its field-manager rule forbade any ownership release, and G0 required WITHDRAW to admit before any handover, which always conflicts while spec.selector is co-owned. G0 would therefore always STOP.

What changes

  • Procedure (docs/evidence/ok-170/maintenance-procedure.md)
    • Adds step H (handover) and its undo. Both run only through the repository gates: ok170-gates.mjs ownership-release and ownership-adopt. The gates check an exact field release, pin the snapshot resourceVersion, leave other owners unchanged, and fail closed.
    • Splits G0 into a pre-H package and a post-H package.
      • Pre-H lists two Service owners. It runs every check H does not affect, including a dry-run of the undo artifact.
      • Post-H lists ok-172-live as sole owner (--forbid-manager ok-173-breakglass). It runs the WITHDRAW, WITHDRAW_RESTORE and Recovery E admission.
    • Requires a recorded in-window GO before H.
    • Undo is for abort before the first deploy apply only.
    • Writer freeze: the only exemption is H and its undo, run by the named operator, with advance consent from the ok-173-breakglass writer owner.
    • Adds a pre-window prerequisite: a read-only, field-level ownership capture of both Deployments, the ConfigMap and the Ingress.
    • Exports KUBECTL_KUBERC=false and binds the gate script by SHA-256.
  • Acceptance plan: R4, the D10 row and the step 4 scope now describe H as the approved approach. Adds R10: the break-glass overlay still renders the producer Service.
  • deploy/kubernetes/verify-gates-kind.sh
    • Adds the procedure's exact positive sequence: inventory, release dry-run and apply, sole-owner inventory, no leftover breakglass entry, adopt dry-run and apply, inventory.
    • Adds two rejections:
      • a stale snapshot whose resourceVersion moved while values and field sets stayed equal;
      • a field owned only by ok-173-breakglass.
  • deploy/kubernetes/ok170-procedure-commands.test.ts (new): runs every documented gate command offline against a fake kubectl, so a procedure that cannot run fails CI. It checks the kuberc export, the modes, flags, required inputs and input shapes, the wrapper context and namespace, the gate digest, the absence of --force-conflicts, and the command count. Each check has a negative case in the same file.

Scope of this evidence

  • Applies to: the procedure text, the gate proof script and the offline test. This PR authorizes nothing live. The "not an execution approval" banner is unchanged.
  • Shown in:
    • This PR's CI.
    • The repository gate proof, run through a kind-compatible adapter against a disposable Talos Kubernetes v1.34.1 cluster, with the test namespace's PodSecurity relaxed. It used a fixture Service, not the live object, and reached KIND-PROOF PASS v1.34.1.
    • Removing each new rejection's guard from ok170-gates.mjs makes its step fail.
    • The offline test fails on the previous procedure revision, which lacked the kuberc export, and passes on this one.
    • An earlier disposable rehearsal, using Service ownership identical to the 2026-11-23 live read, showed the release leaves the Service unchanged and that WITHDRAW and WITHDRAW_RESTORE then admit on the same UID.
  • Follow-ups:
    • Make the pre-H undo comparison mechanical.
    • Show the Deployment admission steps under PodSecurity restricted.
    • Run the field-level ownership read of the Deployments, ConfigMap and Ingress; it needs separate approval.
    • Settle the break-glass overlay re-co-ownership after the window with the OK-173 owner.
    • No live H, undo or G0 has run.

Refs OK-170.

@stks01
stks01 merged commit f770030 into main Nov 26, 2026
3 of 4 checks passed
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.

1 participant