mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Reuse TCP connections in Reflector between resync periods.
This commit is contained in:
@@ -213,8 +213,7 @@ func NewMainKubelet(
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return kubeClient.Services(api.NamespaceAll).List(labels.Everything(), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(resourceVersion string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: resourceVersion}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return kubeClient.Services(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
}
|
||||
@@ -231,8 +230,7 @@ func NewMainKubelet(
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return kubeClient.Nodes().List(labels.Everything(), fieldSelector)
|
||||
},
|
||||
WatchFunc: func(resourceVersion string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: resourceVersion}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return kubeClient.Nodes().Watch(labels.Everything(), fieldSelector, options)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user