Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add proxy support to connect to clusters, upgrade gen to OpenAPI 7.1.0 client#2147

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
rolf-moz wants to merge3 commits intokubernetes-client:master
base:master
Choose a base branch
Loading
fromrolf-moz:feat/add-proxy-support

Conversation

rolf-moz
Copy link

@rolf-mozrolf-moz commentedNov 15, 2023
edited
Loading

What type of PR is this?

/kind feature
This a feature addition to start supporting the 'proxy-url' field in the kubernetes config files.
This will support most proxies. An upcoming version of OpenAPI generator will support Socks proxies as well.

Additionally this PR has changes that the support 7.x OpenAPI generator.

Fixes:#1967

Special notes for your reviewer:

Note this Socks5 support is dependent on a recently merged update I made to OpenAPI generator to support Socks5 proxies:OpenAPITools/openapi-generator#16918 that will be in the upcoming 7.2 release.

For now the python.sh in the gen project (that auto-generates the full client) should be updated to use 7.1.0. Example:
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v7.1.0}"

A sample generated project is visible here
https://github.com/rolf-moz/kubernetes-client-python/tree/feat/add-proxy-support-gen

Does this PR introduce a user-facing change?

Yes

Added support for the 'proxy-url' cluster setting in kube config files, including support for proxies .

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

Proxy support.

@k8s-ci-robotk8s-ci-robot added the release-noteDenotes a PR that will be considered when it comes time to generate release notes. labelNov 15, 2023
@linux-foundation-easyclaLinux Foundation: EasyCLA
Copy link

linux-foundation-easyclabot commentedNov 15, 2023
edited
Loading

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robotk8s-ci-robot added cncf-cla: noIndicates the PR's author has not signed the CNCF CLA. needs-kindIndicates a PR lacks a `kind/foo` label and requires one. labelsNov 15, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome@rolf-moz!

It looks like this is your first PR tokubernetes-client/python 🎉. Please refer to ourpull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment.Here is the bot commands documentation.

You can also check if kubernetes-client/python hasits own contribution guidelines.

You may want to refer to ourtesting guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow therecommended escalation practices. Also, for tips and tricks in the contribution process you may want to read theKubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robotk8s-ci-robot added the size/XSDenotes a PR that changes 0-9 lines, ignoring generated files. labelNov 15, 2023
@rolf-mozrolf-moz changed the titleread proxy config for cluster and add to openapi configAdd proxy support, including Socks5 proxy, to connect to clustersNov 16, 2023
@k8s-ci-robotk8s-ci-robot added cncf-cla: yesIndicates the PR's author has signed the CNCF CLA. and removed cncf-cla: noIndicates the PR's author has not signed the CNCF CLA. labelsNov 17, 2023
@k8s-ci-robotk8s-ci-robot added size/SDenotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XSDenotes a PR that changes 0-9 lines, ignoring generated files. labelsNov 25, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR isNOT APPROVED

This pull-request has been approved by:rolf-moz
Once this PR has been reviewed and has the lgtm label, please assignroycaihw for approval. For more information seethe Kubernetes Code Review Process.

The full list of commands accepted by this bot can be foundhere.

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

@rolf-mozrolf-moz changed the titleAdd proxy support, including Socks5 proxy, to connect to clustersAdd proxy support to connect to clusters, upgrade gen to OpenAPI 7.1.0 clientNov 25, 2023
@roycaihw
Copy link
Member

For now the python.sh in the gen project (that auto-generates the full client) should be updated to use 7.1.0. Example:
OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v7.1.0}"

The version is the gen project is actually not honored. This client overrides the valuehere.

Copy link
Member

@roycaihwroycaihw left a comment

Choose a reason for hiding this comment

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

The change looks good to me. Should we wait for this project to be upgrade to OpenAPI 7.1.0+ first?

@rolf-moz
Copy link
Author

rolf-moz commentedNov 28, 2023
edited
Loading

The change looks good to me. Should we wait for this project to be upgrade to OpenAPI 7.1.0+ first?

@roycaihw
Actually several changes I made are fixes for the OpenAPI 7.1 gen compatibility. One thing I could do is a separate PR for the OpenAPI 7.1.0 support first, and then redo this pr once that gets approved.

@k8s-ci-robotk8s-ci-robot added size/MDenotes a PR that changes 30-99 lines, ignoring generated files. and removed size/SDenotes a PR that changes 10-29 lines, ignoring generated files. labelsDec 2, 2023
@k8s-ci-robotk8s-ci-robot added the needs-rebaseIndicates a PR cannot be merged because it has merge conflicts with HEAD. labelJan 9, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are availablehere. If you have questions or suggestions related to my behavior, please file an issue against thekubernetes/test-infra repository.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity,lifecycle/stale is applied
  • After 30d of inactivity sincelifecycle/stale was applied,lifecycle/rotten is applied
  • After 30d of inactivity sincelifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with/remove-lifecycle stale
  • Close this PR with/close
  • Offer to help out withIssue Triage

Please send feedback to sig-contributor-experience atkubernetes/community.

/lifecycle stale

@k8s-ci-robotk8s-ci-robot added the lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale. labelApr 8, 2024
@UnsolvedCypher
Copy link

@roycaihw I just wanted to follow up as I think this PR is important. Is it good to merge as-is or would you like to split it up between the adding of OpenAPI 7.1.0 support and the actual upgrade?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity,lifecycle/stale is applied
  • After 30d of inactivity sincelifecycle/stale was applied,lifecycle/rotten is applied
  • After 30d of inactivity sincelifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with/remove-lifecycle rotten
  • Close this PR with/close
  • Offer to help out withIssue Triage

Please send feedback to sig-contributor-experience atkubernetes/community.

/lifecycle rotten

@k8s-ci-robotk8s-ci-robot added lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale. labelsMay 26, 2024
@UnsolvedCypher
Copy link

/remove-lifecycle rotten

@k8s-ci-robotk8s-ci-robot removed the lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed. labelMay 26, 2024
@PhroZenOne
Copy link

I'm are using ansible k8s to connect to a cluster but we need to be able to connect over socks5, If I understand the stacktrace and the discussion in this PR, this contains the stuff I am looking for. :)

urllib3.exceptions.ProxySchemeUnknown: Proxy URL had unsupported scheme socks5, should use http:// or https://

Anything I can do to help here?@roycaihw@rolf-moz

@rolf-moz
Copy link
Author

@PhroZenOne yes if you want to rebase you can. I might have time later this week too.

I'm not up to date... is kubernetes client using 7.x openapi generator yet?

If you'd like to try a built library with this support you can usehttps://github.com/rolf-moz/kubernetes-client-python/tree/feat/add-proxy-support-gen and let me know how it works for you.

@PhroZenOne
Copy link

@rolf-moz Did a rebase, PR here:#2255 Please have a look.

If you want to update your PR with this I can close mine so we keep this in one place.

@PhroZenOne
Copy link

Hm, there are API changes with the newer kubernetes API that breaks when testing so my branch will not work:

     File .../kubernetes/dynamic/client.py", line 273, in request    api_response = self.client.call_api(TypeError: ApiClient.call_api() got multiple values for argument 'body'

I dont have more time to spend on this right now I'm afraid so for now I will give up. I might have more time next month to look at it.

@PhroZenOne
Copy link

Made some changes to client.py to make it work again for my use case, but I have no idea if this is a good solution:PhroZenOne@97c36c3

@rolf-moz
Copy link
Author

@PhroZenOne@roycaihw Ok looks like this branch is getting some use. Let me see if I can update this PR later today to be up to date with main

PhroZenOne reacted with thumbs up emoji

@kwibus
Copy link

Would be really nice if this pull request would be merged would also help with:
#2183

Made pull request forproxy_url before, but it got ignored. But it also include some tests. You could use that if you want.
https://github.com/kubernetes-client/python/pull/2182/files

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity,lifecycle/stale is applied
  • After 30d of inactivity sincelifecycle/stale was applied,lifecycle/rotten is applied
  • After 30d of inactivity sincelifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with/remove-lifecycle stale
  • Close this PR with/close
  • Offer to help out withIssue Triage

Please send feedback to sig-contributor-experience atkubernetes/community.

/lifecycle stale

@k8s-ci-robotk8s-ci-robot added the lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale. labelJan 14, 2025
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity,lifecycle/stale is applied
  • After 30d of inactivity sincelifecycle/stale was applied,lifecycle/rotten is applied
  • After 30d of inactivity sincelifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with/remove-lifecycle rotten
  • Close this PR with/close
  • Offer to help out withIssue Triage

Please send feedback to sig-contributor-experience atkubernetes/community.

/lifecycle rotten

@k8s-ci-robotk8s-ci-robot added lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale. labelsFeb 13, 2025
@UnsolvedCypher
Copy link

/remove-lifecycle rotten

@k8s-ci-robotk8s-ci-robot removed the lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed. labelFeb 13, 2025
@@ -22,7 +22,7 @@ set -o nounset
set -o pipefail

# The openapi-generator version used by this client
export OPENAPI_GENERATOR_COMMIT="v4.3.0"
export OPENAPI_GENERATOR_COMMIT="v7.1.0"
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to first regenerate this client and review the diff. In particular we want to make sure the breaking changes are captured, and tests continue to pass.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@roycaihwroycaihwroycaihw left review comments

@fabianvffabianvfAwaiting requested review from fabianvf

Assignees
No one assigned
Labels
cncf-cla: yesIndicates the PR's author has signed the CNCF CLA.needs-kindIndicates a PR lacks a `kind/foo` label and requires one.needs-rebaseIndicates a PR cannot be merged because it has merge conflicts with HEAD.release-noteDenotes a PR that will be considered when it comes time to generate release notes.size/MDenotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Client not able to reach Cluster API behind a proxy if using multiple client function
7 participants
@rolf-moz@k8s-ci-robot@roycaihw@k8s-triage-robot@UnsolvedCypher@PhroZenOne@kwibus

[8]ページ先頭

©2009-2025 Movatter.jp