Commit 9cff11db authored by Michael Fraenkel's avatar Michael Fraenkel

Finished pods can be drained

- Don't bother trying to filter pods that have succeeded or failed
parent 09e3fb35
......@@ -260,6 +260,11 @@ func (o *DrainOptions) getPodCreator(pod api.Pod) (*api.SerializedReference, err
}
func (o *DrainOptions) unreplicatedFilter(pod api.Pod) (bool, *warning, *fatal) {
// any finished pod can be removed
if pod.Status.Phase == api.PodSucceeded || pod.Status.Phase == api.PodFailed {
return true, nil, nil
}
sr, err := o.getPodCreator(pod)
if err != nil {
return false, nil, &fatal{err.Error()}
......
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