local-path-provisioner: Custom teardown script doesn't work
I’ve tried to set a custom teardown script using Helm values:
teardown: |-
#!/bin/sh
path=$1
archived_path="$(dirname ${path})/archived-$(basename ${path})"
mv ${path} ${archived_path}
Although the config map gets updated to the new teardown script, when I delete a pvc local-path-provisioner still deletes the pv folder instead of running the script.
Any help would be appreciated 😃
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 33 (29 by maintainers)
@SamDecrock Thanks for the confirmation. I will cut a release now.
@rxbn I think the master should work but I am planning cut a new release this week to include the customized setup/teardown script.
With
v0.0.17
it works perfectly! I guess this issue can be closed now 👍@rxbn I would recommend to revert back to use v0.0.14 in in the meantime for your case.
With the latest master it works!
@rxbn you need to clone the repo, run
make
and then use the generated image.Hi, I also have the same issue. The folder just disappears instead of running the teardown script. When can you release a new version or how do I build the master?
@rxbn hi, i tried to reproduce your problem, but it works well.
my configMap:
and did as follows:
ADD
DELETE
so the pvc-bfe590db-02f7-4986-8455-789c769a2a20_default_local-path-pvc was renamed as archived-pvc-bfe590db-02f7-4986-8455-789c769a2a20_default_local-path-pvc , that was what the teardown script did.