Merge b42dcbeb20
into 385368990c
This commit is contained in:
commit
602c93fee8
1 changed files with 3 additions and 11 deletions
|
@ -141,13 +141,15 @@ type Controller struct {
|
|||
|
||||
// Run initiates the synchronization of the controllers against the api server
|
||||
func (c *Controller) Run(stopCh chan struct{}) {
|
||||
go c.Ingress.Run(stopCh)
|
||||
go c.Endpoint.Run(stopCh)
|
||||
go c.Service.Run(stopCh)
|
||||
go c.Secret.Run(stopCh)
|
||||
go c.Configmap.Run(stopCh)
|
||||
|
||||
// Wait for all involved caches to be synced, before processing items from the queue is started
|
||||
// Wait for all involved caches to be synced before processing items from the queue
|
||||
if !cache.WaitForCacheSync(stopCh,
|
||||
c.Ingress.HasSynced,
|
||||
c.Endpoint.HasSynced,
|
||||
c.Service.HasSynced,
|
||||
c.Secret.HasSynced,
|
||||
|
@ -155,16 +157,6 @@ func (c *Controller) Run(stopCh chan struct{}) {
|
|||
) {
|
||||
runtime.HandleError(fmt.Errorf("Timed out waiting for caches to sync"))
|
||||
}
|
||||
|
||||
// We need to wait before start syncing the ingress rules
|
||||
// because the rules requires content from other listers
|
||||
time.Sleep(1 * time.Second)
|
||||
go c.Ingress.Run(stopCh)
|
||||
if !cache.WaitForCacheSync(stopCh,
|
||||
c.Ingress.HasSynced,
|
||||
) {
|
||||
runtime.HandleError(fmt.Errorf("Timed out waiting for caches to sync"))
|
||||
}
|
||||
}
|
||||
|
||||
// k8sStore internal Storer implementation using informers and thread safe stores
|
||||
|
|
Loading…
Reference in a new issue