Delete all files and all hidden files without . & .. error for PV recycler

This commit is contained in:
wulonghui 2015-11-03 17:34:25 +08:00
parent f276572034
commit 86abfb8d16

View File

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