mirror of https://github.com/k3s-io/k3s
Finished pods can be drained
- Don't bother trying to filter pods that have succeeded or failedpull/6/head
parent
09e3fb355b
commit
9cff11dbb0
|
@ -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()}
|
||||
|
|
Loading…
Reference in New Issue