Pass ListOptions to List() methods.

This commit is contained in:
Wojciech Tyczynski
2015-11-26 11:06:01 +01:00
parent 7644d34759
commit 8343c8ce6c
138 changed files with 376 additions and 308 deletions

View File

@@ -164,7 +164,7 @@ func NewNodeController(
nc.podStore.Store, nc.podController = framework.NewInformer(
&cache.ListWatch{
ListFunc: func() (runtime.Object, error) {
return nc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), fields.Everything())
return nc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
},
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
return nc.kubeClient.Pods(api.NamespaceAll).Watch(labels.Everything(), fields.Everything(), options)
@@ -180,7 +180,7 @@ func NewNodeController(
nc.nodeStore.Store, nc.nodeController = framework.NewInformer(
&cache.ListWatch{
ListFunc: func() (runtime.Object, error) {
return nc.kubeClient.Nodes().List(labels.Everything(), fields.Everything())
return nc.kubeClient.Nodes().List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
},
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
return nc.kubeClient.Nodes().Watch(labels.Everything(), fields.Everything(), options)
@@ -347,7 +347,7 @@ func forcefullyDeletePod(c client.Interface, pod *api.Pod) {
// post "NodeReady==ConditionUnknown". It also evicts all pods if node is not ready or
// not reachable for a long period of time.
func (nc *NodeController) monitorNodeStatus() error {
nodes, err := nc.kubeClient.Nodes().List(labels.Everything(), fields.Everything())
nodes, err := nc.kubeClient.Nodes().List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
if err != nil {
return err
}
@@ -684,7 +684,7 @@ func (nc *NodeController) tryUpdateNodeStatus(node *api.Node) (time.Duration, ap
// returns true if the provided node still has pods scheduled to it, or an error if
// the server could not be contacted.
func (nc *NodeController) hasPods(nodeName string) (bool, error) {
pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), fields.OneTermEqualSelector(client.PodHost, nodeName))
pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), fields.OneTermEqualSelector(client.PodHost, nodeName), unversioned.ListOptions{})
if err != nil {
return false, err
}
@@ -717,7 +717,7 @@ func (nc *NodeController) cancelPodEviction(nodeName string) bool {
// if any pods were deleted.
func (nc *NodeController) deletePods(nodeName string) (bool, error) {
remaining := false
pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), fields.OneTermEqualSelector(client.PodHost, nodeName))
pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(), fields.OneTermEqualSelector(client.PodHost, nodeName), unversioned.ListOptions{})
if err != nil {
return remaining, err
}
@@ -756,7 +756,8 @@ func (nc *NodeController) terminatePods(nodeName string, since time.Time) (bool,
complete := true
pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(labels.Everything(),
fields.OneTermEqualSelector(client.PodHost, nodeName))
fields.OneTermEqualSelector(client.PodHost, nodeName),
unversioned.ListOptions{})
if err != nil {
return false, nextAttempt, err
}