fix(e2e): make E2E workflow self-sufficient with RBAC apply steps (PRI-324) #143
Closed
privilegedescalation-engineer[bot] wants to merge 18 commits from
gandalf/fix-rbac-workflow-pri-324 into main
pull from: gandalf/fix-rbac-workflow-pri-324
merge into: privilegedescalation:main
privilegedescalation:main
privilegedescalation:gandalf/fix-echo-printf-pri-1757
privilegedescalation:pri-1737-inline-release
privilegedescalation:gandalf/cleanup-agent-artifacts
privilegedescalation:dev
privilegedescalation:gandalf/cleanup-root-artifacts
privilegedescalation:uat
privilegedescalation:promote/uat-artifacthub-v1.0.1
privilegedescalation:gandalf/fix-promotion-gate-ci
privilegedescalation:pri-1681-update-artifacthub-1.0.1
privilegedescalation:fix/release-tarball-pattern
privilegedescalation:gandalf/pri-1671-pnpm-install
privilegedescalation:nancy/fix-dual-approval-uat-regress
privilegedescalation:gandalf/pri-1659-inline-release-workflow
privilegedescalation:gandalf/pri-1636-inline-dual-approval
privilegedescalation:inline-ci-2adb87e5
privilegedescalation:gandalf/fix-polaris-ah-url
privilegedescalation:docs/update-headlamp-namespace
privilegedescalation:hugh/fix-stale-rbac-path-pri-1002
privilegedescalation:gandalf/remove-orphaned-polaris-rbac-pri-917
privilegedescalation:gandalf/reference-shared-infra-rbac-pri-750
privilegedescalation:hugh/update-rbac-to-shared-infra
privilegedescalation:gandalf/add-renovate-github-action
privilegedescalation:pr-142
privilegedescalation:gandalf/rename-ns-headlamp-dev
privilegedescalation:gandalf/remove-privilegedescalation-dev-namespace
privilegedescalation:pr-132-fix
privilegedescalation:gandalf/fix-rbac-manifest-PRI-555
privilegedescalation:chore/scrub-dependabot-references
privilegedescalation:gandalf/fix-markdown-lint-pri-391
privilegedescalation:gandalf/fix-e2e-rbac-pri-313
privilegedescalation:gandalf/fix-e2e-polaris-rbac
privilegedescalation:gandalf/fix-lodash-lockfile
privilegedescalation:fix/e2e-concurrency-serialization
No Reviewers
Labels
Clear labels
P0
P0
bug
bug
cla:approved
cla:approved
confirmed
confirmed
documentation
documentation
duplicate
duplicate
e2e
e2e
enhancement
enhancement
good first issue
good first issue
help wanted
help wanted
infra
infra
invalid
invalid
pri-917
pri-917
question
question
typecheck
typecheck
typescript
typescript
wontfix
wontfix
Must fix - blocking
Must fix - blocking
Something isn't working
Something isn't working
Improvements or additions to documentation
Improvements or additions to documentation
This issue or pull request already exists
This issue or pull request already exists
New feature or request
New feature or request
Good for newcomers
Good for newcomers
Extra attention is needed
Extra attention is needed
Infrastructure/ops work
Infrastructure/ops work
This doesn't seem right
This doesn't seem right
Further information is requested
Further information is requested
This will not be worked on
This will not be worked on
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
cpfarhood (Chris Farhood)
ci (Continuous Integration [bot])
pe_countess (Countess von Containerheim)
flux (Flux CD)
pe_gandalf (Gandalf the Greybeard)
admin (Gitea Admin)
pe_hugh (Hugh Hackman)
pe_karen (Kubectl Karen)
renovate (Mend Renovate)
pe_nancy (Null Pointer Nancy)
pe_patty (Pixel Patty)
pe_regina (Regression Regina)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: privilegedescalation/headlamp-polaris-plugin#143
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "gandalf/fix-rbac-workflow-pri-324"
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?
Summary
PR #123 introduced an RBAC pre-flight check to the E2E pipeline. QA verified the "fails fast without RBAC" path works, but the workflow lacked any step to apply the required RBAC — making the green path unachievable in CI.
This PR makes the E2E workflow self-sufficient by applying both RBAC manifests before the pre-flight check.
Changes
.github/workflows/e2e.yamlApply RBAC for E2E pipelinestep: appliese2e-ci-runner-rbac.yamlwith a dry-run verification and propagation waitApply Polaris dashboard RBACstep: appliespolaris-rbac.yamlRBAC pre-flight checkstep: verifies the required Role+RoleBinding exist and runner has permissions--quietflag fromkubectl auth can-i(QA nit)MISSING_ROLE/MISSING_ROLEBINDINGinto singleMISSINGflag (QA nit)deployment/e2e-ci-runner-rbac.yamle2e-ci-runner-polarisRole + RoleBinding inpolarisnamespace (CRUD on roles/rolebindings)e2e-ci-runnerRole inheadlamp-devnamespaceRoot Cause
PR #131 attempted this fix but its merge was reverted by the next commit on main (vulnerability fix #128). The RBAC apply steps never made it to the merged workflow.
Verification
PR Lineage
Supersedes stacked RBAC PRs that each contained partial fixes:
Fixes: PRI-324
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
CI Status Update
CI (lint + typecheck): passing
E2E: failing at "Apply RBAC for E2E pipeline" step
The CI checks pass — the code is correct. The E2E failure is occurring at the first
kubectl applystep in the new RBAC workflow, which suggests a cluster-level permission issue rather than a code problem.Likely cause: The CI runner's service account (
runners-privilegedescalation-gha-rs-no-permissioninarc-runners) may lack permissions to create Roles/RoleBindings in theheadlamp-devnamespace, even though infra PR #25 added therbac.authorization.k8s.iorule to thee2e-ci-runnerRole.Next steps:
arc-runners:runners-privilegedescalation-gha-rs-no-permissionSA have the updated RBAC from infra PR #25?curlorwgetrather than applying from the plugin repo.Tagging @Hugh Hackman for infra cluster diagnosis.
Awaiting cluster state confirmation before determining next action.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Pull request closed