-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
add no_proxy parameter to configuration for REST and websocket client #1579
Conversation
The PR for supporting no_proxy in websocket client is posted as kubernetes-client/python-base#260 |
/assign @roycaihw |
kubernetes/client/configuration.py
Outdated
@@ -156,6 +156,9 @@ def __init__(self, host="http://localhost", | |||
self.proxy = None | |||
"""Proxy URL | |||
""" | |||
self.no_proxy = None | |||
"""no_proxy entries |
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.
it is not very obvious what no_proxy means? could you add a bit more details about it? e.g. bypass proxy for host in the no_proxy list
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.
updated description for no_proxy.
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: itaru2622, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@yliaog please review again |
@@ -156,6 +156,9 @@ def __init__(self, host="http://localhost", | |||
self.proxy = None | |||
"""Proxy URL | |||
""" | |||
self.no_proxy = None |
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.
These files are generated by openapi-generator and will get reverted when we re-generate the client. The proper way to fix it is to send a PR to https://github.com/OpenAPITools/openapi-generator. A mid-term workaround is to add a patch in this repo, for example: https://github.com/kubernetes-client/python/blob/master/scripts/rest_client_patch.diff
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.
@roycaihw I posted issue and PR to https://github.com/OpenAPITools/openapi-generator as below:
issue: OpenAPITools/openapi-generator#10647
PR: OpenAPITools/openapi-generator#10648
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.
@roycaihw the above PR to openapi-generator is waiting final review/merging.
The code in PR against openapi becomes a little different from the code in this PR. but it provides the same effect.
and also it is expected that the unittest code in this PR works fine against openapi's implementation.
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.
Awesome! Thanks @itaru2622!
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.
the above PR to openapi-generator is merged into its master, and it will be released as v5.3.1 (according to milestone)
What type of PR is this?
/kind feature
What this PR does / why we need it:
refer #1578
Which issue(s) this PR fixes:
Fixes #1578
Special notes for your reviewer:
This PR adds no_proxy feature for configuration and REST client.
another PR is expected soon to kubernetes-client/python-base for websocket client ( for k8s_exec, k8s_cp etc)
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: