Skip to content
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

Route GPM traffic through proxy server #409

Open
paunis opened this issue Jul 11, 2022 · 6 comments
Open

Route GPM traffic through proxy server #409

paunis opened this issue Jul 11, 2022 · 6 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers python Pull requests that update Python code
Milestone

Comments

@paunis
Copy link

paunis commented Jul 11, 2022

Hi team,

We are using GPM with multicluster support. We are able to switch between most of them. Some clusters need to be accessed through proxy server so we setup the pods with the environment variables:
HTTP_PROXY="proxy address"
HTTPS_PROXY="proxy address"
Even though the env var are setup the clusters are still unaccessible. Either the proxy settings are ignored or there is another way of forcing the pod to route traffic through proxy.
Could you, please, advise how we can achieve our requirement?

Thank you.

@ralgozino
Copy link
Member

Hi @paunis

Thanks for reaching out and sorry you are having issues with GPM. From a first scouting it seems that the official Python Kubernetes client library does not support yet setting the proxy configuration through environment variables:
kubernetes-client/python#1175
and
OpenAPITools/openapi-generator#6786

maybe we can work around it, but I need to run some tests to confirm.

@ralgozino ralgozino self-assigned this Jul 11, 2022
@ralgozino ralgozino added this to the v1.0.1 milestone Jul 11, 2022
@ralgozino ralgozino added bug Something isn't working python Pull requests that update Python code labels Jul 11, 2022
@ralgozino
Copy link
Member

I've done some tests, but unfortunately I could not make it work.

I was able to make a connection to a single cluster through a proxy but switching contexts does not respect the proxy configuration, it seems to be a limitation of the python client or maybe I'm missing something.

Needs more investigation.

@paunis
Copy link
Author

paunis commented Aug 12, 2022

Thank you, please investigate more, perhaps there is a way.

@ralgozino ralgozino modified the milestones: v1.0.1, v1.1.0 Sep 15, 2022
@ralgozino ralgozino added the good first issue Good for newcomers label Feb 7, 2023
@ralgozino
Copy link
Member

Everything seems to be working behind a proxy with the new Go backend

@meetreks
Copy link

Hi @ralgozino how did you use the python kubernetes package and proxy setting to work for a single cluster? Can you share the info please?

@ralgozino
Copy link
Member

Hi @ralgozino how did you use the python kubernetes package and proxy setting to work for a single cluster? Can you share the info please?

hi @meetreks , sorry for the delayed answer. For the single cluster, we use the in-cluster native client that uses the internal Kubernetes service to talk with the API server, so there's no need to pass through the HTTP Proxy. So, there's nothing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

3 participants