Skip to content

Commit

Permalink
Fix quota controller hotloop in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Oct 6, 2021
1 parent ace760a commit bc39258
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/controller/resourcequota/resource_quota_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit bc39258

Please sign in to comment.