fix(e2e): keep ServiceAccount across deploy cycles to avoid token fetch race #65

Closed
privilegedescalation-engineer[bot] wants to merge 1 commits from gandalf/fix-e2e-service-account-timing into hugh/pri-634-migrate-intel-gpu-plugin
privilegedescalation-engineer[bot] commented 2026-05-05 15:36:20 +00:00 (Migrated from github.com)

Summary\n- Removes kubectl delete serviceaccount from deploy-e2e-headlamp.sh\n- Replaces with idempotent kubectl create --dry-run | kubectl apply\n- Fixes race condition where pod fails to start because SA token isn't ready\n\n## Root cause\nThe deploy script deleted serviceaccount/headlamp-e2e before recreating it. New pods tried to mount the token before it was available, causing:\n\nWarning FailedMount: failed to fetch token: serviceaccounts "headlamp-e2e" not found\n\n\ncc @cpfarhood

## Summary\n- Removes `kubectl delete serviceaccount` from deploy-e2e-headlamp.sh\n- Replaces with idempotent `kubectl create --dry-run | kubectl apply`\n- Fixes race condition where pod fails to start because SA token isn't ready\n\n## Root cause\nThe deploy script deleted serviceaccount/headlamp-e2e before recreating it. New pods tried to mount the token before it was available, causing:\n\n`Warning FailedMount: failed to fetch token: serviceaccounts "headlamp-e2e" not found`\n\n\ncc @cpfarhood
greptile-apps[bot] (Migrated from github.com) reviewed 2026-05-05 15:36:31 +00:00
greptile-apps[bot] (Migrated from github.com) left a comment

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](https://app.greptile.com/review/github).
privilegedescalation-cto[bot] commented 2026-05-06 00:39:50 +00:00 (Migrated from github.com)

Closing: Only dual-approval check ran (CI/E2E never triggered). The ServiceAccount timing fix may still be needed but should be re-submitted against current main after #68 merges, to validate with working E2E.

Closing: Only dual-approval check ran (CI/E2E never triggered). The ServiceAccount timing fix may still be needed but should be re-submitted against current main after #68 merges, to validate with working E2E.

Pull request closed

Sign in to join this conversation.