Reuse TCP connections in Reflector between resync periods.
This commit is contained in:
@@ -99,8 +99,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return dsc.kubeClient.Extensions().DaemonSets(api.NamespaceAll).List(labels.Everything(), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return dsc.kubeClient.Extensions().DaemonSets(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
@@ -132,8 +131,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return dsc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return dsc.kubeClient.Pods(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
@@ -151,8 +149,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return dsc.kubeClient.Nodes().List(labels.Everything(), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return dsc.kubeClient.Nodes().Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user