local-path-provisioner icon indicating copy to clipboard operation
local-path-provisioner copied to clipboard

feat: add support to set folderName on PVC

Open vvanouytsel opened this issue 1 year ago • 3 comments

This makes it possible to set a 'folderName' annotation on a PVC. When set, the name of the created folder on disk will no longer be '$persistentVolumeName_$persistentVolumeClaimNamespace_$persistentVolumeClaimName'. Instead it will be overriden by the value of 'folderName' in the annotation.

vvanouytsel avatar Dec 11 '23 13:12 vvanouytsel

It would be great to consider also implement it in the automatic provisioner. Smething like use the namespace of the pvc so the PVs will automatically sorted in folders named by the namespace.

In my scenario I have four k3s-nodes in a lxc container runnig on a proxmox server. They all share one datadir where local-path autoprovision the pvs. This datadir is quit confusing because of the flat use of the volid as the name in that directory.

XtraLarge avatar Feb 06 '24 10:02 XtraLarge

The path must be validated otherwise it give access to the whole filesystem of the node.

AlbanBedel avatar Feb 12 '24 12:02 AlbanBedel

The path must be validated otherwise it give access to the whole filesystem of the node.

Yes, that's right. The (stiatic) basedir must be well validated and the (dynamic) part of the individual subdir-part under teh basedir must be unique, to be safe.

XtraLarge avatar Feb 20 '24 11:02 XtraLarge

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar May 31 '24 02:05 github-actions[bot]

This PR was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Jun 10 '24 02:06 github-actions[bot]