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

fix: infer default namespace unless provided by provider config #1896

Merged
merged 2 commits into from
Feb 3, 2022

Conversation

rawkode
Copy link
Contributor

@rawkode rawkode commented Feb 2, 2022

Proposed changes

Use the discovered kubeconfig namespace when one isn't provided by the Provider configuration instead of default.

Related issues (optional)

Fix #971

@github-actions
Copy link

github-actions bot commented Feb 2, 2022

PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting.

Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting.

Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting.

Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@rawkode
Copy link
Contributor Author

rawkode commented Feb 3, 2022

@viveklak OK, I spent some time this morning going through this code properly and I understand the problem now. I've updated the PR.

I have no idea how to write a unit test for the Configure method or if that's even possible, so I've done manual testing locally with the built provider binary.

Setup:

pulumi new kubernetes-typescript

Test 1:

  • I added namespace: test-me to the context for my local Kubernetes cluster
  • pulumi up
  • Resource was created in test-me namespace

Test 2:

  • Continue from above
  • pulumi config set kubernetes:namespace default
  • pulumi up
  • Resource is replaced and deployed to default namespace

I believe this is the behaviour that we need to resolve #971

cc @lblackstone

@rawkode rawkode requested a review from viveklak February 3, 2022 11:37
CHANGELOG.md Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting.

Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

1 similar comment
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting.

Note for the maintainer: To run the acceptance tests, please comment /run-acceptance-tests on the PR

@lblackstone
Copy link
Member

/run-acceptance-tests

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

@lblackstone lblackstone merged commit dfdf1f0 into pulumi:master Feb 3, 2022
@rawkode rawkode deleted the fix/default-namespace-infer branch February 3, 2022 21:36
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.

Provider ignores the namespace setting from the current-context
3 participants