-
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
Feature Request: Relax volume constraint to support more volume types #4417
Comments
To support PVCs, when scaling up/down apps, how could data be handled? |
Would it be possible to add I suppose that can be solved by writing a custom mutatingadmissionwebhook. |
I have a very valid use case using Odoo, which saves all generated attachments on a NFS when using multi-tenant deployments, and this is being used on an actual k8s deployment with istio. Knative can make things easier for us, but we can't drop the NFS (that's not even a source of state for us). There should be someway to accomplish this. If its not an issue with k8s it shouldn't be a constraint using Knative. That NFS should not impact a Knative deployment at all. |
@gustavovalverde Thanks for sharing your use-case. This is something that is on the radar of the API Working Group, but we do not have someone actively working on this right now. The "Binding" pattern as talked about in https://docs.google.com/document/d/1t5WVrj2KQZ2u5s0LvIUtfHnSonBv5Vcv8Gl2k5NXrCQ/edit#heading=h.lnql658xmg9p could be a potential workaround to inject these into the deployment that Knative creates while we work on getting this issue resolved. See https://github.com/mattmoor/bindings for examples. cc @mattmoor |
@dgerd and I spent some time discussing this idea before the holidays began. I think he wanted to try to PoC it. If not, then he and I should probably write up a design doc to capture our thoughts/discussion. |
@mattmoor Do I read this correctly that i cannot use ReadWriteMany PVCs at all in a Knative service? I have a simple uploader service that needs to deposit data in an Azure files pvc volume. I understand the desire for statefulness but I don't see this as different from inserting data into a database. The "persistence" isn't in the pod in either case. Thanks for any insight. --jg |
I don't think we've figured out how to allow this in a way that doesn't have pointy edges that folks will stick themselves on. I totally agree that the filesystem is a useful abstraction for write-many capable devices. |
Bumping this issue because it something that most users I have met want to do.
True, but realistically we most likely will never be able to prevent users to shoot themselves in the foot. We have seen them bypass the limitations with WebHooks to inject sidecars, use the downward API and mount volumes anyway. The binding pattern is really interesting but maybe too complicated for typical users who just want to have the Kn Pod Spec be 100% compatible with the k8s Pod Spec. |
As an example to what JR said above, both Datadog and New Relic use Unix domain sockets to collect metrics and exposing that is going to be important to support customers using these systems. In case of Datadog, the predominant way of using it is to deploy it as a Daemonset to the cluster and have customers and utilize UDS to send metrics to the agent local to the node. Another alternate is to use host IP within the user code to send the metrics to the Daemonset, but in order to ensure that the metrics are sent to the host node and not a random node in the system, user has to use k8s downward API to feed the IP of the host to the revision, but that doesn't work either because we don't support k8s downward APIs. Would love to get everyone's opinion on two things:
|
Yep, I agree. I think my prior comment is likely easily misinterpreted as "No, we need to solve this problem", but my intent was simply to convey that this isn't a slam dunk, there are downsides/gotchas that we'll have to be sure to clearly document.
The position I've been advocating for is actually to expand the surface of PodSpec that we allow to enable the binding pattern to target Service (as the subject) vs. forcing folks to reach around and use it with our Deployments. Sure if can be used to reach around us, but I agree that here it is inappropriate and overkill.
I think we should absolutely expand the list, I have mixed feelings on hostPath (aka privilege), but we should discuss on a WG call. Especially with multiple container support coming the filesystem becomes an extremely interesting channel for intra-pod communication. The Google Cloud SQL proxy comes to mind 😉 I think at this point what we need is someone to drive the feature by putting together the appropriate feature track documentation and running it through the process. |
Issues go stale after 90 days of inactivity. Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra. /lifecycle stale |
I think we still want this |
Yes, this could be behind a feature flag. |
Hi, is there a workaround for this or is it a WIP? |
A workaround is to use a Webhook to inject what you want in the Pod Spec. |
@JRBANCEL I could have a look to this. |
Thanks @JRBANCEL probably this needs an official design document/proposal. I will work on it. |
/assign |
The ft doc for this can be found here, feel free to add comments (added in the knative team drive). |
Some thoughts
To expand on 2) it seems really inefficient and you're not benefiting from any caching. Any additional pods that are scaled up (even on the same node) will always download the model? Maybe the better pattern is to bundle them in an OCI image and access them as a sidecar. Then subsequent starts would be much faster since these model images will be cached by Kubernetes |
Yes, but this is not a major concern for us, our Pods are relatively long-lived.
Maybe, but |
OCI is the standard for container images that run in Docker, Kubernetes, etc. |
@dprotaso using init containers to get models is an approach already used by Seldon (MLOPS) and others. Check here and here. So it is something not new in that domain.
They also support autoscaling via HPA and KEDA. KFServing (Kubeflow) does the same: kserve/kserve#849. |
@dprotaso I will update the feature track based on latest comments and will start implementation asap if there are no objections. Some basic scenarios like emptyDir support should be there imho. |
any update on this? But this gives knative error
|
@swapkh91 Support for |
@7adietri yeah I tried that by enabling it in the configmap
Can't find anything to resolve this
|
@swapkh91 I'm sorry, I don't know what the issue is on your particular setup beyond enabling |
Probably its the triton container? I see a similar bug here, also here things seem to be read-only. Could you try test a trivial service and compare with triton:
What do you see at your side? The triton error happens at runtime I suppose. |
@skonto yeah it works for a trivial service
In the pod description I can see
Then I guess its from Kserve side! Also, Kserve currently uses 0.23.2 version of Knative (as per quick_install script), which is also incompatible for using My case is to increase the shm-size, which normally can be done in |
Hi @skonto, in your comment here you said:
I would like to know if read and write access is currently supported for PVCs in an InferenceService? |
With |
Bumping, this is a feature also need for my project! would be very useful |
Hi @boudo sorry for the late reply regarding:
There is a flag |
+1 for hostPath support. |
@amarflybot hi, could you provide your input here: #13690 (comment). |
Yes, hostpath could be achieved via pvc. I tried that yesterday it's working great. Thanks |
hello,the knative version currently used in our project is v0.23.0. We hope to mount nfs, and pvc is only supported after knative v1.2. However, upgrading the knative version is currently unrealistic for us. Is there any other method? Or do third-party components support us using nfs mounting on knative v0.23.0? |
Dear gustavovalverde, could you please tell us how did you mount nfs on knative through odoo? |
Do you have any plan to add support for On our side we are mostly using a In the future, we aimed to use the new |
In what area(s)?
/area API
Describe the feature
We currently only allow for configmap and secret volumes to be mounted into the user container. This constraint is put in place as volumes are a source of state and can severely limit scaling. This feature request is to relax this constraint to allow a larger set of volumes to be mounted that work well with serverless functions.
I do not have a particular set of volume types in mind, but #4130 may be a good example.
The text was updated successfully, but these errors were encountered: