mirror of https://github.com/k3s-io/k3s
add msg when getting toomanyrequest error from evict pod
parent
7eb88f11d2
commit
08b92fff03
|
@ -585,6 +585,7 @@ func (o *DrainOptions) evictPods(pods []corev1.Pod, policyGroupVersion string, g
|
|||
doneCh <- true
|
||||
return
|
||||
} else if apierrors.IsTooManyRequests(err) {
|
||||
fmt.Fprintf(o.ErrOut, "error when evicting pod %q (will retry after 5s): %v\n", pod.Name, err)
|
||||
time.Sleep(5 * time.Second)
|
||||
} else {
|
||||
errCh <- fmt.Errorf("error when evicting pod %q: %v", pod.Name, err)
|
||||
|
|
Loading…
Reference in New Issue