Commit Graph

18 Commits (5e16101aab754ebbc3a1e6cc900e8e8e7002ce1c)

Author SHA1 Message Date
Zach Loafman 3ec25c5425 routecontroller: Add wait.NonSlidingUntil, use it
Make sure the reconciliation loop kicks in again immediately if it
takes a loooooong time.
2016-05-25 13:58:35 -07:00
Isaac Hollander McCreery 27fb17e785 Poll much more frequently, remove wait for pods to be ready, and do one final check 2016-05-03 09:22:58 -07:00
Jan Chaloupka 3fa290980a jitter period in each run of Until
In order to synchronize the current state of Kubernetes's objects (e.g. pods, containers, etc.),
periodic synch loops are run. When there is a lot of objects to synchronize with,
loops increase communication traffic. At some point when all the traffic interfere cpu usage curve
hits the roof causing 100% cpu utilization.

To distribute the traffic in time, some sync loops can jitter their period in each loop
and help to flatten the curve.

This commit adds JitterUntil function with jitterFactor parameter.
JitterUntil generalizes Until which is a special case for jitterFactor being zero.
2016-02-07 21:09:02 +01:00
Jan Chaloupka 43a47a8234 Move Until, Forever, NeverStop, ForeverTestTimeout from util to wait 2016-02-07 11:38:48 +01:00
Clayton Coleman 4342fccc0d Provide a RetryOnConflict helper for client libraries
Used like:

    var pod *api.Pod
    err := client.RetryOnConflict(client.DefaultBackoff, func() (err error) {
      pod, err = c.Pods("mynamespace").UpdateStatus(update)
      return
    })
    // err may be conflict
2016-01-20 22:58:16 -05:00
Prashanth Balasubramanian eab22ff95a Fix timer leak in wait.Poll 2015-11-15 16:39:25 -08:00
Andy Goldstein 7999e72659 Fix potential goroutine leaks in pollers 2015-10-06 14:58:21 -04:00
Tim Hockin 1973d233e8 add wait.PollImmediate() and retool wait tests 2015-10-02 11:44:26 -07:00
Eric Tune f3018162d1 Revert "Check the condition immediately in util.Wait funcs" 2015-09-23 16:32:05 -07:00
Andy Goldstein 95041ab0ae Check the condition immediately in util.Wait funcs
Have poller() send to the channel once, immediately, before the ticker
starts. This way, Poll, PollInfinite, and WaitFor will check the
condition immediately, instead of waiting for the poller's interval to
elapse once before doing the initial condition check.
2015-09-22 14:06:52 -04:00
jayunit100 3b295ee342 Fix maxTimes comment to clarify infinity waits and add a PollInfinite function. 2015-07-29 19:04:51 -04:00
Marek Biskup dcc4034d57 e2e test for addon update 2015-06-15 17:37:24 +02:00
Max Forbes a6c47a07de E2E test node upgrade (to same version) 2015-06-03 17:05:45 -07:00
Daniel Smith 16a6fb8ef7 Replace calls to time.After with time.NewTimer for explicit stopping 2015-05-04 14:29:33 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Clayton Coleman 9006eadcfe kube-proxy can read config from the apiserver
All clients that talk to a "master" as a host:port or URL
(scheme://host:port) parameter.  Add tests.
2014-08-27 15:49:01 -04:00
Clayton Coleman 286c3c543c Improve the wait.Poll GoDoc and api
Add more tests, and switch to timeouts instead of cycles.
Deflake TestPoller
2014-08-23 12:18:03 -04:00
Clayton Coleman 493863eb93 Return immediately when controllers/pods are committed
Add client waiting conditions.
2014-08-20 18:46:10 -04:00