mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Simplify List() signature in clients.
This commit is contained in:
@@ -32,8 +32,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/controller"
|
||||
"k8s.io/kubernetes/pkg/controller/framework"
|
||||
replicationcontroller "k8s.io/kubernetes/pkg/controller/replication"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/util"
|
||||
"k8s.io/kubernetes/pkg/util/workqueue"
|
||||
@@ -86,7 +84,7 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn
|
||||
jm.jobStore.Store, jm.jobController = framework.NewInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return jm.kubeClient.Extensions().Jobs(api.NamespaceAll).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
|
||||
return jm.kubeClient.Extensions().Jobs(api.NamespaceAll).List(unversioned.ListOptions{})
|
||||
},
|
||||
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
return jm.kubeClient.Extensions().Jobs(api.NamespaceAll).Watch(options)
|
||||
@@ -109,7 +107,7 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn
|
||||
jm.podStore.Store, jm.podController = framework.NewInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func() (runtime.Object, error) {
|
||||
return jm.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
|
||||
return jm.kubeClient.Pods(api.NamespaceAll).List(unversioned.ListOptions{})
|
||||
},
|
||||
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
|
||||
return jm.kubeClient.Pods(api.NamespaceAll).Watch(options)
|
||||
|
||||
Reference in New Issue
Block a user