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
kube-proxy service health: add new header with number of local endpoints #118999
Conversation
… endpoints - add new header "X-Load-Balancing-Endpoint-Weight" returned from service health. Value of the header is number of local endpoints. Header can be used in weighted load balancing. Parsing header for number of endpoints is faster than unmarshalling json from the content body. - add missing unit test for new and old headers returned from service health
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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 @thockin @danwinship @khenidak I talked with Cezary offline about this, and the header seems generic enough and not used anywhere that all new implementations can benefit from it. It LGTM but waiting for others to have consensus |
I'm OK with this, but open to discussion. We could add a flag to set the header name, but I'd only do that if we have a concrete use-case. We would want other proxier implementations to adopt this, too, right? Cilium, Antrea, ... who else? @rikatz Can you bring this to sig-net in an upcoming meeting? |
should mark @tgraf @antoninbas and probably @caseydavenport for the proxiers of each CNI :) |
The HealthCheckNodePort check returns a JSON result.
|
I know the value from the header can already be parsed out from the body |
One more use case suggested by @thockin is HTTP HEAD method that can be used to check the health. Current implementation of the service healthchecks supports the HEAD method, I guess this comes for free with "net/http" implementation. Example from my k8s node:
|
describe Healcth check node port response add info about new response header in 1.28 kubernetes/kubernetes#118999 This was discussed on SIG Network on 6th July 2023
describe Healcth check node port response add info about new response header in 1.28 kubernetes/kubernetes#118999 This was discussed on SIG Network on 6th July 2023
added draft PR with documentation update to https://kubernetes.io/docs/concepts/services-networking/service/ |
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.
Thanks!
/lgtm
/approve
LGTM label has been added. Git tree hash: 8daa96f2294288354ad2d26baea4272cef690287
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cezarygerard, thockin 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 |
/kind feature
What this PR does / why we need it:
add new header "X-Load-Balancing-Endpoint-Weight" returned from service health. Value of the header is number of local endpoints. Header can be used in weighted load balancing. Parsing header for number of endpoints is faster than unmarshalling json from the content body.
add missing unit test for new and old headers returned from service health
Special notes for your reviewer:
I am happy to discuss this on SIG Network meeting
Does this PR introduce a user-facing change?
yes, to some extend
kube-proxy service health will return additional http header "X-Load-Balancing-Endpoint-Weight" with number of local endpoints.
no action is required from users