-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Configuration should use proxy-url
if provided in .kube/config
#6150
Comments
@hudac : Hello, I'm a little unsure about this expectation. Do you mean in presence of
Do we want to give more precedence to what's configured in the kubeconfig's
|
I've raised #6289 to fix the issue. Current changes would read |
Seems like system / env should override anything loaded from the config. |
In general, we want that system properties (and environment variables) override whatever is defined in a config file so that users are able to provide one-off overrides when executing their code. (Think of hot fixes in production environments where you can't change configuration files but you can change the environment) |
@rohanKanojia, thanks for tackling this issue so quickly!
Tbh, I understood it the other way around 😀 But I agree, the documentation is somewhat vague on this.
I understand that this is the general behaviour, makes sense to me. I've double-checked how
A I'm happy about the |
@hudac : Thanks for verifying When checking godocs for the
I can see in client-go code that the ProxyURL field is first read into client Config and then while building transport Config, we first initialize proxy to be read from environment variables. However, it is overridden by proxy func from Config if not |
If this is the case, then For the implementation we should update the test, implement correctly, and document the variables in the README.md configuration section. |
Is your enhancement related to a problem? Please describe
The
~/.kube/config
file supports aproxy-url
attribute percluster
entry, like:This is currently not taken into account, only env/system properties (i.e.
all.proxy
) apply.Having this config per cluster is ideal when working with multiple clusters, with different (or for some none) proxy settings.
Describe the solution you'd like
Getting this per cluster proxy setting in
~/.kube/config
in sync with env/system properties driven proxy settings, I'd suggest that the per cluster setting in~/.kube/config
should prevail.For example:
~/.kube/config
The expected behaviour should be:
Describe alternatives you've considered
Current workaround is either having different environment variables (when connecting to one cluster per process), or programatically (a must when connecting to more than one cluster within same process).
Additional context
Tested with
io.fabric8:kubernetes-client:6.13.1
The text was updated successfully, but these errors were encountered: