kubernetes-retired/external-storage

efs-provisioner option to not create subdirs

kverstr opened this issue · 7 comments

Reopening a rotten issue because this is a valid request.
#821

We also need to be able to mount an EFS volume cross k8s cluster. Which means we don't want a subdir to be created so we can create multiple PVC's that point to that folder.

would be great if we get this too! Struggling as well with those folders.

I have a slightly different use case where this would be handy: I want my pods to be able to work with files on an existing EFS volume, and those files exist outside of any efs-provisioner-created subdirectory.

If it is pre-existing, then the workaround is to create 1 pair of PV&PVC per namespace in which you would like to consume the volume. What part of this workflow could the efs-provisioner automate? Upon seeing that a PVC has been created, how would the provisioner determine what pre-existing path to use for that PVC? I have heard this request a lot & am open to suggestion, although development is unlikely since I want kubernetes-sigs/aws-efs-csi-driver#6 to someday replace this

@wongma7 Thanks Matt for your answer. Our use-case is that we would like to control the paths that are used. So for example for an application lets say test-app, we would like to create a folder that is called test-app. Currently, it creates a folder with the PVC name and that can be very random. It makes it really hard to rebuild a destroyed cluster. In our case, we would like that we can "loose" the cluster and rebuild the persistent volumes, that are based on static and known defined names.

What part of this workflow could the efs-provisioner automate? Upon seeing that a PVC has been created, how would the provisioner determine what pre-existing path to use for that PVC?

In my case, I'm looking less for workflow automation and more for my pods simply to be able to mount the root of an EFS volume. I was under the impression this was the closest thing available to that, but maybe I'm just looking in the wrong place.

what could solve the issue for my usecase is

  • making the creation of subdirs optional
  • able to mount a subdir as root in the efs-provisioner instead of the actual root of the efs
    this way we could create a subdir on the efs. and then mount this subdir in the efs-provioner on multiple k8s clusters. the applications only need to be able to read from the same location.

@wongma7 you mentioned you want kubernetes-sigs/aws-efs-csi-driver#6 to replace this.. does that mean you recommend we switch to aws-efs-csi-driver? and do you maybe have a timeline on when this issue gets solved there?

Kind regards

Thanks for reporting the issue!

This repo is no longer being maintained and we are in the process of archiving this repo. Please see kubernetes/org#1563 for more details.

Going to close this issue in order to archive this repo. Apologies for the churn and thanks for your patience! 🙏