add msg when getting toomanyrequest error from evict pod

pull/8/head
Rajat Jindal 2018-05-10 21:26:00 -07:00
parent 7eb88f11d2
commit 08b92fff03
1 changed files with 1 additions and 0 deletions

View File

@ -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)