aws / aws/amazon-eks-pod-identity-webhook

Webhook skips volume/mount patching when env vars are inherited from parent pod (driver → executor)

Open
#286 0 comments 8 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
691
Forks
202
Avg merge
4h 38m
Merged PRs (30d)
1

Description

Description

In our environment, we use driver pod with IRSA-related environment variables (AWS_ROLE_ARN, AWS_WEB_IDENTITY_TOKEN_FILE) and volume mounts injected by the EKS Pod Identity Webhook.

When driver launches executor pods, it automatically copies all environment variables from the driver into each executor pod. This results in executors inheriting the IRSA environment variables even though they do not have the required projected service account token volume.

Expected Behavior

Even if the env vars are already present (inherited), the webhook should ensure the required volume and mount are added if they are missing.

Impact
This affects workloads such as Spark where: the driver is patched correctly by the webhook
executor pods inherit env vars from the driver
the webhook incorrectly assumes the executors already have the correct IRSA setup
This leads to inconsistent IRSA setup across pods in the same job.

Proposed Fix
Modify the skip logic to also check whether the token volume mount exists, instead of only checking env vars.

For example:
Only skip if both
the env vars are present, and
the volume + mount are already present

Please advise

Contributor guide

Open the contributing guide

Research direction

Locate the webhook skip logic that decides whether inherited environment variables require patching, then trace how the token volume and mount are handled for executor pods. Verify the behavior with a regression test covering inherited variables without the required volume and mount; it is done when both are added unless the complete setup already exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go, kubernetes
Domain
authentication, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.