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

1 Commits

Author SHA1 Message Date
Chris Farhood 2d9c447467 fix(e2e): keep ServiceAccount across deploy cycles to avoid token fetch race
The deploy script was deleting serviceaccount/headlamp-e2e before recreating
it via kubectl apply. This causes a race: the new deployment pod tries to
mount its service account token before the token is available, resulting in:

    Warning FailedMount: failed to fetch token: serviceaccounts "headlamp-e2e" not found

Fix by removing the kubectl delete serviceaccount line and replacing it with
an idempotent create (--dry-run=client | kubectl apply). This ensures the
ServiceAccount persists across deploy cycles and tokens are available when
pods start.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-05 15:35:48 +00:00