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

add scripts to make it configurable for users when add/removing a dir

Open nicktming opened this issue 5 years ago • 2 comments

when provisioning a pv, some users might want to add some operations besides (mkdir -p or rm -f), but now it is hardcoded in local-path-provisioner project.

i made some changes to make it configurable for users, i put it in ConfigMap(https://github.com/nicktming/local-path-provisioner/tree/dev-scripts/deploy/cm) when adding or removing a dir, the helper pod read add.sh and del.sh to config cmdsForPath in provisioner.go

if it is helpful, i would like to commit a pr for this feature.

nicktming avatar Jun 17 '20 06:06 nicktming

@nicktming I like that idea. Yes, we can make them configurable. PRs are welcome!

There might be more we can do, e.g. set a quota for btrfs if needed if we implement certain parameter replacement. But that would be for later.

yasker avatar Jun 23 '20 23:06 yasker

@yasker i commit a pr at #99 which makes it configurable for users.

As for quota, i think users may have different requirements, for example users could use xqs_quota command at scripts if they use xfs. but it would be great if this project could set a quota regardless of file systems. I am also working on it and i prefer to use xqs_quota command in configurable scripts now.

nicktming avatar Jun 24 '20 16:06 nicktming