Kubernetes-commit: d55d6175f8e2cfdab0b79aac72046a652c2eb515
This commit is contained in:
Mike Danese
2020-01-27 18:19:44 -08:00
committed by Kubernetes Publisher
parent 1b1a1841fa
commit b136e9eb2b
24 changed files with 81 additions and 55 deletions

View File

@@ -17,6 +17,8 @@ limitations under the License.
package cache
import (
"context"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/runtime"
@@ -82,7 +84,7 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string,
Namespace(namespace).
Resource(resource).
VersionedParams(&options, metav1.ParameterCodec).
Do().
Do(context.TODO()).
Get()
}
watchFunc := func(options metav1.ListOptions) (watch.Interface, error) {
@@ -92,7 +94,7 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string,
Namespace(namespace).
Resource(resource).
VersionedParams(&options, metav1.ParameterCodec).
Watch()
Watch(context.TODO())
}
return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc}
}