Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add region to kubeconfig #1498

Merged
merged 2 commits into from
Nov 19, 2024
Merged

Add region to kubeconfig #1498

merged 2 commits into from
Nov 19, 2024

Conversation

flostadler
Copy link
Contributor

@flostadler flostadler commented Nov 19, 2024

Proposed changes

The generated kubeconfig is missing the region argument. This can lead to issues in many scenarios, e.g. when a user has AWS_DEFAULT_REGION set or when they have no default region set and use the provider configuration for setting the pulumi region (i.e. aws:region). This aligns the provider with how the AWS CLI generates the kubeconfig (aws eks update-kubeconfig).
This change uses the cluster ARN to identify the cluster's region and sets it in the kubeconfig.

The k8s provider's kubeconfig property will not trigger replacements. Multiple upgrade tests validate this (e.g. aws-profile).

Related issues (optional)

Fixes #1038

@flostadler flostadler requested review from t0yv0, corymhall and a team November 19, 2024 10:24
@flostadler flostadler self-assigned this Nov 19, 2024
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@flostadler flostadler merged commit a1061b6 into master Nov 19, 2024
34 checks passed
@flostadler flostadler deleted the flostadler/kubeconfig-region branch November 19, 2024 14:50
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v3.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The kubeconfig generated is missing the region argument
4 participants