Simplify List() signature in clients.
This commit is contained in:
@@ -45,10 +45,8 @@ import (
|
||||
"k8s.io/kubernetes/pkg/api/errors"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
"k8s.io/kubernetes/pkg/kubelet/container"
|
||||
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/util/sets"
|
||||
)
|
||||
|
||||
@@ -652,7 +650,7 @@ func (k *framework) makeTaskRegistryReconciler() taskreconciler.Action {
|
||||
// tasks identified by annotations in the Kubernetes pod registry.
|
||||
func (k *framework) makePodRegistryReconciler() taskreconciler.Action {
|
||||
return taskreconciler.Action(func(drv bindings.SchedulerDriver, cancel <-chan struct{}) <-chan error {
|
||||
podList, err := k.client.Pods(api.NamespaceAll).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
|
||||
podList, err := k.client.Pods(api.NamespaceAll).List(unversioned.ListOptions{})
|
||||
if err != nil {
|
||||
return proc.ErrorChanf("failed to reconcile pod registry: %v", err)
|
||||
}
|
||||
@@ -728,7 +726,7 @@ func (k *framework) explicitlyReconcileTasks(driver bindings.SchedulerDriver, ta
|
||||
}
|
||||
|
||||
func (ks *framework) recoverTasks() error {
|
||||
podList, err := ks.client.Pods(api.NamespaceAll).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
|
||||
podList, err := ks.client.Pods(api.NamespaceAll).List(unversioned.ListOptions{})
|
||||
if err != nil {
|
||||
log.V(1).Infof("failed to recover pod registry, madness may ensue: %v", err)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user