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
helm-template function fails with .kube/config #951
Comments
@Shell32-Natsu This issue of helm not finding KUBECONFIG is similar to #879 where kustomize could not find TMPDIR |
@prachirp You mean we should ignore KUBECONFIG env? |
TMPDIR is implicitly propagated by macOS but obviously KUBECONFIG isn't. I think what makes more sense might be check is path specified by KUBECONFIG is valid and unset it if it isn't in the function. |
@Shell32-Natsu kpt has no way of knowing whether any env variable is used in the function so we need more general logic. How about we expose a |
I don't think add a flag for single env is a good idea, otherwise we will have dozens of flags in the future. I am think about using the same way that docker is using. Add a @frankfarzan Any input? |
That makes sense to me. Now is a good time to make this change since we haven't released kpt v1.0.0 yet. As the biggest drawback is this is backwards-incompatible; it involves changing from passing all local env variables to docker to passing none by default. |
I think it might make sense to have this work the same way The ordering for finding
Also, values in the |
Sorry: accidentally closed this. I've re-opened. |
Thanks @seans3 , the main problem in this issue is At the same time I still think changing to passing no env by default is better than passing all because currently user has no way to control which env should or should not be passed. Another thought is not all functions are using kubectl, is it worthwhile to add a flag for this? I prefer the method used in |
I think automatically exporting all host env vars to the container will be problematic in general. Setting env variables should be done explicitly. @Shell32-Natsu This should be tracked in the discussion of revisiting how docker flags are exposed in kpt. |
We still haven't had a final decision about the flag name, reopen this. |
closed by kubernetes-sigs/kustomize#2988 |
Running the helm-template function
with the error
Unsetting the environment variable by
unset KUBECONFIG
solves this error, but we should fix the problem from the helm-template image side.The text was updated successfully, but these errors were encountered: