Closed christophenoel closed 2 months ago
@christophenoel The above is not a CSI PV it's an intree PV which is deprecated and removed. we dont create or delete any directories cephcsi uses subvolume concepts.
Ok, I did not understand what in-tree PV meant, now clear :)
@christophenoel closing now as its not possible, feel free to reopen if any further discussion is required.
@christophenoel you can write a Volume Populator which does this for you. Have a look at https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-populators-and-data-sources for details.
One example is KubeVirt/CDI that downloads a VM image onto a PVC before an application pod can use it.
Description:
Currently, when defining a PersistentVolume (PV) using the CephCSI driver, operator need to manually create the specified directory path on the CephFS file system before mounting the PV. If the directory does not exist, mounting the PV fails with an error stating that the path does not exist.
Here is an example of a PV configuration where the path needs to be pre-created:
Requested Feature:
It would be beneficial if the CephCSI driver could support automatic creation of the specified path if it does not already exist. This feature would allow users to specify any path in the PV configuration, and the driver would ensure the path is created on the CephFS before attempting to mount the volume.
Benefits:
Kind regards,
Christophe