Open yician1000 opened 8 months ago
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).
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
@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 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.
@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.
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.
friendly ping
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.
ping
Contributions for this feature are very welcome!
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?