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

nfs: allow users to specify NFS export name #4414

Open
yician1000 opened this issue Feb 2, 2024 · 10 comments
Open

nfs: allow users to specify NFS export name #4414

yician1000 opened this issue Feb 2, 2024 · 10 comments
Labels
component/nfs Issues related to NFS enhancement New feature or request good first issue Good for newcomers keepalive This label can be used to disable stale bot activiity in the repo

Comments

@yician1000
Copy link

Describe the feature you'd like to have

Currently, NFS export name is generated by ComposeCSIID() and the generated name is a long alphanumeric string. We hope we can specify a meaningful name for a NFS export.

What is the value to the end user? (why is it a priority?)

No priority, but I think it's good to have. Users can specify a simple and meaningful NFS export name as they want and it would be more convenient for users to manage NFS exports.

How will we know we have a good solution? (acceptance criteria)

I know that we can pass parameters in StorageClass to CSI drivers. However, specifying NFS export name in StorageClass seems not a good idea. Not sure if it's possible to pass PVC name to CSI driver?

@nixpanic nixpanic added enhancement New feature or request component/nfs Issues related to NFS labels Feb 8, 2024
@nixpanic
Copy link
Member

nixpanic commented Feb 8, 2024

That can probably be done, but a name needs to be unique enough so that no collisions can happen. It is possible with the Kubernets CSI components to pass additional metadata about a PV/PVC in the CreateVolume request.

If the Ceph cluster is only used for one Kubernetes cluster, we could setup the name like /namespace/pvc. But if there are multiple Kubernetes clusters using the Ceph cluster, something like the cluster ID needs to be included too (or some unique prefix as parameter in the StorageClass).

@nixpanic
Copy link
Member

nixpanic commented Feb 8, 2024

The csi-provisioner container that gets deployed supports the --extra-create-metadata=true option, setting this proivides (among others):

  • csi.storage.k8s.io/pvc/namespace
  • csi.storage.k8s.io/pvc/name

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Feb 8, 2024

@nixpanic do we have any length limitation on the exporter we create and what if same name/namespace is used in the different cluster you mentioned and its an external ceph cluster?

@nixpanic
Copy link
Member

nixpanic commented Feb 9, 2024

@nixpanic do we have any length limitation on the exporter we create and what if same name/namespace is used in the different cluster you mentioned and its an external ceph cluster?

NFS has standard filename/path limitations. The limitations of the object names in Kubernetes and the CSI spec are more strict.

If there are two Kubernetes clusters using the same Ceph cluster, and there exists a namespace/pvc combination in both Kubernetes cluster, the behaviour would be undefined. Users should not enable this "friendly name" feature in that case.

@yician1000
Copy link
Author

@nixpanic
Thanks for your reply. I think setting up the name like /namespace/pvc by using --extra-create-metadata=true option is a good solution.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the wontfix This will not be worked on label Mar 16, 2024
@yician1000
Copy link
Author

friendly ping

@Rakshith-R Rakshith-R removed the wontfix This will not be worked on label Mar 18, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the wontfix This will not be worked on label Apr 17, 2024
@yician1000
Copy link
Author

ping

@nixpanic nixpanic added good first issue Good for newcomers keepalive This label can be used to disable stale bot activiity in the repo and removed wontfix This will not be worked on labels Apr 19, 2024
@nixpanic
Copy link
Member

Contributions for this feature are very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/nfs Issues related to NFS enhancement New feature or request good first issue Good for newcomers keepalive This label can be used to disable stale bot activiity in the repo
Projects
None yet
Development

No branches or pull requests

4 participants