Commit 08b92fff authored by Rajat Jindal's avatar Rajat Jindal

add msg when getting toomanyrequest error from evict pod

parent 7eb88f11
...@@ -585,6 +585,7 @@ func (o *DrainOptions) evictPods(pods []corev1.Pod, policyGroupVersion string, g ...@@ -585,6 +585,7 @@ func (o *DrainOptions) evictPods(pods []corev1.Pod, policyGroupVersion string, g
doneCh <- true doneCh <- true
return return
} else if apierrors.IsTooManyRequests(err) { } 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) time.Sleep(5 * time.Second)
} else { } else {
errCh <- fmt.Errorf("error when evicting pod %q: %v", pod.Name, err) errCh <- fmt.Errorf("error when evicting pod %q: %v", pod.Name, 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