-
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
Allow sidecars to specify probe port #8949
Comments
I can pick this up and work on a PR. before I do though... Is there agreement that:
|
The workaround of proxying through the single exposed container doesn't work for exec probes, which are the defacto way of health checking GRPC services. The point around the liveness probe restarting the container vs. the pod is another great point / problem with this suggested workaround. My personal inclination would be to see us allow cc @dprotaso @markusthoemmes @savitaashture |
This issue is stale because it has been open for 90 days with no |
Ack, allowing the probes seems okay for sidecar containers. |
/lifecycle frozen |
/area /good-first-issue /triage acecpted |
@evankanderson: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed 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. |
@evankanderson: 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. |
/kind api-change |
/assign |
Ok, so I started looking at this issue (as my "good first issue"), please remember that I am new with the internals.
My questions based on this:
Update: This validation can be turned of by removing this check: https://github.com/knative/serving/blob/main/pkg/apis/serving/k8s_validation.go#L362 It will be great for me to understand historically why this was not allowed. As my gut feeling tells me that having probes coming from different places might cause some race conditions or random behaviour. I will keep adding my findings here until I have a PR with some changes to discuss in more detail, if someone can shed some light on the expected behaviour that will be great. |
@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. |
/assign |
Hi @dprotaso! I would love to contribute to knative, but i am new to this project, can you please give me some pointers on what to change? |
Hey, I'm not Dave, but I saw your note today. I think the notes left by @salaboy are roughly correct -- when we added sidecar containers, we weren't sure how liveness and readiness probes should interact with the overall Pod health and in particular, the ability of the application and I think relaxing the validation Mauricio pointed to is possible and "safe" -- the largest risk would be an increase in cold-start time for pods which define readiness probes on their additional containers. We intercept the probes on the primary container (as determined by specifying one |
Is this issue still valid? I'm new to Knative and I want to contribute. Based on the history of this issue, the PR (that was raised and closed) and the code, what I understand is relaxing the liveliness probe validation on the sidecar container would be safe to implement but we still need to keep primary container validation based on the containerPort. I'm I getting this right or are there some other data points that I need to understand? @evankanderson @dprotaso |
I don't think any work has happened on this since my comment above, so this should be available for work. |
In that case can I be assigned the issue? @evankanderson |
/assign @KaranJagtiani |
The activator also does active probing (to the queue-proxy) after initial readiness in order track healthy endpoints for load balancing decisions.
Thinking about this I'd say it's not - we're deviating from what's considered a 'ready' Pod by only considering a subset of containers. So it seems like we could:
|
/assign |
Currently the API for container
livenessProbe
andreadinessProbe
doesn't allow port to be specified sincecontainerPort
is already provided. In a multi-container use case,containerPort
can only be specified on one container which provides a clear way to identify the container and port which receives traffic. As a side effect, it's currently not possible to configure a sidecar container with liveness/readiness probes using either httpGet or tcpSocket.A non-ideal workaround for
readinessProbe
exists to design the primary container's health check code to also check the health of any dependent sidecars. This isn't a typical consideration of the service developer and would not work in many cases for third party containers.Since k8s restarts the specific container that fails a
livenessProbe
and NOT the entire pod, this same workaround is not effective forlivenessProbe
and instead would result in unnecessary restarts of the primary container.The text was updated successfully, but these errors were encountered: