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-apiserver: use SO_REUSEPORT when creating listener #88893
kube-apiserver: use SO_REUSEPORT when creating listener #88893
Conversation
Welcome @invidian! |
Hi @invidian. 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. |
b5fa276
to
b0c5e3d
Compare
b0c5e3d
to
2dfda9f
Compare
2dfda9f
to
8c9fb1c
Compare
Does this change have an impact on portability? /retest |
What kind of portability? OSes? Or CPU architectures? As far as I'm aware, this change will only work for Linux, I wasn't sure if I should target other OSes too (as mentioned in original issue). It seems all tests fails with the same error. @sftim any hints how to reproduce it locally/why it fails? |
I'm afraid I don't have any insight into that. |
8c9fb1c
to
62bc158
Compare
I just run |
/retest |
62bc158
to
b94d995
Compare
I run now But I see now, that typecheck fails and I wonder if there is a way to disable it to ignore Windows or do I need to change the code to support windows as well 🤔 |
Ugh, fixed missing import in unit test (running tests locally now too, to make sure it's fine) |
6ba91b4
to
ff02178
Compare
Also had to fix some other unit test types. @lavalamp can you trigger tests again please? |
18531d0
to
24c1570
Compare
Tests are passing now. |
staging/src/k8s.io/apiserver/pkg/server/options/serving_windows.go
Outdated
Show resolved
Hide resolved
So multiple instances of kube-apiserver can bind on the same address and port, to provide seamless upgrades. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
24c1570
to
dfe1f96
Compare
/approve Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: invidian, lavalamp 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 |
(this won't merge until we exit code freeze btw) |
Thanks for your guidance of my first K8s PR @lavalamp! I'm happy that it went in so smoothly. |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
It has been discussed here: #88785 (comment). TL;DR it should be fine.
As far as I understand the difference between the two and from my testing, |
Hi @invidian , Thank you for your PR. When you get some time I am interested in learning about what happens if the new API server comes up but fails health due to issues. My question is do we not need to first perform health check on new API server before start accepting actual traffic . Are we expecting the new binary to just work fine ? |
It's a good question :) I don't know how this can be configured for health checks for individual instances. I usually rely on the fact, that if kube-apiserver is not functional, it restarts. |
Thank you for your response!!! Assuming its same IP and PORT on which API Server is being brought up: So In cases of malfunction restart , when node have high traffic ~50% of the new connection can route to new API Server after it makes Listen() call without being accepted. Also we might not have mechanism to know if this new one is malfunctioning until we remove old running API Server. If its different IP and same PORT then if it does not affect the traffic from my understanding. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
So multiple instances of kube-apiserver can bind on the same address and
port, to provide seamless upgrades.
Which issue(s) this PR fixes:
Fixes #88785
Special notes for your reviewer:
Perhaps some e2e tests could be added for that too, but I don't know how to do that.
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: