Fix secret informer load
This commit is contained in:
parent
3b4c8ba439
commit
d71e8ab7c9
2 changed files with 2 additions and 18 deletions
|
@ -168,6 +168,7 @@ func (c *clientWrapper) WatchAll(namespaces []string, stopCh <-chan struct{}) (<
|
||||||
factoryKube.Extensions().V1beta1().Ingresses().Informer().AddEventHandler(eventHandler)
|
factoryKube.Extensions().V1beta1().Ingresses().Informer().AddEventHandler(eventHandler)
|
||||||
factoryKube.Core().V1().Services().Informer().AddEventHandler(eventHandler)
|
factoryKube.Core().V1().Services().Informer().AddEventHandler(eventHandler)
|
||||||
factoryKube.Core().V1().Endpoints().Informer().AddEventHandler(eventHandler)
|
factoryKube.Core().V1().Endpoints().Informer().AddEventHandler(eventHandler)
|
||||||
|
factoryKube.Core().V1().Secrets().Informer().AddEventHandler(eventHandler)
|
||||||
|
|
||||||
c.factoriesCrd[ns] = factoryCrd
|
c.factoriesCrd[ns] = factoryCrd
|
||||||
c.factoriesKube[ns] = factoryKube
|
c.factoriesKube[ns] = factoryKube
|
||||||
|
@ -192,15 +193,6 @@ func (c *clientWrapper) WatchAll(namespaces []string, stopCh <-chan struct{}) (<
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not wait for the Secrets store to get synced since we cannot rely on
|
|
||||||
// users having granted RBAC permissions for this object.
|
|
||||||
// https://github.com/containous/traefik/issues/1784 should improve the
|
|
||||||
// situation here in the future.
|
|
||||||
for _, ns := range namespaces {
|
|
||||||
c.factoriesKube[ns].Core().V1().Secrets().Informer().AddEventHandler(eventHandler)
|
|
||||||
c.factoriesKube[ns].Start(stopCh)
|
|
||||||
}
|
|
||||||
|
|
||||||
return eventCh, nil
|
return eventCh, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,7 @@ func (c *clientWrapper) WatchAll(namespaces []string, stopCh <-chan struct{}) (<
|
||||||
factory.Extensions().V1beta1().Ingresses().Informer().AddEventHandler(eventHandler)
|
factory.Extensions().V1beta1().Ingresses().Informer().AddEventHandler(eventHandler)
|
||||||
factory.Core().V1().Services().Informer().AddEventHandler(eventHandler)
|
factory.Core().V1().Services().Informer().AddEventHandler(eventHandler)
|
||||||
factory.Core().V1().Endpoints().Informer().AddEventHandler(eventHandler)
|
factory.Core().V1().Endpoints().Informer().AddEventHandler(eventHandler)
|
||||||
|
factory.Core().V1().Secrets().Informer().AddEventHandler(eventHandler)
|
||||||
c.factories[ns] = factory
|
c.factories[ns] = factory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,15 +153,6 @@ func (c *clientWrapper) WatchAll(namespaces []string, stopCh <-chan struct{}) (<
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not wait for the Secrets store to get synced since we cannot rely on
|
|
||||||
// users having granted RBAC permissions for this object.
|
|
||||||
// https://github.com/containous/traefik/issues/1784 should improve the
|
|
||||||
// situation here in the future.
|
|
||||||
for _, ns := range namespaces {
|
|
||||||
c.factories[ns].Core().V1().Secrets().Informer().AddEventHandler(eventHandler)
|
|
||||||
c.factories[ns].Start(stopCh)
|
|
||||||
}
|
|
||||||
|
|
||||||
return eventCh, nil
|
return eventCh, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue