Skip to content

PersistentVolumeClaim volumes should be allowed in the Revision spec #2025

Closed

Description

@symfrog

Expected Behavior

Volumes of type PersistentVolumeClaim (PVC) should be allowed to be defined and mounted in the Revision spec.

Actual Behavior

The webhook validation rejects any volumeMounts defined in the container spec.

Additional Info

PVC volumes are required to read/write external shared application data in many scenarios (e.g. NFS).

Mounting PVC volumes would not impact the stateless nature of the container. This is in contrast to concerns raised for mounting ConfigMaps via volumes.

Activity

  1. added
    area/API
    area/build
    area/test-and-release
    kind/question
    kind/bug
    kind/cleanup
    kind/doc
    kind/feature
    kind/process
    kind/spec
    on Sep 14, 2018
  2. 11 remaining items

  3. mattmoor commented on Sep 19, 2018

    @mattmoor
    Contributor

    I think this is going to get bumped a week. We already have a packed agenda this week.

  4. mattmoor commented on Sep 26, 2018

    @mattmoor
    Contributor

    We discussed this a little bit today, but it seems you weren't in attendance. I think it would be helpful to elaborate on the use case here a bit. In particular, we can't just allow arbitrary PVCs, so how do we restrict the subset we allow to those with appropriate scalability characteristics.

    We can revisit this once more details are added. Please add this to the API Core WG Agenda at a time when you can attend.

  5. lichuqiang commented on Sep 28, 2018

    @lichuqiang
    Contributor

    I think it would be helpful to elaborate on the use case here a bit

    I think users can have various scenarios that need pvcs, they may need remote storage for data persistence, and local volumes better access speed...
    Or we'd suggest the workloads under control of knative to be stateless, and should not rely on persistent storage?

    Besides pvc, I noticed quite a lot of fields in pod template are hardcoded:
    we only support one container per pod, and one port per container, container resource and port detail are hardcoded...
    So do we have plan to improve this? Or we'll not touch it until we see strong requirement from practical use cases?

  6. symfrog commented on Oct 8, 2018

    @symfrog
    Author

    @mattmoor In the example use case of NFS volumes, it would be used to read/write external shared application data (e.g. images) in a similar way that the container could connect to a relational database, S3, DynamoDB etc. to read/write external shared application data.

    The container itself would remain stateless with no local state and all state would be external.

    I created a pull request a few weeks ago (#2026) to allow PVCs.

    I could modify this pull request to only allow volumes with an access mode of ReadOnlyMany or ReadWriteMany to address the concerns?

    I have found the details for dialling into the API Core weekly (https://github.com/knative/docs/blob/master/community/WORKING-GROUPS.md#api-core), but I was not able to find the agenda to edit, could you please point me to it?

    The original Slack discussion is provided below for additional context:

    symfrog 1 month ago

    Is there a way to make a NFS volume available to an application? It doesn't seem possible to add (webhook rejects it) volume mounts to the container and the restriction seems to be intentional: https://github.com/knative/serving/blob/master/docs/runtime-contract.md#mounts . (edited)

    argent 1 month ago

    Hmm -- this is an interesting use case; the general idea is that the containers should be stateless -- is the NFS data basically a data push process?

    symfrog 1 month ago

    The container itself would remain stateless, the NFS volume is used to read/write external shared application data (e.g. images) in a similar way that the container could connect to a relational database to read/write external shared application data. (edited)

    symfrog 27 days ago

    Would a PR to allow PersistentVolumeClaim volumes in the Revision spec be accepted? This would be required to be able to use NFS volumes, which would typically store external shared application data as described above and should not impact the stateless nature of a container. More generally, the avoidance of volumes could be strongly recommended (https://github.com/knative/serving/blob/master/docs/runtime-contract.md#mounts) rather than enforced via the webhook? (edited)

    Also sent to the channel

    argent 27 days ago

    I'd need to look at PersistentVolumeClaims -- I'd want to make sure that there's some way that the PVC can be shared across many pods so that we're more Deployment-like and less StatefulSet-like.

    Also sent to the channel

    argent 27 days ago

    On the surface, it seems not unreasonable, though you'll lose some ability to roll back to a working state if you are pushing settings via filesystem rather than in the Configuration.

    neosab 27 days ago

    May be allow PVC’s that requests volumes with access modes ROX/RWX. (edited)

    symfrog 24 days ago

    PR to allow PVCs has been submitted: #2026 (edited)

  7. lvjing2 commented on Oct 19, 2018

    @lvjing2
    Contributor

    Hi, How is the progress about this feature now? blocked at the conflict of the PR?

  8. mattmoor commented on Oct 23, 2018

    @mattmoor
    Contributor

    Or we'd suggest the workloads under control of knative to be stateless, and should not rely on persistent storage?

    I think this is essentially where we are on this. If someone wants to come to the API WG to advocate for this, we can revisit, but until them I'm inclined to close the PR to keep the backlog clear.

    In particular one of my concerns about this is that (given the out-of-band definition of the PVC) we can't allow some PVCs without allowing arbitrary PVCs and I'm fairly certain we don't want to allow arbitrary PVCs...

  9. saturnism commented on Oct 26, 2018

    @saturnism

    I'd like to see the ability to mount volumes (host or tmp). This is actually really important to speed up Java-based applications when people use shared class caches that can improve startup speed by 40%.

  10. mattmoor commented on Oct 31, 2018

    @mattmoor
    Contributor

    @saturnism Can you open a separate feature request with the use case you have in mind? This issue is specific to PVC, which is a specific class of volume (you seem interested in HostPath or EmptyDir?).

  11. saturnism commented on Nov 7, 2018

    @saturnism

    @mattmoor i think #2260 would do (i followed from there). Thanks!

  12. mattmoor commented on Nov 27, 2018

    @mattmoor
    Contributor

    closing this because PVC will likely remain out of scope and we have issues tracking the inclusion of non-PVC volumes.

  13. jinchihe commented on Jun 3, 2019

    @jinchihe

    Hello @mattmoor and @symfrog ,

    I noticed the issue has been closed as remaining out-of-scope for PVC supporting, personally that's import for on-premise cluster, currently that blocks kfserving to support PVCs (kserve/kserve#129). Is there plan to support that? Thanks a lot!

  14. skonto commented on Sep 9, 2021

    @skonto
    Contributor

    Feature track doc is here, anyone interested pls review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/APIkind/featurekind/questionkind/spec

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions