-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[WIP] Allowing Probes to sidecar containers #11634
Conversation
…re maintained internally
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: salaboy The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @salaboy! It looks like this is your first PR to knative/serving 🎉 |
Hi @salaboy. Thanks for your PR. I'm waiting for a knative 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. |
/ok-to-test |
@salaboy changed the PR title to start with |
@markusthoemmes thanks! |
Codecov Report
@@ Coverage Diff @@
## main #11634 +/- ##
==========================================
- Coverage 87.87% 87.83% -0.05%
==========================================
Files 190 190
Lines 9255 9245 -10
==========================================
- Hits 8133 8120 -13
- Misses 874 875 +1
- Partials 248 250 +2
Continue to review full report at Codecov.
|
/retest |
@dprotaso @evankanderson I've created a simple PR with a test showing that the probes are maintained if the validation is removed from the validation web hook. The question still remains, do we want the sidecar containers probes to be performed by the kubelet? I feel that I am missing context here to make a decision on that. In my head it makes some sense to only manage the "serving" container. But at the same time I do realise that I don't fully understand the entire lifecycle of KServices, which might be requiring the queue proxy container to run the probes for sidecars as well. |
cc @julz who was poking at the probing earlier this year
There were a few reasons to have the queue proxy do the probing
I don't think we have a test harness to exercise these cases - I believe @markusthoemmes was poking at cold start latency that might have some insights. The other factor is the activator does it's own probing of the queue proxy - so it might forward a request that has a 'ready' serving container but not a 'ready' sidecar. This sorta leads me to think we do need the queue proxy to signal readiness on behalf of both containers (via it's ready endpoint). Since multi-container is alpha now I'm ok (if others are in agreement as well) to merge this change and we can address what I mentioned above in a follow up issue. |
So a couple things make me nervous about this: our current semantics around readiness probes are.. not ideal. It's not clear whether we'd expect these probes to follow the same (very arguably wrong) behaviour, or whether these should wait till we fix that behaviour. See #10764 and #10765 - it'd e.g. be odd if probes were ignored for the main container when periodSeconds > 0, but not for sidecars, but extending this weird behaviour to apply to sidecars too also seems unfortunate. We'd also probably want to extend our existing readiness tests to cover multi-container. I've been actively working on improving our coverage in these tests recently, which has historically been quite sparse (and actually we're already blocking a PR on finishing improving these tests..). I think we'd want to finish adding reasonable coverage for readiness before changing too much more about that path. For these reasons I'd lean towards suggesting we nail down what behaviour we think one readiness probe should have, and make sure we have coverage for it, before we land support for multiple probes. On the other hand I think I'd personally be a lot more relaxed about liveness probes, which I think have less odd/unclear semantics, and which we do less messing with as part of the QP optimisation, so it may make sense to start with only those.
I think they're technically beta aren't they? |
@julz @dprotaso thanks for all the background on this, if we are all ok with Liveness probes in sidecar containers for now, I can make the changes to remove the validation and add more tests to make sure that the probes are maintained for side car containers. I totally agree with what @julz said about clearly defining readiness probes first and then applying the same for sidecar containers. @julz thanks a lot for all that context with the links. I will take a look at the conformance tests inside Serving to understand more about how probes are tested. I've created this PR to start the discussion, but I am happy also if you folks want to close it. |
Sounds good @salaboy - I think if you wanted to pick up the readiness side of this again after I finish adding coverage for readiness probes in general to the test suite that would be great. In the meantime I think loosening the liveness probe validation part seems totally reasonable. |
@salaboy: PR needs rebase. 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. |
I'm going to close this out for now - feel free to reopen when you start working on it again |
Fixes #8949
This PR is work in progress
I am waiting for my environment to be ready to be able to run e2e tests
Proposed Changes
Release Note