routecontroller: Add wait.NonSlidingUntil, use it

Make sure the reconciliation loop kicks in again immediately if it
takes a loooooong time.
This commit is contained in:
Zach Loafman
2016-05-25 13:58:35 -07:00
parent 025b017277
commit 3ec25c5425
4 changed files with 62 additions and 15 deletions

View File

@@ -50,7 +50,7 @@ func New(routes cloudprovider.Routes, kubeClient clientset.Interface, clusterNam
}
func (rc *RouteController) Run(syncPeriod time.Duration) {
go wait.Until(func() {
go wait.NonSlidingUntil(func() {
if err := rc.reconcileNodeRoutes(); err != nil {
glog.Errorf("Couldn't reconcile node routes: %v", err)
}