-
Notifications
You must be signed in to change notification settings - Fork 544
proxy-url in kube config not used #853
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
Comments
Relevant pointers:
This really points out the need for a clean spec for the kubeconfig file, since this never went through a KEP or anything else and just merged. I'm happy to take a PR to add support for this, otherwise, we will get to it eventually. |
Full implementation, obviously, is going to take time. Is that possible to start applying some fixes related to this issue? For example, stop filtering 'proxy-url' property while loading cluster configuration from config here. |
I would like to try to provide a PR for this. Could someone recommend a way to set up a test environment for this? |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Any update on this? I am running into the same issue |
/remove-lifecycle stale |
Any update on this issue? |
please assign me this issue. |
/assign |
@brendandburns Help me out |
|
Actually in most of the .ts files which have "/api" it showing the the problem Module `'"./api"' has no exported member 'V1Secret'.ts(2305)`` |
Hi Guys ! Until this is solved I did a simple hack to be able to use proxy-url. I've override the KubeConfig makeApiClient method to be able to override the "request" configuration. It's not super safe but runs Here the code const kc = new k8s.KubeConfig();
const originalMakeApiClient = kc.makeApiClient;
kc.makeApiClient = function(api) {
const client = originalMakeApiClient.call(kc, api);
client.interceptors.push(async (config) => {
config.proxy="http://host:port";
});
return client;
}; |
Thanks for your initial workaround. Solved it for me using: const originalApply = kc.applyToRequest;
kc.applyToRequest = function(options) {
originalApply.call(kc, options);
// process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
options.proxy = 'http://proxy:port';
}; Works for normal api calls and log. Best would be a migration away from |
/assign |
@cjihrig: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Cluster config in kube config allows
proxy-url
setting (i.e. proxy-url: http://127.0.1.1:8080) but is not used in the js lib** Client Version **
e.g.
0.13.6
** Server Version **
doesn't apply
To Reproduce
Running the example from the main README.md with the current context pointing to a cluster that is configured with proxy-url, the example with throw "connect EHOSTUNREACH" when the cluster IP is not directly accessible.
Running the example with the env var
HTTP_PROXY
works as expectedExpected behavior
The clientlib should respect the proxy-url setting
** Example Code**
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: