Skip to content

Commit 3f1f2f2

Browse files
committed
fix(kubernetes): harden proxy-pod companion lifecycle and placement
Address code review feedback on the proxy-pod topology: - Clean up companions only on a confirmed CR delete, never on a 409 (replacement) or 404, so a concurrent replacement keeps its Deployment, Secret, Service, and egress NetworkPolicy. - On failed companion creation, delete the CR by its returned name with a UID precondition before removing companions, so shared mode no longer targets the wrong CR and leaves the workload unfenced. - Persist the creation-time supervisor topology on each Sandbox CR and derive status and start/stop/delete behavior from it, so a later gateway topology change does not reinterpret existing sandboxes. - Mirror the workload's public platform_config placement (runtime class, node selector, tolerations) onto the supervisor Deployment so same-node affinity stays schedulable and runtimes match. - Grant proxy-pod ClusterRole RBAC in operator mode, not just managed. - Restrict the OpenShift nonroot-v2 SCC option to shared workspace mode and document the constraint; fail the Helm render otherwise. - Correct the debug skill to reference only supervisor ingress port 3128 and note workspace-mode RBAC scoping. Signed-off-by: Russell Bryant <rbryant@redhat.com>
1 parent 59e081b commit 3f1f2f2

6 files changed

Lines changed: 340 additions & 75 deletions

File tree

‎.agents/skills/debug-openshell-cluster/SKILL.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,12 +518,14 @@ a sandbox JWT. For supervisor pods, the gateway validates the
518518
`Pod -> ReplicaSet -> Deployment -> Sandbox` owner chain, so missing
519519
`apps/replicasets get` RBAC can also break bootstrap. Helm renders the
520520
Deployment, ReplicaSet, Service, Secret, and NetworkPolicy RBAC only when
521-
`supervisor.topology=proxy-pod`; if those resources fail with forbidden errors,
522-
confirm both the rendered `gateway.toml` and Helm values use proxy-pod topology.
521+
`supervisor.topology=proxy-pod`, and scopes it by workspace mode: `shared` grants
522+
it through the namespaced Role, while `managed` and `operator` grant it through
523+
the ClusterRole (the sandbox namespace is per-workspace). If those resources fail
524+
with forbidden errors, confirm both the rendered `gateway.toml` and Helm values
525+
use proxy-pod topology and that the workspace mode's Role/ClusterRole was applied.
523526
If the agent cannot reach the gateway, check DNS to the headless Service, the
524527
agent egress NetworkPolicy DNS exception for kube-dns/CoreDNS, and the
525-
supervisor ingress NetworkPolicy allowing only that agent pod on ports `3128`
526-
and `18080`.
528+
supervisor ingress NetworkPolicy allowing only that agent pod on port `3128`.
527529

528530
Inspect the relevant containers when sandbox registration or egress enforcement
529531
fails:

0 commit comments

Comments
 (0)