mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
Use VersionedParams in "extensions" client.
This commit is contained in:
5
pkg/client/cache/listwatch.go
vendored
5
pkg/client/cache/listwatch.go
vendored
@@ -19,6 +19,7 @@ package cache
|
||||
import (
|
||||
"time"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
@@ -60,9 +61,7 @@ func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSe
|
||||
Prefix("watch").
|
||||
Namespace(namespace).
|
||||
Resource(resource).
|
||||
// TODO: Use VersionedParams once this is supported for non v1 API.
|
||||
Param("resourceVersion", options.ResourceVersion).
|
||||
TimeoutSeconds(timeoutFromListOptions(options)).
|
||||
VersionedParams(&options, api.Scheme).
|
||||
FieldsSelectorParam(fieldSelector).
|
||||
Watch()
|
||||
}
|
||||
|
||||
2
pkg/client/cache/listwatch_test.go
vendored
2
pkg/client/cache/listwatch_test.go
vendored
@@ -117,7 +117,7 @@ func TestListWatchesCanWatch(t *testing.T) {
|
||||
{
|
||||
location: buildLocation(
|
||||
testapi.Default.ResourcePathWithPrefix("watch", "nodes", api.NamespaceAll, ""),
|
||||
buildQueryValues(url.Values{"resourceVersion": []string{""}})),
|
||||
buildQueryValues(url.Values{})),
|
||||
rv: "",
|
||||
resource: "nodes",
|
||||
namespace: api.NamespaceAll,
|
||||
|
||||
Reference in New Issue
Block a user