feat(kernel-deploy): admit the repartition workflow's agent pods #250
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/repartition-admission"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
pipeline-repartition-node(sean/pipelines) gives each worker's whole disk tail to ZFS. It uses the same one-shot privileged agent pattern as the kernel roll — pinned image,nodeNameset,hostNetwork, no volumes, no SA token — and satisfies every validation in this policy. It just isn't named as a creator.kernel-deploy-guardisfailurePolicy: Fail, so this must land and converge before the workflow runs. The failure mode of getting the order wrong is the good one: an unlisted creator is denied at the first agent pod, which is the preflight, before anything is cordoned or drained.Why a separate ServiceAccount
Not a wider role on the existing one. The kernel roll runs unattended — its Environment is
approvalMode: automatic, so nobody looks between nodes. "May reboot a node" and "may delete any PersistentVolume in the cluster" are different powers and must not share a subject.The storage verbs live only on the repartition SA, and that role has no
nodes: deleteeither — a repartitioned node keeps its identity.The RoleBinding moves with the policy in the same commit: admission permission alone isn't enough, because without the second subject a create is 403'd by RBAC before the VAP is ever consulted.
The contract test was weaker than it claimed
tests/kernel-deploy-agent-contract.shgrepped for the literal stringpipeline-deploy-kernel. That keeps passing while the creator list is widened to anything at all — a guard reporting a restriction it no longer checks.It now pins the creator set exactly, and asserts the match is an
in [...]literal list rather than a prefix or regex:Verified by mutation — slipping in a third ServiceAccount turns it red:
Checks
bash tests/check.shexits 0.kustomize build kubernetes/flux/infrastructure/kernel-deployrenders 7 objects.https://claude.ai/code/session_01MdSbMhzabSbpG8TtP9Ur3H