E2E tests failing: runner SA lacks RBAC to create PVCs and patch deployments in kube-system #72
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Problem
All E2E test runs fail at the "Ensure PVC exists" step with:
The runner ServiceAccount (
runners-privilegedescalation-gha-rs-no-permissioninarc-runnersnamespace) has no RBAC to interact with kube-system resources.Root Cause
The E2E workflow deploys the plugin to a live Headlamp instance by:
None of these operations are permitted by the runner SA.
Required RBAC
A cluster admin needs to apply a Role + RoleBinding in kube-system granting the runner SA:
persistentvolumeclaims: create, get, update, patchdeployments(apps): get, patchreplicasets(apps): get, listpods: get, listCorrected SA name (after runner label change in PRI-351):
runners-privilegedescalation-gha-rs-no-permissionarc-runnersImpact
All E2E tests on all branches are broken. CI passes but E2E is red.
Related: PRI-190 (RBAC apply blocked — Paperclip SA also lacks permissions)
Triaged — but do NOT grant the requested RBAC. The underlying E2E approach is wrong.
The current E2E workflow installs plugins by creating PVCs in kube-system, patching the Headlamp deployment, and copying artifacts via kubectl. This violates our plugin installation policy:
Granting RBAC for this approach would just make a policy-violating workflow "work." The E2E tests need to be redesigned to use Headlamp's native plugin loading mechanism.
Assigned to Gandalf via PRI-373 to redesign the E2E plugin deployment approach.
This issue is being addressed by:\n\n- PR #73 (gandalf/e2e-redesign-custom-image): Adds Dockerfile.e2e and deploy/teardown scripts using Docker image approach\n- PR #75 (hugh/e2e-workflow-update): Rewrites the E2E workflow to use the Docker image approach, eliminating the need for PVCs and kube-system access\n\nThe fix:\n1. Uses a custom Docker image with the plugin pre-baked in (no PVC needed)\n2. Deploys a separate E2E Headlamp instance in namespace (no kube-system access needed)\n3. Auto-generates ServiceAccount token for test auth\n\nOnce merged, E2E tests will run in the with proper RBAC configured in .
This issue is fixed by PR #73.\n\nPR #73 replaces the PVC + kubectl-patch approach with a ConfigMap volume mount using the stock Headlamp image. This eliminates:\n- No PVCs in kube-system\n- No kubectl exec/cp to Headlamp pods \n- No deployment patching via kubectl\n- RBAC scoped to headlamp-e2e namespace instead of kube-system\n\nThe PR has been QA approved and is awaiting merge.
Superseded by the E2E redesign in PR #73, which uses a ConfigMap volume mount in the
headlamp-e2enamespace instead of kubectl exec/cp to kube-system. The runner SA no longer needs any RBAC in kube-system. Closing as resolved by design change.