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

12124: Fix namespace on kubeconfig error #12979

Merged
merged 1 commit into from Apr 29, 2024

Conversation

CalvinKrist
Copy link
Contributor

@CalvinKrist CalvinKrist commented Apr 24, 2024

What this PR does / why we need it:

Closes #12124

When the kubeconfig is missing or invalid, the namespace defaults to default instead of the correct namespace. Ensure that on error reading the config, the correct namespace is still returned.

Special notes for your reviewer:

Copies #12126 but adds a unit test.

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 24, 2024
@CalvinKrist CalvinKrist force-pushed the fix-namespace-on-kube-error branch 2 times, most recently from 7aa01a3 to 14b80f1 Compare April 24, 2024 03:29
Signed-off-by: Calvin Krist <calvin.krist@yahoo.com>
Copy link

@NickJosevski NickJosevski left a comment

Choose a reason for hiding this comment

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

The code fix is the same #12126 by
@alex-hunt-materialize

I verified the test detects the issue by commenting out the fix, and running the test, screenshot here:
image

Then restoring fix, test is successful, screenshot here:
image

@NickJosevski
Copy link

@joejulian If you're happy that the testing I did is enough, and you remember your comment here
I would like to see this added to the unit test though.

This PR can be approved (when suitable) and the other one closed.

@joejulian joejulian added this to the 3.15.0 milestone Apr 29, 2024
@joejulian joejulian merged commit c6beb16 into helm:main Apr 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helm template inconsistently respects the --namespace option in different environments
3 participants