mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 23:19:26 +00:00
Reuse TCP connections in Reflector between resync periods.
This commit is contained in:
@@ -102,8 +102,7 @@ func NewLimitRanger(client client.Interface, limitFunc LimitFunc) admission.Inte
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return client.LimitRanges(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 client.LimitRanges(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
}
|
||||
|
@@ -87,8 +87,7 @@ func NewProvision(c client.Interface) admission.Interface {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return c.Namespaces().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 c.Namespaces().Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
|
@@ -94,8 +94,7 @@ func NewExists(c client.Interface) admission.Interface {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return c.Namespaces().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 c.Namespaces().Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
|
@@ -111,8 +111,7 @@ func NewLifecycle(c client.Interface) admission.Interface {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return c.Namespaces().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 c.Namespaces().Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
|
@@ -53,8 +53,7 @@ func NewResourceQuota(client client.Interface) admission.Interface {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return client.ResourceQuotas(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 client.ResourceQuotas(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
}
|
||||
|
@@ -85,8 +85,7 @@ func NewServiceAccount(cl client.Interface) *serviceAccount {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return cl.ServiceAccounts(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 cl.ServiceAccounts(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
|
||||
},
|
||||
},
|
||||
@@ -100,8 +99,7 @@ func NewServiceAccount(cl client.Interface) *serviceAccount {
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return cl.Secrets(api.NamespaceAll).List(labels.Everything(), tokenSelector)
|
||||
},
|
||||
WatchFunc: func(resourceVersion string) (watch.Interface, error) {
|
||||
options := api.ListOptions{ResourceVersion: resourceVersion}
|
||||
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
|
||||
return cl.Secrets(api.NamespaceAll).Watch(labels.Everything(), tokenSelector, options)
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user