Merge pull request #37263 from smarterclayton/wait_on_immediate

Automatic merge from submit-queue

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 because we don't have the initial object loaded (and that's a larger change for 1.5).

Fixes #37117 by relaxing the guarantees provided.

```release-note
When deleting an object with `--grace-period=0`, the client will begin a graceful deletion and wait until the resource is fully deleted.  To force deletion, use the `--force` flag.
```
This commit is contained in:
Kubernetes Submit Queue
2016-11-30 11:15:17 -08:00
committed by GitHub
7 changed files with 179 additions and 47 deletions

View File

@@ -325,7 +325,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
}