Fix for the recycler template. Use rm to scrub volume, include . prefixed items but explude "." and ".."

pull/6/head
childsb 2016-02-02 11:02:09 -06:00
parent 23c64ec103
commit 08bd4e30f6
1 changed files with 1 additions and 1 deletions

View File

@ -416,7 +416,7 @@ func NewPersistentVolumeRecyclerPodTemplate() *api.Pod {
Name: "pv-recycler",
Image: "gcr.io/google_containers/busybox",
Command: []string{"/bin/sh"},
Args: []string{"-c", "test -e /scrub && echo $(date) > /scrub/trash.txt && find /scrub -mindepth 1 -maxdepth 1 -delete && test -z \"$(ls -A /scrub)\" || exit 1"},
Args: []string{"-c", "test -e /scrub && rm -rf /scrub/..?* /scrub/.[!.]* /scrub/* ; echo $(date) > /scrub/trash.txt && exit 0 "},
VolumeMounts: []api.VolumeMount{
{
Name: "vol",