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

add no_proxy parameter to configuration for REST and websocket client #1579

Merged
merged 1 commit into from
Oct 18, 2021

Conversation

itaru2622
Copy link
Contributor

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?

The new parameter 'no_proxy' has been added to configuration for the REST and websocket client.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Oct 18, 2021
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 18, 2021
@itaru2622
Copy link
Contributor Author

The PR for supporting no_proxy in websocket client is posted as kubernetes-client/python-base#260

@itaru2622
Copy link
Contributor Author

/assign @roycaihw

@@ -156,6 +156,9 @@ def __init__(self, host="http://localhost",
self.proxy = None
"""Proxy URL
"""
self.no_proxy = None
"""no_proxy entries
Copy link
Contributor

@yliaog yliaog Oct 18, 2021

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

Copy link
Contributor Author

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.

@yliaog
Copy link
Contributor

yliaog commented Oct 18, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 18, 2021
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 18, 2021
@yliaog
Copy link
Contributor

yliaog commented Oct 18, 2021

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 18, 2021
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 18, 2021
@itaru2622
Copy link
Contributor Author

@yliaog please review again

@k8s-ci-robot k8s-ci-robot merged commit 975360c into kubernetes-client:master Oct 18, 2021
@@ -156,6 +156,9 @@ def __init__(self, host="http://localhost",
self.proxy = None
"""Proxy URL
"""
self.no_proxy = None
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@itaru2622 itaru2622 Oct 25, 2021

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks @itaru2622!

Copy link
Contributor Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for no_proxy
4 participants