-
Notifications
You must be signed in to change notification settings - Fork 41.8k
e2e: fix: get kubelet port from node status instead of hard coding #86071
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
Conversation
|
Hi @zhuangqh. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
|
/assign @timothysc |
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.
Thank you for catching this @zhuangqh !
/lgtm
/ok-to-test
/priority backlog
/kind cleanup
/cc @kubernetes/sig-node-pr-reviews
ptal
|
Anywhere you are intending to proxy to the kubelet and are currently hard-coding the kubelet port, I would suggest dropping the port altogether. The default when proxying to a node is to proxy to the kubelet port, which the kube-apiserver will look up from the specific kubelet's reported status. See https://github.com/kubernetes/kubernetes/blob/master/pkg/registry/core/node/strategy.go#L240-L255 and https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/client/kubelet_client.go#L209-L226 |
timothysc
left a comment
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.
I don't mind the change, but is are you changing the ports in your environment?
/approve
/hold
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.
Why is the casting here necessary, what is the returned type?
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.
@timothysc original type is int32
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: timothysc, zhuangqh 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 |
Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
@timothysc yep. I am working on a multi-tenancy project. There is a fake agent instead of kubelet. The agent's port is different from the real kubelet |
8261190 to
a65325b
Compare
|
#86071 (comment) is still relevant... letting the apiserver do the node port lookup would be more reliable and simpler |
I totally agree with you. But I still not figure out how to do the node proxy as you said😂 |
|
@zhuangqh: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
the simplest approach I can think of is to accept a port of |
|
then you no longer need |
good idea. I am trying |
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
@zhuangqh: PR needs rebase. 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/test-infra repository. |
|
/remove-lifecycle stale |
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
@fejta-bot: Closed this PR. 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/test-infra repository. |
Signed-off-by: zhuangqh zhuangqhc@gmail.com
What type of PR is this?
/kind bug
What this PR does / why we need it:
get kubelet port from node status instead of hard coding. Not all the kubelet port is 10250.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: