Skip to content

add CLONE/STANDBY_AWS_STS_REGIONAL_ENDPOINTS when IRSA is configured - #3181

Open
jopadi wants to merge 1 commit into
zalando:masterfrom
jopadi:add-aws-region-regional
Open

add CLONE/STANDBY_AWS_STS_REGIONAL_ENDPOINTS when IRSA is configured#3181
jopadi wants to merge 1 commit into
zalando:masterfrom
jopadi:add-aws-region-regional

Conversation

@jopadi

@jopadi jopadi commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

Follows up on #3180.

When irsa_role_arn is set, the operator injects IRSA-related env vars for clone and standby clusters. However, AWS_STS_REGIONAL_ENDPOINTS was missing. Without it, WAL-G may fall back to a global STS endpoint or construct a broken one, causing credential retrieval to fail.

This change adds CLONE_AWS_STS_REGIONAL_ENDPOINTS and STANDBY_AWS_STS_REGIONAL_ENDPOINTS with value regional, consistent with how the other IRSA vars are hardcoded.

NOTE: PR created with the help of AI agents

@jopadi jopadi added the bugfix label Sep 3, 2026
@jopadi jopadi changed the title Also inject CLONE/STANDBY_AWS_STS_REGIONAL_ENDPOINTS when IRSA is configured add CLONE/STANDBY_AWS_STS_REGIONAL_ENDPOINTS when IRSA is configured Sep 3, 2026
@tcondeixa

Copy link
Copy Markdown
Collaborator

AWS_STS_REGIONAL_ENDPOINTS is not set anywhere today, so both the main pod and clone/standby currently use the global STS endpoint. Hardcoding "regional" only for clone/standby would make them inconsistent with the main pod. Additionally, changing the default STS endpoint behavior would be a breaking change for existing OSS users who may rely on the global endpoint. IMO the right approach would be to expose this as an operator config field (e.g. aws_sts_regional_endpoints) with no default, so users can opt in explicitly.

I don't have much experience in this project, so I will let other provide also feedback.

Comment thread pkg/cluster/k8sres.go
result = append(result, v1.EnvVar{Name: "CLONE_AWS_ROLE_ARN", Value: c.OpConfig.IRSARoleARN})
result = append(result, v1.EnvVar{Name: "CLONE_AWS_WEB_IDENTITY_TOKEN_FILE", Value: "/var/run/secrets/eks.amazonaws.com/serviceaccount/token"})
result = append(result, v1.EnvVar{Name: "CLONE_AWS_REGION", Value: c.OpConfig.AWSRegion})
result = append(result, v1.EnvVar{Name: "STANDBY_AWS_STS_REGIONAL_ENDPOINTS", Value: "regional"})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is in the wrong place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants