Skip to content

Commit

Permalink
Fix timeout on start informers
Browse files Browse the repository at this point in the history
  • Loading branch information
jspdown authored Aug 26, 2020
1 parent 860afb9 commit a4a789b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,23 +269,23 @@ func (c *Controller) startInformers(syncTimeout time.Duration) error {
}

func (c *Controller) startBaseInformers(stopCh <-chan struct{}) error {
c.kubernetesFactory.Start(stopCh)
c.kubernetesFactory.Start(c.stopCh)

for t, ok := range c.kubernetesFactory.WaitForCacheSync(stopCh) {
if !ok {
return fmt.Errorf("timed out waiting for controller caches to sync: %s", t)
}
}

c.splitFactory.Start(stopCh)
c.splitFactory.Start(c.stopCh)

for t, ok := range c.splitFactory.WaitForCacheSync(stopCh) {
if !ok {
return fmt.Errorf("timed out waiting for controller caches to sync: %s", t)
}
}

c.specsFactory.Start(stopCh)
c.specsFactory.Start(c.stopCh)

for t, ok := range c.specsFactory.WaitForCacheSync(stopCh) {
if !ok {
Expand All @@ -297,7 +297,7 @@ func (c *Controller) startBaseInformers(stopCh <-chan struct{}) error {
}

func (c *Controller) startACLInformers(stopCh <-chan struct{}) error {
c.accessFactory.Start(stopCh)
c.accessFactory.Start(c.stopCh)

for t, ok := range c.accessFactory.WaitForCacheSync(stopCh) {
if !ok {
Expand Down

0 comments on commit a4a789b

Please sign in to comment.