Merge pull request #16266 from wojtek-t/fix_handshake_reflector

Reuse TCP connections in Reflector between resync periods.
This commit is contained in:
Jerzy Szczepkowski
2015-10-27 10:36:18 +01:00
37 changed files with 184 additions and 108 deletions

View File

@@ -58,8 +58,7 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time
ListFunc: func() (runtime.Object, error) {
return kubeClient.PersistentVolumes().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.PersistentVolumes().Watch(labels.Everything(), fields.Everything(), options)
},
},
@@ -77,8 +76,7 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time
ListFunc: func() (runtime.Object, error) {
return kubeClient.PersistentVolumeClaims(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.PersistentVolumeClaims(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
},
},

View File

@@ -66,8 +66,7 @@ func NewPersistentVolumeRecycler(kubeClient client.Interface, syncPeriod time.Du
ListFunc: func() (runtime.Object, error) {
return kubeClient.PersistentVolumes().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.PersistentVolumes().Watch(labels.Everything(), fields.Everything(), options)
},
},