-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
Support liveness and readiness probe with HTTP check that checks response text #55405
Comments
This could also be done by an exec probe. |
Thanks @bgrant0607 - that is the workaround we've been using - but it would be nice not to have a custom shell script that the exec probe calls. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Hi @bgrant0607 @thockin @liggitt , does this feature sound reasonable to you ? |
I don't hate it, but I don't love it. I can't help but think there has to be some opaque way to do this internal to your app (or in a sidecar that hits the real URL and then converts string-valiation into 2xx or 4xx). Is there really no better way? |
Hi, |
Did we conclude on this ? Here is the proposed config format:
|
The proposed solution will be useful for us aswell. |
+1 for HTTP content checks. Many HTTP applications have JSON HTTP endpoints containing their status so checking for 200 OK is not sufficient. Also, when shutting down services it's common for services behind load balancers to change a status content semaphore to allow for graceful removal from a serving pool. Kubernetes should support at least:
and preferably also:
|
+1 for HTTP content checks. Found that issue when I've googled for http content checks for liveness and readiness probes. Also found some workarounds with |
/triage accepted |
@adisky: The label(s) In response to this:
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. |
/priority backlog |
I don't think we should be implementing this. Parsing the entire response in order to identify a certain health signal just adds complexities we don't need. Take the following examples:
The use-case is very specific to content-type and content and does seem like something users should warp in custom script that walks through the custom logic needed to match to a custom health signal beyond HTTP response status. |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
/triage accepted This probably warrants a small KEP to discuss. Proposals are welcome |
substring is implemented in may systems like https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-http. So it makes sense to implement it in kubelet as well. It is a great quality of life improvement for kubernetes probes. Some notes on the potential implementation:
|
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
/triage accepted This remains a plausible feature request. Needs an owner and a KEP. Question: substring on regexp? One issue is that pod probes are sometimes used to derive external LB health-checks. Need to define how this change would affect that. |
Is this a BUG REPORT or FEATURE REQUEST?:
/kind feature
/sig node
Problem:
This is equivalent to the HAProxy
http-check expect string READY
(https://www.haproxy.com/documentation/aloha/7-0/haproxy/healthchecks/)Based http://kubernetes.io/docs/user-guide/liveness/ it appears that the healthz checks only check the HTTP response code.
I'm working with a health check that is a company standard and that returns status strings.
Proposed Solution:
Some capability to check the text of the response to see if it contains a particular string.
This check would probably need to only check the first n characters to prevent issues with memory.
HAProxy also supports an
rstring
that is a regex but my use case does not require it.Page to Update:
http://kubernetes.io/docs/user-guide/liveness/
The text was updated successfully, but these errors were encountered: