Skip to content
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] Share a PV across namespaces #647

Open
panpan0000 opened this issue Apr 12, 2024 · 8 comments
Open

[Feature Request] Share a PV across namespaces #647

panpan0000 opened this issue Apr 12, 2024 · 8 comments
Labels
kind/support Categorizes issue or PR as a support question. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@panpan0000
Copy link

panpan0000 commented Apr 12, 2024

Is your feature request related to a problem?/Why is this needed

Describe the solution you'd like in detail

Denote below scenario:

two AI teams belong to two different namespaces.

Team 1 want to share some data(on NFS) to Team2: Team 1 has trained a model and wants to share it with Team 2, or Team 1 has prepared a training dataset to further train Team 2.

Team 1 initially creates a PV associated with NFS 10.20.20.1:/nfs/team-1.
Subsequently, Team 1 also has a corresponding PVC in namespace NS1, associated with the above PV.

Now, we want Team 2 to use the data in 10.20.20.1:/nfs/team-1.

But without directly mounting this location(maybe security concern) and without creating a PV (assuming Team 2 does not have permission to create cluster-level resources), the best way for Team 2 may want to create a new PVC in NS2 and bind it to the above PV--- Oops --- Kubernetes prevents this behavior because one PV can only be mounted by one PVC, regardless of whether it is RWX/RWO.

Currently, the only option left is for Team 2 to beg the administrator people to create a duplicate PV for them.

However, as PV is a cluster-level resource,
in the NFS scenario, it may be desired to be shared by PVCs from different namespaces.

Is there a flag field in the StorageClass, that can relax the restriction of "one PV can only be mounted by one PVC" in such NFS scenarios?

Thank you very much

Describe alternatives you've considered

Additional context

@andyzhangx
Copy link
Member

@panpan0000 I think you only need to ask admin to create a storage class with server: 10.20.20.1:/nfs/team-1 parameter, and then the two teams could create two PVCs referencing to that storage class, k8s would create separate PVs automatically bound to those two PVCs, does it work?

@andyzhangx andyzhangx added the kind/support Categorizes issue or PR as a support question. label Apr 12, 2024
@panpan0000
Copy link
Author

although it works in theory, but actually, there will be flood of StorageClass which are hard to be managed..
and each time , team 1 want to share/public something , it will be quite troublesome for admin to handle StorageClass one by one....

@panpan0000
Copy link
Author

panpan0000 commented Apr 17, 2024

a reference below, to help us to understand the situation better ( as well, below states an implementation by Alluxio/Fluid)
https://www.alibabacloud.com/blog/fluid-sharing-dataset-across-kubernetes-namespaces_599739

@andyzhangx
Copy link
Member

then you could use a root directory in storage class, e.g. server: 10.20.20.1:/nfs/ instead of server: 10.20.20.1:/nfs/team-1

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 17, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 16, 2024
@panpan0000
Copy link
Author

panpan0000 commented Aug 28, 2024

then you could use a root directory in storage class, e.g. server: 10.20.20.1:/nfs/ instead of server: 10.20.20.1:/nfs/team-1

it breaks the isolation rule between teams (say, Team-3 will access all data , but Team-1 never be willing to share with Team-3),
Aka, we want team isolation as well as team collaboration , which the true world is.

typical scenario:

Team 1 : having by-default-private NFS PV 10.20.20.1:/nfs/team-1, may want to share this Volume with Team 2 only, at same day.
Team 2 : having by-default-private NFS PV 10.20.20.1:/nfs/team-2
Team 3 : having by-default-private NFS PV 10.20.20.1:/nfs/team-3

@andyzhangx andyzhangx removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 28, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants