Add a dedicated node pool for credentialed Prow jobs - #89
Draft
wallrj wants to merge 2 commits into
Draft
Conversation
The periodic e2e jobs which carry Venafi credentials currently share nodes with presubmit jobs, which run unreviewed PR code in privileged (dind) pods. A container escape from a presubmit would let the attacker read the credentials of any co-scheduled pod via the node's kubelet credentials. Give jobs with credentials their own tainted node pool so they never share a node with a presubmit. Kubernetes' own Prow build cluster uses the same mechanism; permalinks are in the clusters.tf comment. A follow-up in cert-manager/testing will add the matching nodeSelector and toleration to the Venafi periodics. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Richard Wall <richard@the-moon.net>
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This was referenced Aug 12, 2026
Give the credentialed pool its own node service account so the trust boundary also exists at the GCP IAM layer: a container escape from a presubmit can read the worker pool's node SA token from the metadata server, so any IAM later granted for credentialed jobs must not be attached to that SA. Grant the new SA the same logging/monitoring roles. Collapse the two node pools into a single for_each resource so node hardening settings cannot drift between the pools; a moved block keeps the worker pool's existing state address. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Richard Wall <richard@the-moon.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The periodic e2e jobs which carry Venafi credentials currently share nodes with presubmit jobs, which run unreviewed PR code in privileged (dind) pods. A container escape from a presubmit would let the attacker read the secrets of any co-scheduled pod via the node's kubelet credentials, and the shared node-local hostPath build caches give a presubmit a second path into a co-scheduled periodic. This PR gives jobs with credentials their own node pool in the untrusted cluster, tainted and labelled
dedicated=credentialed-jobs, so they never share a node — or its caches — with a presubmit.The pool nodes also get their own service account (
k8s-node-credentialed) rather than reusing the worker pool'sk8s-node, so the trust boundary exists at the GCP IAM layer too: a container escape onto a worker-pool node can read the node SA token from the VM metadata server, so any IAM later granted for credentialed jobs must not be attached to that shared SA. Both pools are generated from a singlefor_eachresource so node hardening settings cannot drift between them; amovedblock keeps the worker pool's existing state address.Kubernetes' own Prow build cluster uses the same mechanism — dedicated tainted node pools which jobs opt into with a toleration:
Kubernetes draws its credential trust boundary at the cluster level (prow-build vs prow-build-trusted), which cert-manager already mirrors with the prow-trusted cluster; this pool adds node-level separation for the credentialed periodics that remain in the untrusted cluster.
Verified with
tofu validateandtofu fmt -check -recursive(both clean); I have not runtofu planagainst the real state. Note for whoever applies this:max_count = 2raises the untrusted project's ceiling by up to 32 e2-highcpu-16 vCPUs / 300GB pd-ssd — check regional quota headroom at the first plan/apply, since a quota failure on scale-from-zero would only surface when a credentialed job first needs a node.Companion PR: cert-manager/testing#1228 makes prowgen inject the matching
nodeSelectorand toleration for any periodic carrying a credential preset, at the same choke point that already strips credential presets from presubmits — so nothing relies on hand-editing individual jobs. That PR is held until this one is merged and applied.with claude fable-5