-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Enhance health check endpoint to support serializable request #13399
Conversation
d9cd065
to
554d319
Compare
@serathius and others, any comments please? |
Could anyone take a look at this PR? |
058cfdd
to
754cce1
Compare
Rebased the PR to resolve the conflict. |
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.
@ahrtr thanks overall this is an improvement one small nit. Can you please also update the 3.6 changelog?
@@ -65,7 +67,15 @@ func NewHealthHandler(lg *zap.Logger, hfunc func(excludedAlarms AlarmSet) Health | |||
return | |||
} | |||
excludedAlarms := getExcludedAlarms(r) | |||
h := hfunc(excludedAlarms) | |||
// Kubernetes Probes (i.e. livenessProbe) use "/health" endpoint to make a decision whether to restart a specific container. |
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.
minor nit: Can we condense the docs a bit, this feels overly verbose. Perhaps it would be good for folks revisiting this PR to add the full docs to the PR description above. Perhaps something like below?
Passing the query parameter "serializable=true" ensures that the health of the local etcd is checked vs the health of the cluster. This is useful for probes attempting to validate the liveness of the etcd process vs readiness of the cluster to serve requests.
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.
@hexfusion Thanks for the comment. Fixed.
I also squashed all the commits.
754cce1
to
09ff051
Compare
Thanks & Done! |
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
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.
lgtm
Thanks @ahrtr
See kubernetes/kubeadm#2567 (comment). Could this be cherry-picked to etcd 3.5 and release a patch? Or Kubernetes has to wait for etcd 3.6 for this liveness enhancement. |
Sure, let me backport the fix to 3.5. |
Refs: * kubernetes/kubernetes#110072 * etcd-io/etcd#13399 Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Refs: * kubernetes/kubernetes#110072 * etcd-io/etcd#13399 Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Refs: * kubernetes/kubernetes#110072 * etcd-io/etcd#13399 Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Refs: * kubernetes/kubernetes#110072 * etcd-io/etcd#13399 Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Refs: * kubernetes/kubernetes#110072 * etcd-io/etcd#13399 Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Refs: * kubernetes/kubernetes#110072 * etcd-io/etcd#13399 Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Fix #13340
Please let me know whether the solution is accepted. If yes, then I can continue to add some unit test for V3 server.