Reuse TCP connections in Reflector between resync periods.
This commit is contained in:
@@ -224,8 +224,7 @@ var _ = Describe("DaemonRestart", func() {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return framework.Client.Pods(ns).List(labelSelector, fields.Everything())
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return framework.Client.Pods(ns).Watch(labelSelector, fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
|
||||
@@ -202,8 +202,7 @@ var _ = Describe("Density", func() {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return c.Events(ns).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 c.Events(ns).Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
@@ -286,8 +285,7 @@ var _ = Describe("Density", func() {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return c.Pods(ns).List(labels.SelectorFromSet(labels.Set{"name": additionalPodsPrefix}), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return c.Pods(ns).Watch(labels.SelectorFromSet(labels.Set{"name": additionalPodsPrefix}), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
|
||||
@@ -152,8 +152,7 @@ func runLatencyTest(nodeCount int, c *client.Client, ns string) {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return c.Pods(ns).List(labels.SelectorFromSet(labels.Set{"name": additionalPodsPrefix}), fields.Everything())
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return c.Pods(ns).Watch(labels.SelectorFromSet(labels.Set{"name": additionalPodsPrefix}), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
|
||||
@@ -281,8 +281,7 @@ func startEndpointWatcher(f *Framework, q *endpointQueries) {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return f.Client.Endpoints(f.Namespace.Name).List(labels.Everything())
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return f.Client.Endpoints(f.Namespace.Name).Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
|
||||
@@ -144,8 +144,7 @@ func newPodStore(c *client.Client, namespace string, label labels.Selector, fiel
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return c.Pods(namespace).List(label, field)
|
||||
},
|
||||
WatchFunc: func(rv string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: rv}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return c.Pods(namespace).Watch(label, field, options)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user