add env var for spilo with irsa#3135
Merged
Merged
Conversation
tcondeixa
requested review from
FxKu,
idanovinda,
jopadi and
mikkeloscar
as code owners
July 21, 2026 16:55
Collaborator
Author
|
I was using AI to investigate the issue with the smoke tests, @FxKu does this change make sense? I see the env vars are copied for spilo. |
tcondeixa
commented
Jul 21, 2026
Collaborator
Author
|
I'm closing this since this was solved in spilo directly in zalando/spilo#1206 |
Collaborator
Author
|
This can be temporary merged if that helps, but spilo already provides support |
Contributor
|
👍 |
Collaborator
Author
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem detected on smoke tests
Standby and clone clusters fail to bootstrap when the operator is configured with IRSA (irsa_role_arn). Patroni exits with PatroniFatalException: Failed to bootstrap cluster after wal-g repeatedly fails with NoCredentialProviders.
Root cause: The EKS admission webhook injects AWS_ROLE_ARN and AWS_WEB_IDENTITY_TOKEN_FILE into the pod environment (bare, unprefixed). Spilo's configure_spilo.py writes these into the main envdir (/run/etc/wal-e.d/env/) correctly, but for standby and clone it looks for the prefixed versions (STANDBY_AWS_ROLE_ARN, CLONE_AWS_ROLE_ARN) which are never set. wal-g runs under envdir which replaces the entire environment with only the files in the target directory — so without the prefixed vars being written there, wal-g has no credentials.
Proposed Fix
In generateCloneEnvironment() and generateStandbyEnvironment() in pkg/cluster/k8sres.go, when IRSARoleARN is configured, add the prefixed IRSA env vars to the pod spec:
Spilo then finds these in the pod environment and writes them into the respective envdirs, giving wal-g valid IRSA credentials for S3 access.
This is the PR created for spilo: zalando/spilo#1206