Merge pull request #105515 from liggitt/quota-master

[master] Fix quota controller hotloop in integration tests
This commit is contained in:
Kubernetes Prow Robot 2021-10-06 12:18:43 -07:00 committed by GitHub
commit d8ba2f1530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,7 +287,11 @@ func (rq *Controller) Run(workers int, stopCh <-chan struct{}) {
go wait.Until(rq.worker(rq.missingUsageQueue), time.Second, stopCh)
}
// the timer for how often we do a full recalculation across all quotas
go wait.Until(func() { rq.enqueueAll() }, rq.resyncPeriod(), stopCh)
if rq.resyncPeriod() > 0 {
go wait.Until(func() { rq.enqueueAll() }, rq.resyncPeriod(), stopCh)
} else {
klog.Warningf("periodic quota controller resync disabled")
}
<-stopCh
}