From 3954f889c7ba687637b4b95ebecf61cc500a8b4b Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 16 Jul 2017 00:22:11 -0400 Subject: [PATCH] Remove use of (Label|Field)SelectorParam Kubernetes-commit: b6d9815b95940002545b4aa7affb892d94637a49 --- tools/cache/listwatch.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cache/listwatch.go b/tools/cache/listwatch.go index af01d474..4c976533 100644 --- a/tools/cache/listwatch.go +++ b/tools/cache/listwatch.go @@ -58,21 +58,21 @@ type Getter interface { // NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector. func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch { listFunc := func(options metav1.ListOptions) (runtime.Object, error) { + options.FieldSelector = fieldSelector.String() return c.Get(). Namespace(namespace). Resource(resource). VersionedParams(&options, metav1.ParameterCodec). - FieldsSelectorParam(fieldSelector). Do(). Get() } watchFunc := func(options metav1.ListOptions) (watch.Interface, error) { options.Watch = true + options.FieldSelector = fieldSelector.String() return c.Get(). Namespace(namespace). Resource(resource). VersionedParams(&options, metav1.ParameterCodec). - FieldsSelectorParam(fieldSelector). Watch() } return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc}