mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Simplify List() signature in clients.
This commit is contained in:
@@ -67,7 +67,8 @@ func New(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc,
|
||||
gcc.podStore.Store, gcc.podStoreSyncer = framework.NewInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return gcc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), terminatedSelector, unversioned.ListOptions{})
|
||||
options := unversioned.ListOptions{FieldSelector: unversioned.FieldSelector{terminatedSelector}}
|
||||
return gcc.kubeClient.Pods(api.NamespaceAll).List(options)
|
||||
},
|
||||
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
options.FieldSelector.Selector = terminatedSelector
|
||||
|
||||
Reference in New Issue
Block a user