When --grace-period=0 is provided, wait for deletion

The grace-period is automatically set to 1 unless --force is provided,
and the client waits until the object is deleted.

This preserves backwards compatibility with 1.4 and earlier. It does not
handle scenarios where the object is deleted and a new object is created
with the same name.
This commit is contained in:
Clayton Coleman
2016-11-21 22:22:24 -05:00
parent 959ba7c992
commit 7cdb6b169d
7 changed files with 179 additions and 47 deletions

View File

@@ -324,7 +324,7 @@ func Run(f cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *cobr
ResourceNames(mapping.Resource, name).
Flatten().
Do()
err = ReapResult(r, f, cmdOut, true, true, 0, -1, false, mapper, quiet)
err = ReapResult(r, f, cmdOut, true, true, 0, -1, false, false, mapper, quiet)
if err != nil {
return err
}