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

Always override namespace for helm release operations #1747

Merged
merged 3 commits into from
Oct 2, 2021

Conversation

viveklak
Copy link
Contributor

@viveklak viveklak commented Oct 1, 2021

Fixes #1744.

In hindsight, I can't think of a reason why we wouldn't want to always override with the Release's namespace.

Deletion cleanup is not easily assertable in the tests so not adding one.
I validated this manually with the fluent-bit helm chart.

@viveklak viveklak changed the title Vl/always override namespace Always override namespace for helm release operations Oct 1, 2021
@github-actions
Copy link

github-actions bot commented Oct 1, 2021

Does the PR have any schema changes?

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

1 similar comment
@github-actions
Copy link

github-actions bot commented Oct 1, 2021

Does the PR have any schema changes?

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

@ruckc
Copy link

ruckc commented Oct 1, 2021

@viveklak - How does helm cli operate? If a resource defines a specific namespace (i.e. kube-system) does helm put it in the release namespace, or the specified namespace? While this should be an anti-pattern, following how helm cli works should be how Pulumi's helm Release should work

@viveklak
Copy link
Contributor Author

viveklak commented Oct 2, 2021

@viveklak - How does helm cli operate? If a resource defines a specific namespace (i.e. kube-system) does helm put it in the release namespace, or the specified namespace? While this should be an anti-pattern, following how helm cli works should be how Pulumi's helm Release should work

Some background:
Both helm CLI and the current state of helm release would honor what ever the template has by default. If the chart template specifies things go in kube-system then that is where they will go. Alternatively a number of charts have gone with setting the namespace to that of the release - this is something both will honor as well. The ambiguity is around what happens when chart templates don't specify namespaces. Helm CLI's interpretation is to fall back to the default namespace configured for the Kube client. If you run without --namespace specified, default is the namespace that it falls back to. With the --namespace option on the CLI, you are overriding the default namespace to use in the kube client when no namespace is specified.

To answer your question, In my interpretation #1733 and this change are exactly mirroring the CLI behavior with --namespace being interpreted as the namespace option for the release resource.

@viveklak viveklak merged commit ed5f437 into master Oct 2, 2021
@pulumi-bot pulumi-bot deleted the vl/AlwaysOverrideNamespace branch October 2, 2021 06:00
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.

Helm release uninstall should remove things in the release namespace
3 participants