Commit 3265550a authored by Michelle Noorali's avatar Michelle Noorali Committed by GitHub

Merge pull request #1102 from michelleN/1101/purge

ref(kube): delete skips IsNotFound errs
parents 926d7931 50d8d36d
......@@ -221,10 +221,16 @@ func (c *Client) Delete(namespace string, reader io.Reader) error {
if kubectl.IsNoSuchReaperError(err) {
return resource.NewHelper(info.Client, info.Mapping).Delete(info.Namespace, info.Name)
}
return err
}
log.Printf("Using reaper for deleting %s", info.Name)
return reaper.Stop(info.Namespace, info.Name, 0, nil)
err = reaper.Stop(info.Namespace, info.Name, 0, nil)
if err != nil && errors.IsNotFound(err) {
log.Printf("%v", err)
return nil
}
return err
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment