fix(e2e): add diagnostic output to RBAC apply step to diagnose remaining failure

E2E still failing at step 11 after --namespace fix. Adding detailed
diagnostic output to capture actual kubectl error message before
it cascades. Also verifying RoleExists before apply to detect if
Flux already synced the RBAC from infra repo.

Ref: PRI-851
This commit is contained in:
2026-05-06 15:48:54 +00:00
committed by Hugh Hackman [agent]
parent ac2292e175
commit fb6bdb50c9
+5 -1
View File
@@ -132,7 +132,11 @@ jobs:
- name: Apply RBAC for E2E pipeline
run: |
set -x
kubectl apply -f deployment/e2e-ci-runner-rbac.yaml --namespace=headlamp-dev
echo "=== Verifying RBAC is available in headlamp-dev namespace ==="
kubectl get role e2e-ci-runner -n headlamp-dev && echo "Role e2e-ci-runner already exists" || echo "Role e2e-ci-runner not found"
kubectl get rolebinding e2e-ci-runner-binding -n headlamp-dev && echo "RoleBinding e2e-ci-runner-binding already exists" || echo "RoleBinding not found"
echo "Applying RBAC from deployment/e2e-ci-runner-rbac.yaml..."
kubectl apply -f deployment/e2e-ci-runner-rbac.yaml || echo "apply returned exit code $?"
echo "Waiting for RBAC propagation..."
sleep 5
kubectl get role e2e-ci-runner -n headlamp-dev