-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix: kube-proxy-healthz to return 503 if node terminating #40166
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
fix: kube-proxy-healthz to return 503 if node terminating #40166
Conversation
6513be7
to
f5d8d33
Compare
f5d8d33
to
c8bf210
Compare
@thorn3r would you able to review my PR please? |
/test |
This PR addresses this KEP https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/3836-kube-proxy-improved-ingress-connectivity-reliability#implementation-history. kubeproxy healthz handler should return 503 if node is being deleted. Leverage local node watcher to watch for deletion events and added `IsBeingDeleted` field in LocalNode structure. `IsBeingDeleted` field will be set to true on node deletion. Kube-proxy health handler will get local node details and if `IsBeingDeleted` set, it returns 503 (ServiceUnavailable) error. Signed-off-by: Tamilmani <tamanoha@microsoft.com>
c8bf210
to
892cfc1
Compare
/test |
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.
Looks great! Kudos for the thorough testing 👍
@tamilmani1989 Could you please provide instruction on how to implement/apply this fix/PR on our AKS environment that uses cilium. |
Hit non-trivial merge conflicts when attempting to backport this to |
created backport to 1.17 #40317 |
since this is specific to AKS, i moved the discussion to AKS thread: Azure/AKS#5038 (comment) |
@tamilmani1989 FYI this PR has not been backported to v1.17 even tho it has the needs-backport/1.17 label. |
Oh it turns out it was backported in #40317. All good! |
This PR addresses this KEP. kube-proxy healthz handler will return 503 if node is being deleted. Leveraged existing local node watcher to watch for deletion events and added
IsBeingDeleted
field in LocalNode structure.IsBeingDeleted
field will be set to true on node deletion. Kube-proxy health handler will get local node details via get call and ifIsBeingDeleted
set, it returns 503 (ServiceUnavailable) error.Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.
Fixes: #39911