-
Notifications
You must be signed in to change notification settings - Fork 1.2k
✨ Make individual readiness and liveness checks accessible #1100
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
✨ Make individual readiness and liveness checks accessible #1100
Conversation
When a named readiness/liveness check is registered it should be available under /readyz/<name>.
/assign @joelanford |
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!
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
nice catch! So the main idea behind this is that mux.Handler when using pattern with trailing slash also handles subtrees, right? Was not apparent to me at first sight 👍
Also we allow the readiness endpoint to be overwritten so if one provides one without trailing slash, it won't handle subtrees again, right?
@alenkacz That's right. Also, someone could add an endpoint without trailing slash that would override the root path. It's a bit funky but I think this is right default behaviour. |
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.
/approve
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, jimmidyson 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 |
By kubernetes-sigs#1100, subpaths of `/healthz/` can be handled. However, this change introduced the redirection from `/healthz` to `/healthz/` with 301 (Moved Permanently) when accessing `/healthz` endpoint. (Accessing `/healthz/` works fine without the redirect.) This is unnecessary overhead in the health checking. So, this commit enable to access `/healthz` without the redirect with keeping that subpaths of `/healthz/` are accessible.
By kubernetes-sigs#1100, subpaths of `/healthz/` can be handled. However, this change introduced the redirection from `/healthz` to `/healthz/` with 301 (Moved Permanently) when accessing `/healthz` endpoint. (Accessing `/healthz/` works fine without the redirect.) This is unnecessary overhead in the health checking. So, this commit enable to access `/healthz` without the redirect with keeping that subpaths of `/healthz/` are accessible.
When a named readiness/liveness check is registered it should be available under /readyz/.
This PR enables this by adding a trailing slash to the default readyz and healthz endpoints, configuring
the server to handle existing path (
/readyz
) and subpaths (/readyz/my-check
).