-
Notifications
You must be signed in to change notification settings - Fork 352
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
Support KUBECONF env variable #1076
Support KUBECONF env variable #1076
Conversation
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.
I'm not sure this solves the issue, because I see in the codebase that every time the getDefaultKubeConfigFile is called, the code previously check that the KubeConfigEnvVar is empty. If this is the case, this change should not have effect.
Are you running the operator or the CLI inside the container?
I can't agree. Let's see following functions read my comments:
Source: Lines 204 to 208 in 21eb85b
https://github.com/apache/camel-k/blob/master/pkg/client/client.go#L136-L150 |
The problem is that the code should even not enter that I'd like to understand why it isn't and fix that. |
Ok, I am trying to run e2e tests. I forget to mention it. Test client is initialized with empty string.
https://github.com/apache/camel-k/blob/master/e2e/test_support.go#L82 |
To avoid inconsistencies between Then we change the tests to pick values from the KUBECONF env (cobra commands already initializes it from env or from the |
Sounds reasonable. I will update my PR on Monday. |
@nicolaferraro you are right. https://github.com/apache/camel-k/blob/master/pkg/cmd/root.go#L54 should be enough. Please check my test-fix. |
No description provided.