Merge pull request #4923 from lavalamp/fix4

Allow reflector to do full resync periodically
This commit is contained in:
Derek Carr
2015-03-04 09:58:03 -05:00
8 changed files with 113 additions and 48 deletions

View File

@@ -102,7 +102,12 @@ func NewMainKubelet(
serviceStore := cache.NewStore(cache.MetaNamespaceKeyFunc)
if kubeClient != nil {
cache.NewReflector(cache.NewListWatchFromClient(kubeClient, "services", api.NamespaceAll, labels.Everything()), &api.Service{}, serviceStore).Run()
cache.NewReflector(
cache.NewListWatchFromClient(kubeClient, "services", api.NamespaceAll, labels.Everything()),
&api.Service{},
serviceStore,
0,
).Run()
}
serviceLister := &cache.StoreToServiceLister{serviceStore}