You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing a Golang application that uses Helm as a library. And I noticed the behavior that Helm ignores the client settings and uses the namespace that is specified in kubeconfig. Here is my function code:
at the same time, even the namespace from kubeconfig is not fully used. Let's say namespace test1 is set in kubeconfig, and I pass namespace test2 to the function, the result will be:
helm release (metadata) will be removed from namespace test2
k8s resources will be removed from namespace test1
post-install hooks will run in namespace test1 , but {{ .Release.Namespace }} in hooks template will be test2.
Also in command line utility I managed to reproduce the same behavior.
Set namespace test1 in kubeconfig
run helm uninstall release_name
immediately change the namespace in kubeconfig to test2.
Client Version: v1.30.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.23.16+k3s1
WARNING: version difference between client (1.30) and server (1.23) exceeds the supported minor version skew of +/-1
The text was updated successfully, but these errors were encountered:
@fragpit this feels like a race condition somewhere where helm uninstall. Perhaps helm re-initialises its kubernetes client connection, fetching kubeconfig again. I have tried to reproduce using the CLI but I cannot. The steps are clear, so thanks for that. Do you mind providing a reproducer chart and commands someone can run? Pasting the exact commands would help.
The SDK was not very well separated from the CLI when it was first realized. Please do what is needed for your current project (it is intended the SDK is used like this). There are plans to clean this up.
I'm developing a Golang application that uses Helm as a library. And I noticed the behavior that Helm ignores the client settings and uses the namespace that is specified in kubeconfig. Here is my function code:
at the same time, even the namespace from kubeconfig is not fully used. Let's say namespace test1 is set in kubeconfig, and I pass namespace test2 to the function, the result will be:
{{ .Release.Namespace }}
in hooks template will be test2.Also in command line utility I managed to reproduce the same behavior.
The result will be the same as described above.
Output of
helm version
:Output of
kubectl version
:The text was updated successfully, but these errors were encountered: