-
Notifications
You must be signed in to change notification settings - Fork 115
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
Default to helm release's namespace for templates where ns unspecified #1733
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
1 similar comment
Does the PR have any schema changes?Looking good! No breaking changes found. |
The id interpolate will wait on status.name and namespace which will only be set after the release is created. Its not an await issue since it seems to happen even if I hardcode the namespace/name. I might be doing something stupid like a typo. I will investigate further today. Release delegates the resource creation to helm and so we don't have a great way to get child resources directly from it. |
Does the PR have any schema changes?Looking good! No breaking changes found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provider changes look reasonable. One question about the test.
Sounds like a great idea, especially if that's what flux does. |
3085d69
to
958b689
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
2 similar comments
Does the PR have any schema changes?Looking good! No breaking changes found. |
Does the PR have any schema changes?Looking good! No breaking changes found. |
@viveklak I took this for a test run and helm install with a namespace override works great! ⭐ However, when destroying the stack helm uninstall deleted the helm release but left resources behind for some charts like fluent bit where I was overriding the namespace. If instead I manually uninstall by specifying the namespace then it removes everything:
So a tweak is needed to override the namespace for helm uninstall too. |
Thanks for the quick feedback @gitfool. Certainly makes sense and sorry for the oversight. Looks like we missed this in the tests since the namespace was created in the stack. Opened #1744 to track this. |
Fix #1710
Curious to hear feedback on this approach.
Here we essentially set the kubeconfig used by helm to use the Helm Release's namespace. This means for namespaced objects created where namespace is not specified, the Helm Release's namespace is used. This is essentially the equivalent of
helm template <chart> | kubectl create -n <helmrelease.namespace> -f -
. This avoids having to use post render magic to manipulate templates. This also mirrors the behavior that Flux provides.