Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b6ef62af
Commit
b6ef62af
authored
Nov 17, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use unversioned.ListOptions in clients.
parent
f3753c02
Hide whitespace changes
Inline
Side-by-side
Showing
96 changed files
with
249 additions
and
214 deletions
+249
-214
executor_test.go
contrib/mesos/pkg/executor/executor_test.go
+1
-1
integration_test.go
contrib/mesos/pkg/scheduler/integration/integration_test.go
+1
-1
endpoints_controller.go
contrib/mesos/pkg/service/endpoints_controller.go
+3
-2
deep_copy_generated.go
pkg/api/deep_copy_generated.go
+0
-32
register.go
pkg/api/register.go
+1
-1
fuzzer.go
pkg/api/testing/fuzzer.go
+0
-5
conversion_generated.go
pkg/api/v1/conversion_generated.go
+34
-33
apiserver.go
pkg/apiserver/apiserver.go
+1
-1
listwatch.go
pkg/client/cache/listwatch.go
+5
-5
listwatch_test.go
pkg/client/cache/listwatch_test.go
+1
-1
reflector.go
pkg/client/cache/reflector.go
+3
-3
reflector_test.go
pkg/client/cache/reflector_test.go
+1
-1
daemon_sets.go
pkg/client/unversioned/daemon_sets.go
+3
-3
deployment.go
pkg/client/unversioned/deployment.go
+3
-2
deployment_test.go
pkg/client/unversioned/deployment_test.go
+2
-1
endpoints.go
pkg/client/unversioned/endpoints.go
+3
-2
events.go
pkg/client/unversioned/events.go
+3
-2
helper.go
pkg/client/unversioned/helper.go
+1
-1
horizontalpodautoscaler.go
pkg/client/unversioned/horizontalpodautoscaler.go
+3
-2
horizontalpodautoscaler_test.go
pkg/client/unversioned/horizontalpodautoscaler_test.go
+2
-1
ingress.go
pkg/client/unversioned/ingress.go
+3
-2
jobs.go
pkg/client/unversioned/jobs.go
+3
-2
limit_ranges.go
pkg/client/unversioned/limit_ranges.go
+3
-2
limit_ranges_test.go
pkg/client/unversioned/limit_ranges_test.go
+2
-1
namespaces.go
pkg/client/unversioned/namespaces.go
+3
-2
namespaces_test.go
pkg/client/unversioned/namespaces_test.go
+2
-1
nodes.go
pkg/client/unversioned/nodes.go
+3
-2
persistentvolume_test.go
pkg/client/unversioned/persistentvolume_test.go
+2
-1
persistentvolumeclaim.go
pkg/client/unversioned/persistentvolumeclaim.go
+3
-2
persistentvolumeclaim_test.go
pkg/client/unversioned/persistentvolumeclaim_test.go
+2
-1
persistentvolumes.go
pkg/client/unversioned/persistentvolumes.go
+3
-2
pod_templates.go
pkg/client/unversioned/pod_templates.go
+3
-2
pod_templates_test.go
pkg/client/unversioned/pod_templates_test.go
+2
-1
pods.go
pkg/client/unversioned/pods.go
+3
-2
replication_controllers.go
pkg/client/unversioned/replication_controllers.go
+3
-2
request_test.go
pkg/client/unversioned/request_test.go
+2
-2
resource_quotas.go
pkg/client/unversioned/resource_quotas.go
+3
-2
resource_quotas_test.go
pkg/client/unversioned/resource_quotas_test.go
+2
-1
secrets.go
pkg/client/unversioned/secrets.go
+3
-2
service_accounts.go
pkg/client/unversioned/service_accounts.go
+3
-2
services.go
pkg/client/unversioned/services.go
+3
-2
actions.go
pkg/client/unversioned/testclient/actions.go
+3
-3
fake_daemon_sets.go
pkg/client/unversioned/testclient/fake_daemon_sets.go
+2
-2
fake_deployments.go
pkg/client/unversioned/testclient/fake_deployments.go
+2
-1
fake_endpoints.go
pkg/client/unversioned/testclient/fake_endpoints.go
+2
-1
fake_events.go
pkg/client/unversioned/testclient/fake_events.go
+2
-1
fake_horizontal_pod_autoscalers.go
...unversioned/testclient/fake_horizontal_pod_autoscalers.go
+2
-1
fake_ingress.go
pkg/client/unversioned/testclient/fake_ingress.go
+2
-1
fake_jobs.go
pkg/client/unversioned/testclient/fake_jobs.go
+2
-1
fake_limit_ranges.go
pkg/client/unversioned/testclient/fake_limit_ranges.go
+2
-1
fake_namespaces.go
pkg/client/unversioned/testclient/fake_namespaces.go
+2
-1
fake_nodes.go
pkg/client/unversioned/testclient/fake_nodes.go
+2
-1
fake_persistent_volume_claims.go
...t/unversioned/testclient/fake_persistent_volume_claims.go
+2
-1
fake_persistent_volumes.go
pkg/client/unversioned/testclient/fake_persistent_volumes.go
+2
-1
fake_pod_templates.go
pkg/client/unversioned/testclient/fake_pod_templates.go
+2
-1
fake_pods.go
pkg/client/unversioned/testclient/fake_pods.go
+2
-1
fake_replication_controllers.go
...nt/unversioned/testclient/fake_replication_controllers.go
+2
-1
fake_resource_quotas.go
pkg/client/unversioned/testclient/fake_resource_quotas.go
+2
-1
fake_secrets.go
pkg/client/unversioned/testclient/fake_secrets.go
+2
-1
fake_service_accounts.go
pkg/client/unversioned/testclient/fake_service_accounts.go
+2
-1
fake_services.go
pkg/client/unversioned/testclient/fake_services.go
+4
-3
controller.go
pkg/controller/daemon/controller.go
+4
-3
endpoints_controller.go
pkg/controller/endpoint/endpoints_controller.go
+3
-2
fake_controller_source.go
pkg/controller/framework/fake_controller_source.go
+2
-1
fake_controller_source_test.go
pkg/controller/framework/fake_controller_source_test.go
+4
-3
gc_controller.go
pkg/controller/gc/gc_controller.go
+2
-1
controller.go
pkg/controller/job/controller.go
+2
-2
namespace_controller.go
pkg/controller/namespace/namespace_controller.go
+1
-1
nodecontroller.go
pkg/controller/node/nodecontroller.go
+2
-2
nodecontroller_test.go
pkg/controller/node/nodecontroller_test.go
+1
-1
persistentvolume_claim_binder_controller.go
...sistentvolume/persistentvolume_claim_binder_controller.go
+3
-2
persistentvolume_recycler_controller.go
.../persistentvolume/persistentvolume_recycler_controller.go
+2
-1
replication_controller.go
pkg/controller/replication/replication_controller.go
+3
-2
serviceaccounts_controller.go
pkg/controller/serviceaccount/serviceaccounts_controller.go
+3
-2
tokens_controller.go
pkg/controller/serviceaccount/tokens_controller.go
+3
-2
apiserver_test.go
pkg/kubelet/config/apiserver_test.go
+2
-1
kubelet.go
pkg/kubelet/kubelet.go
+2
-2
api_test.go
pkg/proxy/config/api_test.go
+2
-1
cacher.go
pkg/storage/cacher.go
+2
-1
watch_cache_test.go
pkg/storage/watch_cache_test.go
+3
-3
util.go
pkg/volume/util.go
+2
-1
admission.go
plugin/pkg/admission/limitranger/admission.go
+2
-1
admission.go
plugin/pkg/admission/namespace/autoprovision/admission.go
+2
-1
admission.go
plugin/pkg/admission/namespace/exists/admission.go
+2
-1
admission.go
plugin/pkg/admission/namespace/lifecycle/admission.go
+2
-1
admission.go
plugin/pkg/admission/resourcequota/admission.go
+2
-1
admission.go
plugin/pkg/admission/serviceaccount/admission.go
+3
-2
daemon_restart.go
test/e2e/daemon_restart.go
+2
-1
density.go
test/e2e/density.go
+2
-2
framework.go
test/e2e/framework.go
+2
-1
latency.go
test/e2e/latency.go
+2
-2
pods.go
test/e2e/pods.go
+2
-1
service_latency.go
test/e2e/service_latency.go
+2
-1
util.go
test/e2e/util.go
+1
-1
client_test.go
test/integration/client_test.go
+2
-1
persistent_volumes_test.go
test/integration/persistent_volumes_test.go
+3
-2
No files found.
contrib/mesos/pkg/executor/executor_test.go
View file @
b6ef62af
...
...
@@ -494,7 +494,7 @@ func NewMockPodsListWatch(initialPodList api.PodList) *MockPodsListWatch {
list
:
initialPodList
,
}
lw
.
ListWatch
=
cache
.
ListWatch
{
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
lw
.
fakeWatcher
,
nil
},
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
...
...
contrib/mesos/pkg/scheduler/integration/integration_test.go
View file @
b6ef62af
...
...
@@ -169,7 +169,7 @@ func NewMockPodsListWatch(initialPodList api.PodList) *MockPodsListWatch {
list
:
initialPodList
,
}
lw
.
ListWatch
=
cache
.
ListWatch
{
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
lw
.
fakeWatcher
,
nil
},
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
...
...
contrib/mesos/pkg/service/endpoints_controller.go
View file @
b6ef62af
...
...
@@ -26,6 +26,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/endpoints"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
kservice
"k8s.io/kubernetes/pkg/controller/endpoint"
...
...
@@ -61,7 +62,7 @@ func NewEndpointController(client *client.Client) *endpointController {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -81,7 +82,7 @@ func NewEndpointController(client *client.Client) *endpointController {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/api/deep_copy_generated.go
View file @
b6ef62af
...
...
@@ -24,8 +24,6 @@ import (
resource
"k8s.io/kubernetes/pkg/api/resource"
unversioned
"k8s.io/kubernetes/pkg/api/unversioned"
conversion
"k8s.io/kubernetes/pkg/conversion"
fields
"k8s.io/kubernetes/pkg/fields"
labels
"k8s.io/kubernetes/pkg/labels"
runtime
"k8s.io/kubernetes/pkg/runtime"
intstr
"k8s.io/kubernetes/pkg/util/intstr"
inf
"speter.net/go/exp/math/dec/inf"
...
...
@@ -806,35 +804,6 @@ func deepCopy_api_List(in List, out *List, c *conversion.Cloner) error {
return
nil
}
func
deepCopy_api_ListOptions
(
in
ListOptions
,
out
*
ListOptions
,
c
*
conversion
.
Cloner
)
error
{
if
err
:=
deepCopy_unversioned_TypeMeta
(
in
.
TypeMeta
,
&
out
.
TypeMeta
,
c
);
err
!=
nil
{
return
err
}
if
newVal
,
err
:=
c
.
DeepCopy
(
in
.
LabelSelector
);
err
!=
nil
{
return
err
}
else
if
newVal
==
nil
{
out
.
LabelSelector
=
nil
}
else
{
out
.
LabelSelector
=
newVal
.
(
labels
.
Selector
)
}
if
newVal
,
err
:=
c
.
DeepCopy
(
in
.
FieldSelector
);
err
!=
nil
{
return
err
}
else
if
newVal
==
nil
{
out
.
FieldSelector
=
nil
}
else
{
out
.
FieldSelector
=
newVal
.
(
fields
.
Selector
)
}
out
.
Watch
=
in
.
Watch
out
.
ResourceVersion
=
in
.
ResourceVersion
if
in
.
TimeoutSeconds
!=
nil
{
out
.
TimeoutSeconds
=
new
(
int64
)
*
out
.
TimeoutSeconds
=
*
in
.
TimeoutSeconds
}
else
{
out
.
TimeoutSeconds
=
nil
}
return
nil
}
func
deepCopy_api_LoadBalancerIngress
(
in
LoadBalancerIngress
,
out
*
LoadBalancerIngress
,
c
*
conversion
.
Cloner
)
error
{
out
.
IP
=
in
.
IP
out
.
Hostname
=
in
.
Hostname
...
...
@@ -2402,7 +2371,6 @@ func init() {
deepCopy_api_LimitRangeList
,
deepCopy_api_LimitRangeSpec
,
deepCopy_api_List
,
deepCopy_api_ListOptions
,
deepCopy_api_LoadBalancerIngress
,
deepCopy_api_LoadBalancerStatus
,
deepCopy_api_LocalObjectReference
,
...
...
pkg/api/register.go
View file @
b6ef62af
...
...
@@ -58,7 +58,6 @@ func init() {
&
PersistentVolumeClaim
{},
&
PersistentVolumeClaimList
{},
&
DeleteOptions
{},
&
ListOptions
{},
&
PodAttachOptions
{},
&
PodLogOptions
{},
&
PodExecOptions
{},
...
...
@@ -70,6 +69,7 @@ func init() {
)
// Register Unversioned types
Scheme
.
AddKnownTypes
(
""
,
&
unversioned
.
ListOptions
{})
Scheme
.
AddKnownTypes
(
""
,
&
unversioned
.
Status
{})
Scheme
.
AddKnownTypes
(
""
,
&
unversioned
.
APIVersions
{})
Scheme
.
AddKnownTypes
(
""
,
&
unversioned
.
APIGroupList
{})
...
...
pkg/api/testing/fuzzer.go
View file @
b6ef62af
...
...
@@ -86,11 +86,6 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
j
.
ResourceVersion
=
strconv
.
FormatUint
(
c
.
RandUint64
(),
10
)
j
.
SelfLink
=
c
.
RandString
()
},
func
(
j
*
api
.
ListOptions
,
c
fuzz
.
Continue
)
{
// TODO: add some parsing
j
.
LabelSelector
,
_
=
labels
.
Parse
(
"a=b"
)
j
.
FieldSelector
,
_
=
fields
.
ParseSelector
(
"a=b"
)
},
func
(
j
*
unversioned
.
ListOptions
,
c
fuzz
.
Continue
)
{
// TODO: add some parsing
label
,
_
:=
labels
.
Parse
(
"a=b"
)
...
...
pkg/api/v1/conversion_generated.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ import (
api
"k8s.io/kubernetes/pkg/api"
resource
"k8s.io/kubernetes/pkg/api/resource"
unversioned
"k8s.io/kubernetes/pkg/api/unversioned"
conversion
"k8s.io/kubernetes/pkg/conversion"
)
...
...
@@ -1112,34 +1113,6 @@ func convert_api_List_To_v1_List(in *api.List, out *List, s conversion.Scope) er
return
autoconvert_api_List_To_v1_List
(
in
,
out
,
s
)
}
func
autoconvert_api_ListOptions_To_v1_ListOptions
(
in
*
api
.
ListOptions
,
out
*
ListOptions
,
s
conversion
.
Scope
)
error
{
if
defaulting
,
found
:=
s
.
DefaultingInterface
(
reflect
.
TypeOf
(
*
in
));
found
{
defaulting
.
(
func
(
*
api
.
ListOptions
))(
in
)
}
if
err
:=
s
.
Convert
(
&
in
.
TypeMeta
,
&
out
.
TypeMeta
,
0
);
err
!=
nil
{
return
err
}
if
err
:=
s
.
Convert
(
&
in
.
LabelSelector
,
&
out
.
LabelSelector
,
0
);
err
!=
nil
{
return
err
}
if
err
:=
s
.
Convert
(
&
in
.
FieldSelector
,
&
out
.
FieldSelector
,
0
);
err
!=
nil
{
return
err
}
out
.
Watch
=
in
.
Watch
out
.
ResourceVersion
=
in
.
ResourceVersion
if
in
.
TimeoutSeconds
!=
nil
{
out
.
TimeoutSeconds
=
new
(
int64
)
*
out
.
TimeoutSeconds
=
*
in
.
TimeoutSeconds
}
else
{
out
.
TimeoutSeconds
=
nil
}
return
nil
}
func
convert_api_ListOptions_To_v1_ListOptions
(
in
*
api
.
ListOptions
,
out
*
ListOptions
,
s
conversion
.
Scope
)
error
{
return
autoconvert_api_ListOptions_To_v1_ListOptions
(
in
,
out
,
s
)
}
func
autoconvert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress
(
in
*
api
.
LoadBalancerIngress
,
out
*
LoadBalancerIngress
,
s
conversion
.
Scope
)
error
{
if
defaulting
,
found
:=
s
.
DefaultingInterface
(
reflect
.
TypeOf
(
*
in
));
found
{
defaulting
.
(
func
(
*
api
.
LoadBalancerIngress
))(
in
)
...
...
@@ -3050,6 +3023,34 @@ func convert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *Volu
return
autoconvert_api_VolumeSource_To_v1_VolumeSource
(
in
,
out
,
s
)
}
func
autoconvert_unversioned_ListOptions_To_v1_ListOptions
(
in
*
unversioned
.
ListOptions
,
out
*
ListOptions
,
s
conversion
.
Scope
)
error
{
if
defaulting
,
found
:=
s
.
DefaultingInterface
(
reflect
.
TypeOf
(
*
in
));
found
{
defaulting
.
(
func
(
*
unversioned
.
ListOptions
))(
in
)
}
if
err
:=
s
.
Convert
(
&
in
.
TypeMeta
,
&
out
.
TypeMeta
,
0
);
err
!=
nil
{
return
err
}
if
err
:=
s
.
Convert
(
&
in
.
LabelSelector
,
&
out
.
LabelSelector
,
0
);
err
!=
nil
{
return
err
}
if
err
:=
s
.
Convert
(
&
in
.
FieldSelector
,
&
out
.
FieldSelector
,
0
);
err
!=
nil
{
return
err
}
out
.
Watch
=
in
.
Watch
out
.
ResourceVersion
=
in
.
ResourceVersion
if
in
.
TimeoutSeconds
!=
nil
{
out
.
TimeoutSeconds
=
new
(
int64
)
*
out
.
TimeoutSeconds
=
*
in
.
TimeoutSeconds
}
else
{
out
.
TimeoutSeconds
=
nil
}
return
nil
}
func
convert_unversioned_ListOptions_To_v1_ListOptions
(
in
*
unversioned
.
ListOptions
,
out
*
ListOptions
,
s
conversion
.
Scope
)
error
{
return
autoconvert_unversioned_ListOptions_To_v1_ListOptions
(
in
,
out
,
s
)
}
func
autoconvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource
(
in
*
AWSElasticBlockStoreVolumeSource
,
out
*
api
.
AWSElasticBlockStoreVolumeSource
,
s
conversion
.
Scope
)
error
{
if
defaulting
,
found
:=
s
.
DefaultingInterface
(
reflect
.
TypeOf
(
*
in
));
found
{
defaulting
.
(
func
(
*
AWSElasticBlockStoreVolumeSource
))(
in
)
...
...
@@ -4136,7 +4137,7 @@ func convert_v1_List_To_api_List(in *List, out *api.List, s conversion.Scope) er
return
autoconvert_v1_List_To_api_List
(
in
,
out
,
s
)
}
func
autoconvert_v1_ListOptions_To_
api_ListOptions
(
in
*
ListOptions
,
out
*
api
.
ListOptions
,
s
conversion
.
Scope
)
error
{
func
autoconvert_v1_ListOptions_To_
unversioned_ListOptions
(
in
*
ListOptions
,
out
*
unversioned
.
ListOptions
,
s
conversion
.
Scope
)
error
{
if
defaulting
,
found
:=
s
.
DefaultingInterface
(
reflect
.
TypeOf
(
*
in
));
found
{
defaulting
.
(
func
(
*
ListOptions
))(
in
)
}
...
...
@@ -4160,8 +4161,8 @@ func autoconvert_v1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.Lis
return
nil
}
func
convert_v1_ListOptions_To_
api_ListOptions
(
in
*
ListOptions
,
out
*
api
.
ListOptions
,
s
conversion
.
Scope
)
error
{
return
autoconvert_v1_ListOptions_To_
api
_ListOptions
(
in
,
out
,
s
)
func
convert_v1_ListOptions_To_
unversioned_ListOptions
(
in
*
ListOptions
,
out
*
unversioned
.
ListOptions
,
s
conversion
.
Scope
)
error
{
return
autoconvert_v1_ListOptions_To_
unversioned
_ListOptions
(
in
,
out
,
s
)
}
func
autoconvert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress
(
in
*
LoadBalancerIngress
,
out
*
api
.
LoadBalancerIngress
,
s
conversion
.
Scope
)
error
{
...
...
@@ -6124,7 +6125,6 @@ func init() {
autoconvert_api_LimitRangeList_To_v1_LimitRangeList
,
autoconvert_api_LimitRangeSpec_To_v1_LimitRangeSpec
,
autoconvert_api_LimitRange_To_v1_LimitRange
,
autoconvert_api_ListOptions_To_v1_ListOptions
,
autoconvert_api_List_To_v1_List
,
autoconvert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress
,
autoconvert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus
,
...
...
@@ -6197,6 +6197,7 @@ func init() {
autoconvert_api_VolumeMount_To_v1_VolumeMount
,
autoconvert_api_VolumeSource_To_v1_VolumeSource
,
autoconvert_api_Volume_To_v1_Volume
,
autoconvert_unversioned_ListOptions_To_v1_ListOptions
,
autoconvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource
,
autoconvert_v1_Binding_To_api_Binding
,
autoconvert_v1_Capabilities_To_api_Capabilities
,
...
...
@@ -6242,7 +6243,7 @@ func init() {
autoconvert_v1_LimitRangeList_To_api_LimitRangeList
,
autoconvert_v1_LimitRangeSpec_To_api_LimitRangeSpec
,
autoconvert_v1_LimitRange_To_api_LimitRange
,
autoconvert_v1_ListOptions_To_
api
_ListOptions
,
autoconvert_v1_ListOptions_To_
unversioned
_ListOptions
,
autoconvert_v1_List_To_api_List
,
autoconvert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress
,
autoconvert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus
,
...
...
pkg/apiserver/apiserver.go
View file @
b6ef62af
...
...
@@ -87,7 +87,7 @@ type APIGroupVersion struct {
RequestInfoResolver
*
RequestInfoResolver
// ServerVersion controls the Kubernetes APIVersion used for common objects in the apiserver
// schema like api.Status, api.DeleteOptions, and
api
.ListOptions. Other implementors may
// schema like api.Status, api.DeleteOptions, and
unversioned
.ListOptions. Other implementors may
// define a version "v1beta1" but want to use the Kubernetes "v1" internal objects. If
// empty, defaults to Version.
// TODO this seems suspicious. Is this actually just "unversioned" now?
...
...
pkg/client/cache/listwatch.go
View file @
b6ef62af
...
...
@@ -19,7 +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"
"k8s.io/kubernetes/pkg/runtime"
...
...
@@ -30,7 +30,7 @@ import (
type
ListFunc
func
()
(
runtime
.
Object
,
error
)
// WatchFunc knows how to watch resources
type
WatchFunc
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
type
WatchFunc
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
// ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface.
// It is a convenience function for users of NewReflector, etc.
...
...
@@ -55,7 +55,7 @@ func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSe
Do
()
.
Get
()
}
watchFunc
:=
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
watchFunc
:=
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
namespace
)
.
...
...
@@ -69,7 +69,7 @@ func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSe
return
&
ListWatch
{
ListFunc
:
listFunc
,
WatchFunc
:
watchFunc
}
}
func
timeoutFromListOptions
(
options
api
.
ListOptions
)
time
.
Duration
{
func
timeoutFromListOptions
(
options
unversioned
.
ListOptions
)
time
.
Duration
{
if
options
.
TimeoutSeconds
!=
nil
{
return
time
.
Duration
(
*
options
.
TimeoutSeconds
)
*
time
.
Second
}
...
...
@@ -82,6 +82,6 @@ func (lw *ListWatch) List() (runtime.Object, error) {
}
// Watch a set of apiserver resources
func
(
lw
*
ListWatch
)
Watch
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
lw
*
ListWatch
)
Watch
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
lw
.
WatchFunc
(
options
)
}
pkg/client/cache/listwatch_test.go
View file @
b6ef62af
...
...
@@ -165,7 +165,7 @@ func TestListWatchesCanWatch(t *testing.T) {
client
:=
client
.
NewOrDie
(
&
client
.
Config
{
Host
:
server
.
URL
,
GroupVersion
:
testapi
.
Default
.
GroupVersion
()})
lw
:=
NewListWatchFromClient
(
client
,
item
.
resource
,
item
.
namespace
,
item
.
fieldSelector
)
// This test merely tests that the correct request is made.
lw
.
Watch
(
api
.
ListOptions
{
ResourceVersion
:
item
.
rv
})
lw
.
Watch
(
unversioned
.
ListOptions
{
ResourceVersion
:
item
.
rv
})
handler
.
ValidateRequest
(
t
,
item
.
location
,
"GET"
,
nil
)
}
}
pkg/client/cache/reflector.go
View file @
b6ef62af
...
...
@@ -31,9 +31,9 @@ import (
"time"
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
apierrs
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -45,7 +45,7 @@ type ListerWatcher interface {
// ResourceVersion field will be used to start the watch in the right place.
List
()
(
runtime
.
Object
,
error
)
// Watch should begin a watch at the specified version.
Watch
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// Reflector watches a specified resource and causes all changes to be reflected in the given store.
...
...
@@ -246,7 +246,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
r
.
setLastSyncResourceVersion
(
resourceVersion
)
for
{
options
:=
api
.
ListOptions
{
options
:=
unversioned
.
ListOptions
{
ResourceVersion
:
resourceVersion
,
// We want to avoid situations when resyncing is breaking the TCP connection
// - see comment for 'timeoutForWatch()' for more details.
...
...
pkg/client/cache/reflector_test.go
View file @
b6ef62af
...
...
@@ -36,7 +36,7 @@ type testLW struct {
}
func
(
t
*
testLW
)
List
()
(
runtime
.
Object
,
error
)
{
return
t
.
ListFunc
()
}
func
(
t
*
testLW
)
Watch
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
t
*
testLW
)
Watch
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
t
.
WatchFunc
(
options
.
ResourceVersion
)
}
...
...
pkg/client/unversioned/daemon_sets.go
View file @
b6ef62af
...
...
@@ -17,7 +17,7 @@ limitations under the License.
package
unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api
/unversioned
"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -36,7 +36,7 @@ type DaemonSetInterface interface {
Update
(
ctrl
*
extensions
.
DaemonSet
)
(
*
extensions
.
DaemonSet
,
error
)
UpdateStatus
(
ctrl
*
extensions
.
DaemonSet
)
(
*
extensions
.
DaemonSet
,
error
)
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// daemonSets implements DaemonsSetsNamespacer interface
...
...
@@ -92,7 +92,7 @@ func (c *daemonSets) Delete(name string) error {
}
// Watch returns a watch.Interface that watches the requested daemon sets.
func
(
c
*
daemonSets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
daemonSets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/deployment.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -37,7 +38,7 @@ type DeploymentInterface interface {
Create
(
*
extensions
.
Deployment
)
(
*
extensions
.
Deployment
,
error
)
Update
(
*
extensions
.
Deployment
)
(
*
extensions
.
Deployment
,
error
)
UpdateStatus
(
*
extensions
.
Deployment
)
(
*
extensions
.
Deployment
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// deployments implements DeploymentInterface
...
...
@@ -101,7 +102,7 @@ func (c *deployments) UpdateStatus(deployment *extensions.Deployment) (result *e
}
// Watch returns a watch.Interface that watches the requested deployments.
func
(
c
*
deployments
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
deployments
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/deployment_test.go
View file @
b6ef62af
...
...
@@ -22,6 +22,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -168,6 +169,6 @@ func TestDeploymentWatch(t *testing.T) {
},
Response
:
Response
{
StatusCode
:
200
},
}
_
,
err
:=
c
.
Setup
(
t
)
.
Deployments
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
Deployments
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
}
pkg/client/unversioned/endpoints.go
View file @
b6ef62af
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -37,7 +38,7 @@ type EndpointsInterface interface {
Get
(
name
string
)
(
*
api
.
Endpoints
,
error
)
Delete
(
name
string
)
error
Update
(
endpoints
*
api
.
Endpoints
)
(
*
api
.
Endpoints
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// endpoints implements EndpointsInterface
...
...
@@ -84,7 +85,7 @@ func (c *endpoints) Delete(name string) error {
}
// Watch returns a watch.Interface that watches the requested endpoints for a service.
func
(
c
*
endpoints
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
endpoints
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/events.go
View file @
b6ef62af
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/runtime"
...
...
@@ -38,7 +39,7 @@ type EventInterface interface {
Patch
(
event
*
api
.
Event
,
data
[]
byte
)
(
*
api
.
Event
,
error
)
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
EventList
,
error
)
Get
(
name
string
)
(
*
api
.
Event
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
// Search finds events about the specified object
Search
(
objOrRef
runtime
.
Object
)
(
*
api
.
EventList
,
error
)
Delete
(
name
string
)
error
...
...
@@ -141,7 +142,7 @@ func (e *events) Get(name string) (*api.Event, error) {
}
// Watch starts watching for events matching the given selectors.
func
(
e
*
events
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
e
*
events
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
NamespaceIfScoped
(
e
.
namespace
,
len
(
e
.
namespace
)
>
0
)
.
...
...
pkg/client/unversioned/helper.go
View file @
b6ef62af
...
...
@@ -571,7 +571,7 @@ func DefaultKubernetesUserAgent() string {
// TimeoutFromListOptions returns timeout to be set via TimeoutSeconds() method
// based on given options.
func
TimeoutFromListOptions
(
options
api
.
ListOptions
)
time
.
Duration
{
func
TimeoutFromListOptions
(
options
unversioned
.
ListOptions
)
time
.
Duration
{
if
options
.
TimeoutSeconds
!=
nil
{
return
time
.
Duration
(
*
options
.
TimeoutSeconds
)
*
time
.
Second
}
...
...
pkg/client/unversioned/horizontalpodautoscaler.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -37,7 +38,7 @@ type HorizontalPodAutoscalerInterface interface {
Create
(
horizontalPodAutoscaler
*
extensions
.
HorizontalPodAutoscaler
)
(
*
extensions
.
HorizontalPodAutoscaler
,
error
)
Update
(
horizontalPodAutoscaler
*
extensions
.
HorizontalPodAutoscaler
)
(
*
extensions
.
HorizontalPodAutoscaler
,
error
)
UpdateStatus
(
horizontalPodAutoscaler
*
extensions
.
HorizontalPodAutoscaler
)
(
*
extensions
.
HorizontalPodAutoscaler
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// horizontalPodAutoscalers implements HorizontalPodAutoscalersNamespacer interface
...
...
@@ -103,7 +104,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *extensi
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func
(
c
*
horizontalPodAutoscalers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
horizontalPodAutoscalers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/horizontalpodautoscaler_test.go
View file @
b6ef62af
...
...
@@ -22,6 +22,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -155,6 +156,6 @@ func TestHorizontalPodAutoscalerWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
}
_
,
err
:=
c
.
Setup
(
t
)
.
Extensions
()
.
HorizontalPodAutoscalers
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
Extensions
()
.
HorizontalPodAutoscalers
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
}
pkg/client/unversioned/ingress.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -36,7 +37,7 @@ type IngressInterface interface {
Create
(
ingress
*
extensions
.
Ingress
)
(
*
extensions
.
Ingress
,
error
)
Update
(
ingress
*
extensions
.
Ingress
)
(
*
extensions
.
Ingress
,
error
)
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
UpdateStatus
(
ingress
*
extensions
.
Ingress
)
(
*
extensions
.
Ingress
,
error
)
}
...
...
@@ -93,7 +94,7 @@ func (c *ingress) Delete(name string, options *api.DeleteOptions) (err error) {
}
// Watch returns a watch.Interface that watches the requested ingress.
func
(
c
*
ingress
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
ingress
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/jobs.go
View file @
b6ef62af
...
...
@@ -19,6 +19,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/latest"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -37,7 +38,7 @@ type JobInterface interface {
Create
(
job
*
extensions
.
Job
)
(
*
extensions
.
Job
,
error
)
Update
(
job
*
extensions
.
Job
)
(
*
extensions
.
Job
,
error
)
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
UpdateStatus
(
job
*
extensions
.
Job
)
(
*
extensions
.
Job
,
error
)
}
...
...
@@ -97,7 +98,7 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) (err error) {
}
// Watch returns a watch.Interface that watches the requested jobs.
func
(
c
*
jobs
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
jobs
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/limit_ranges.go
View file @
b6ef62af
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -37,7 +38,7 @@ type LimitRangeInterface interface {
Delete
(
name
string
)
error
Create
(
limitRange
*
api
.
LimitRange
)
(
*
api
.
LimitRange
,
error
)
Update
(
limitRange
*
api
.
LimitRange
)
(
*
api
.
LimitRange
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// limitRanges implements LimitRangesNamespacer interface
...
...
@@ -92,7 +93,7 @@ func (c *limitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange
}
// Watch returns a watch.Interface that watches the requested resource
func
(
c
*
limitRanges
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
limitRanges
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/limit_ranges_test.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
)
...
...
@@ -207,6 +208,6 @@ func TestLimitRangeWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
}
_
,
err
:=
c
.
Setup
(
t
)
.
LimitRanges
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
LimitRanges
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
}
pkg/client/unversioned/namespaces.go
View file @
b6ef62af
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -35,7 +36,7 @@ type NamespaceInterface interface {
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
NamespaceList
,
error
)
Delete
(
name
string
)
error
Update
(
item
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Finalize
(
item
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
Status
(
item
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
}
...
...
@@ -114,7 +115,7 @@ func (c *namespaces) Delete(name string) error {
}
// Watch returns a watch.Interface that watches the requested namespaces.
func
(
c
*
namespaces
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
namespaces
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Resource
(
"namespaces"
)
.
...
...
pkg/client/unversioned/namespaces_test.go
View file @
b6ef62af
...
...
@@ -22,6 +22,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
)
...
...
@@ -174,6 +175,6 @@ func TestNamespaceWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
}
_
,
err
:=
c
.
Setup
(
t
)
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
}
pkg/client/unversioned/nodes.go
View file @
b6ef62af
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -36,7 +37,7 @@ type NodeInterface interface {
Delete
(
name
string
)
error
Update
(
*
api
.
Node
)
(
*
api
.
Node
,
error
)
UpdateStatus
(
*
api
.
Node
)
(
*
api
.
Node
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// nodes implements NodesInterface
...
...
@@ -102,7 +103,7 @@ func (c *nodes) UpdateStatus(node *api.Node) (*api.Node, error) {
}
// Watch returns a watch.Interface that watches the requested nodes.
func
(
c
*
nodes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
nodes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
api
.
NamespaceAll
)
.
...
...
pkg/client/unversioned/persistentvolume_test.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
)
...
...
@@ -180,6 +181,6 @@ func TestPersistentVolumeWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
}
_
,
err
:=
c
.
Setup
(
t
)
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
}
pkg/client/unversioned/persistentvolumeclaim.go
View file @
b6ef62af
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -38,7 +39,7 @@ type PersistentVolumeClaimInterface interface {
Update
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
UpdateStatus
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// persistentVolumeClaims implements PersistentVolumeClaimsNamespacer interface
...
...
@@ -98,7 +99,7 @@ func (c *persistentVolumeClaims) Delete(name string) error {
return
c
.
client
.
Delete
()
.
Namespace
(
c
.
namespace
)
.
Resource
(
"persistentVolumeClaims"
)
.
Name
(
name
)
.
Do
()
.
Error
()
}
func
(
c
*
persistentVolumeClaims
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
persistentVolumeClaims
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
namespace
)
.
...
...
pkg/client/unversioned/persistentvolumeclaim_test.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
)
...
...
@@ -197,6 +198,6 @@ func TestPersistentVolumeClaimWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
}
_
,
err
:=
c
.
Setup
(
t
)
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
}
pkg/client/unversioned/persistentvolumes.go
View file @
b6ef62af
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -37,7 +38,7 @@ type PersistentVolumeInterface interface {
Update
(
volume
*
api
.
PersistentVolume
)
(
*
api
.
PersistentVolume
,
error
)
UpdateStatus
(
persistentVolume
*
api
.
PersistentVolume
)
(
*
api
.
PersistentVolume
,
error
)
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// persistentVolumes implements PersistentVolumesInterface
...
...
@@ -93,7 +94,7 @@ func (c *persistentVolumes) Delete(name string) error {
return
c
.
client
.
Delete
()
.
Resource
(
"persistentVolumes"
)
.
Name
(
name
)
.
Do
()
.
Error
()
}
func
(
c
*
persistentVolumes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
persistentVolumes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Resource
(
"persistentVolumes"
)
.
...
...
pkg/client/unversioned/pod_templates.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -35,7 +36,7 @@ type PodTemplateInterface interface {
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Create
(
podTemplate
*
api
.
PodTemplate
)
(
*
api
.
PodTemplate
,
error
)
Update
(
podTemplate
*
api
.
PodTemplate
)
(
*
api
.
PodTemplate
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// podTemplates implements PodTemplatesNamespacer interface
...
...
@@ -94,7 +95,7 @@ func (c *podTemplates) Update(podTemplate *api.PodTemplate) (result *api.PodTemp
}
// Watch returns a watch.Interface that watches the requested podTemplates.
func
(
c
*
podTemplates
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
podTemplates
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/pod_templates_test.go
View file @
b6ef62af
...
...
@@ -22,6 +22,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
)
...
...
@@ -137,6 +138,6 @@ func TestPodTemplateWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
}
_
,
err
:=
c
.
Setup
(
t
)
.
PodTemplates
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
PodTemplates
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
}
pkg/client/unversioned/pods.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -35,7 +36,7 @@ type PodInterface interface {
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Create
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
Update
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Bind
(
binding
*
api
.
Binding
)
error
UpdateStatus
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
GetLogs
(
name
string
,
opts
*
api
.
PodLogOptions
)
*
Request
...
...
@@ -97,7 +98,7 @@ func (c *pods) Update(pod *api.Pod) (result *api.Pod, err error) {
}
// Watch returns a watch.Interface that watches the requested pods.
func
(
c
*
pods
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
pods
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/replication_controllers.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -36,7 +37,7 @@ type ReplicationControllerInterface interface {
Update
(
ctrl
*
api
.
ReplicationController
)
(
*
api
.
ReplicationController
,
error
)
UpdateStatus
(
ctrl
*
api
.
ReplicationController
)
(
*
api
.
ReplicationController
,
error
)
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// replicationControllers implements ReplicationControllersNamespacer interface
...
...
@@ -91,7 +92,7 @@ func (c *replicationControllers) Delete(name string) error {
}
// Watch returns a watch.Interface that watches the requested controllers.
func
(
c
*
replicationControllers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
replicationControllers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/request_test.go
View file @
b6ef62af
...
...
@@ -204,7 +204,7 @@ func TestRequestVersionedParams(t *testing.T) {
func
TestRequestVersionedParamsFromListOptions
(
t
*
testing
.
T
)
{
r
:=
&
Request
{
apiVersion
:
"v1"
}
r
.
VersionedParams
(
&
api
.
ListOptions
{
ResourceVersion
:
"1"
},
api
.
Scheme
)
r
.
VersionedParams
(
&
unversioned
.
ListOptions
{
ResourceVersion
:
"1"
},
api
.
Scheme
)
if
!
reflect
.
DeepEqual
(
r
.
params
,
url
.
Values
{
"resourceVersion"
:
[]
string
{
"1"
},
})
{
...
...
@@ -212,7 +212,7 @@ func TestRequestVersionedParamsFromListOptions(t *testing.T) {
}
var
timeout
int64
=
10
r
.
VersionedParams
(
&
api
.
ListOptions
{
ResourceVersion
:
"2"
,
TimeoutSeconds
:
&
timeout
},
api
.
Scheme
)
r
.
VersionedParams
(
&
unversioned
.
ListOptions
{
ResourceVersion
:
"2"
,
TimeoutSeconds
:
&
timeout
},
api
.
Scheme
)
if
!
reflect
.
DeepEqual
(
r
.
params
,
url
.
Values
{
"resourceVersion"
:
[]
string
{
"1"
,
"2"
},
"timeoutSeconds"
:
[]
string
{
"10"
},
...
...
pkg/client/unversioned/resource_quotas.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -36,7 +37,7 @@ type ResourceQuotaInterface interface {
Create
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
Update
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
UpdateStatus
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// resourceQuotas implements ResourceQuotasNamespacer interface
...
...
@@ -94,7 +95,7 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (result
}
// Watch returns a watch.Interface that watches the requested resource
func
(
c
*
resourceQuotas
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
resourceQuotas
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/resource_quotas_test.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
)
...
...
@@ -193,6 +194,6 @@ func TestResourceQuotaWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
}
_
,
err
:=
c
.
Setup
(
t
)
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
}
pkg/client/unversioned/secrets.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -33,7 +34,7 @@ type SecretsInterface interface {
Delete
(
name
string
)
error
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
SecretList
,
error
)
Get
(
name
string
)
(
*
api
.
Secret
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// events implements Secrets interface
...
...
@@ -91,7 +92,7 @@ func (s *secrets) Get(name string) (*api.Secret, error) {
}
// Watch starts watching for secrets matching the given selectors.
func
(
s
*
secrets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
s
*
secrets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
s
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
s
.
namespace
)
.
...
...
pkg/client/unversioned/service_accounts.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -33,7 +34,7 @@ type ServiceAccountsInterface interface {
Delete
(
name
string
)
error
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
ServiceAccountList
,
error
)
Get
(
name
string
)
(
*
api
.
ServiceAccount
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
// serviceAccounts implements ServiceAccounts interface
...
...
@@ -91,7 +92,7 @@ func (s *serviceAccounts) Get(name string) (*api.ServiceAccount, error) {
}
// Watch starts watching for serviceAccounts matching the given selectors.
func
(
s
*
serviceAccounts
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
s
*
serviceAccounts
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
s
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
s
.
namespace
)
.
...
...
pkg/client/unversioned/services.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package unversioned
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/util"
...
...
@@ -36,7 +37,7 @@ type ServiceInterface interface {
Create
(
srv
*
api
.
Service
)
(
*
api
.
Service
,
error
)
Update
(
srv
*
api
.
Service
)
(
*
api
.
Service
,
error
)
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
ProxyGet
(
scheme
,
name
,
port
,
path
string
,
params
map
[
string
]
string
)
ResponseWrapper
}
...
...
@@ -91,7 +92,7 @@ func (c *services) Delete(name string) error {
}
// Watch returns a watch.Interface that watches the requested services.
func
(
c
*
services
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
services
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
...
...
pkg/client/unversioned/testclient/actions.go
View file @
b6ef62af
...
...
@@ -19,7 +19,7 @@ package testclient
import
(
"strings"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api
/unversioned
"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/runtime"
...
...
@@ -150,7 +150,7 @@ func NewDeleteAction(resource, namespace, name string) DeleteActionImpl {
return
action
}
func
NewRootWatchAction
(
resource
string
,
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
WatchActionImpl
{
func
NewRootWatchAction
(
resource
string
,
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
WatchActionImpl
{
action
:=
WatchActionImpl
{}
action
.
Verb
=
"watch"
action
.
Resource
=
resource
...
...
@@ -159,7 +159,7 @@ func NewRootWatchAction(resource string, label labels.Selector, field fields.Sel
return
action
}
func
NewWatchAction
(
resource
,
namespace
string
,
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
WatchActionImpl
{
func
NewWatchAction
(
resource
,
namespace
string
,
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
WatchActionImpl
{
action
:=
WatchActionImpl
{}
action
.
Verb
=
"watch"
action
.
Resource
=
resource
...
...
pkg/client/unversioned/testclient/fake_daemon_sets.go
View file @
b6ef62af
...
...
@@ -17,7 +17,7 @@ limitations under the License.
package
testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api
/unversioned
"
"k8s.io/kubernetes/pkg/apis/extensions"
kclientlib
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
...
...
@@ -80,6 +80,6 @@ func (c *FakeDaemonSets) Delete(name string) error {
return
err
}
func
(
c
*
FakeDaemonSets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeDaemonSets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"daemonsets"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
pkg/client/unversioned/testclient/fake_deployments.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -86,6 +87,6 @@ func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error
return
err
}
func
(
c
*
FakeDeployments
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeDeployments
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"deployments"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
pkg/client/unversioned/testclient/fake_endpoints.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -71,6 +72,6 @@ func (c *FakeEndpoints) Delete(name string) error {
return
err
}
func
(
c
*
FakeEndpoints
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeEndpoints
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"endpoints"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
pkg/client/unversioned/testclient/fake_events.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/runtime"
...
...
@@ -111,7 +112,7 @@ func (c *FakeEvents) Delete(name string) error {
}
// Watch starts watching for events matching the given selectors.
func
(
c
*
FakeEvents
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeEvents
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
action
:=
NewRootWatchAction
(
"events"
,
label
,
field
,
opts
)
if
c
.
Namespace
!=
""
{
action
=
NewWatchAction
(
"events"
,
c
.
Namespace
,
label
,
field
,
opts
)
...
...
pkg/client/unversioned/testclient/fake_horizontal_pod_autoscalers.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -85,6 +86,6 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOp
return
err
}
func
(
c
*
FakeHorizontalPodAutoscalers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeHorizontalPodAutoscalers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"horizontalpodautoscalers"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
pkg/client/unversioned/testclient/fake_ingress.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -72,7 +73,7 @@ func (c *FakeIngress) Delete(name string, options *api.DeleteOptions) error {
return
err
}
func
(
c
*
FakeIngress
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeIngress
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"ingresses"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
...
...
pkg/client/unversioned/testclient/fake_jobs.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -72,7 +73,7 @@ func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
return
err
}
func
(
c
*
FakeJobs
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeJobs
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"jobs"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
...
...
pkg/client/unversioned/testclient/fake_limit_ranges.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -71,6 +72,6 @@ func (c *FakeLimitRanges) Delete(name string) error {
return
err
}
func
(
c
*
FakeLimitRanges
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeLimitRanges
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"limitranges"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
pkg/client/unversioned/testclient/fake_namespaces.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -70,7 +71,7 @@ func (c *FakeNamespaces) Delete(name string) error {
return
err
}
func
(
c
*
FakeNamespaces
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeNamespaces
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewRootWatchAction
(
"namespaces"
,
label
,
field
,
opts
))
}
...
...
pkg/client/unversioned/testclient/fake_nodes.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -70,7 +71,7 @@ func (c *FakeNodes) Delete(name string) error {
return
err
}
func
(
c
*
FakeNodes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeNodes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewRootWatchAction
(
"nodes"
,
label
,
field
,
opts
))
}
...
...
pkg/client/unversioned/testclient/fake_persistent_volume_claims.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -69,7 +70,7 @@ func (c *FakePersistentVolumeClaims) Delete(name string) error {
return
err
}
func
(
c
*
FakePersistentVolumeClaims
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakePersistentVolumeClaims
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"persistentvolumeclaims"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
...
...
pkg/client/unversioned/testclient/fake_persistent_volumes.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -68,7 +69,7 @@ func (c *FakePersistentVolumes) Delete(name string) error {
return
err
}
func
(
c
*
FakePersistentVolumes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakePersistentVolumes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewRootWatchAction
(
"persistentvolumes"
,
label
,
field
,
opts
))
}
...
...
pkg/client/unversioned/testclient/fake_pod_templates.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -71,6 +72,6 @@ func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error
return
err
}
func
(
c
*
FakePodTemplates
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakePodTemplates
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"podtemplates"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
pkg/client/unversioned/testclient/fake_pods.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -77,7 +78,7 @@ func (c *FakePods) Delete(name string, options *api.DeleteOptions) error {
return
err
}
func
(
c
*
FakePods
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakePods
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"pods"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
...
...
pkg/client/unversioned/testclient/fake_replication_controllers.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -79,6 +80,6 @@ func (c *FakeReplicationControllers) Delete(name string) error {
return
err
}
func
(
c
*
FakeReplicationControllers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeReplicationControllers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"replicationcontrollers"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
pkg/client/unversioned/testclient/fake_resource_quotas.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -71,7 +72,7 @@ func (c *FakeResourceQuotas) Delete(name string) error {
return
err
}
func
(
c
*
FakeResourceQuotas
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeResourceQuotas
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"resourcequotas"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
...
...
pkg/client/unversioned/testclient/fake_secrets.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -71,6 +72,6 @@ func (c *FakeSecrets) Delete(name string) error {
return
err
}
func
(
c
*
FakeSecrets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeSecrets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"secrets"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
pkg/client/unversioned/testclient/fake_service_accounts.go
View file @
b6ef62af
...
...
@@ -18,6 +18,7 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -71,6 +72,6 @@ func (c *FakeServiceAccounts) Delete(name string) error {
return
err
}
func
(
c
*
FakeServiceAccounts
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeServiceAccounts
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"serviceaccounts"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
pkg/client/unversioned/testclient/fake_services.go
View file @
b6ef62af
...
...
@@ -18,7 +18,8 @@ package testclient
import
(
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/api/unversioned"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -72,10 +73,10 @@ func (c *FakeServices) Delete(name string) error {
return
err
}
func
(
c
*
FakeServices
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeServices
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"services"
,
c
.
Namespace
,
label
,
field
,
opts
))
}
func
(
c
*
FakeServices
)
ProxyGet
(
scheme
,
name
,
port
,
path
string
,
params
map
[
string
]
string
)
unversioned
.
ResponseWrapper
{
func
(
c
*
FakeServices
)
ProxyGet
(
scheme
,
name
,
port
,
path
string
,
params
map
[
string
]
string
)
client
.
ResponseWrapper
{
return
c
.
Fake
.
InvokesProxy
(
NewProxyGetAction
(
"services"
,
c
.
Namespace
,
scheme
,
name
,
port
,
path
,
params
))
}
pkg/controller/daemon/controller.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ import (
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/client/record"
...
...
@@ -99,7 +100,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
dsc
.
kubeClient
.
Extensions
()
.
DaemonSets
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
dsc
.
kubeClient
.
Extensions
()
.
DaemonSets
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -131,7 +132,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
dsc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
dsc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -149,7 +150,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
dsc
.
kubeClient
.
Nodes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
dsc
.
kubeClient
.
Nodes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/controller/endpoint/endpoints_controller.go
View file @
b6ef62af
...
...
@@ -26,6 +26,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/endpoints"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/controller"
...
...
@@ -65,7 +66,7 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -86,7 +87,7 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/controller/framework/fake_controller_source.go
View file @
b6ef62af
...
...
@@ -24,6 +24,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -151,7 +152,7 @@ func (f *FakeControllerSource) List() (runtime.Object, error) {
// Watch returns a watch, which will be pre-populated with all changes
// after resourceVersion.
func
(
f
*
FakeControllerSource
)
Watch
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
f
*
FakeControllerSource
)
Watch
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
f
.
lock
.
RLock
()
defer
f
.
lock
.
RUnlock
()
rc
,
err
:=
strconv
.
Atoi
(
options
.
ResourceVersion
)
...
...
pkg/controller/framework/fake_controller_source_test.go
View file @
b6ef62af
...
...
@@ -21,6 +21,7 @@ import (
"testing"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/watch"
)
...
...
@@ -64,7 +65,7 @@ func TestRCNumber(t *testing.T) {
source
.
Modify
(
pod
(
"foo"
))
source
.
Modify
(
pod
(
"foo"
))
w
,
err
:=
source
.
Watch
(
api
.
ListOptions
{
ResourceVersion
:
"1"
})
w
,
err
:=
source
.
Watch
(
unversioned
.
ListOptions
{
ResourceVersion
:
"1"
})
if
err
!=
nil
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
...
...
@@ -78,13 +79,13 @@ func TestRCNumber(t *testing.T) {
t
.
Errorf
(
"wanted %v, got %v"
,
e
,
a
)
}
w2
,
err
:=
source
.
Watch
(
api
.
ListOptions
{
ResourceVersion
:
"2"
})
w2
,
err
:=
source
.
Watch
(
unversioned
.
ListOptions
{
ResourceVersion
:
"2"
})
if
err
!=
nil
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
go
consume
(
t
,
w2
,
[]
string
{
"3"
},
wg
)
w3
,
err
:=
source
.
Watch
(
api
.
ListOptions
{
ResourceVersion
:
"3"
})
w3
,
err
:=
source
.
Watch
(
unversioned
.
ListOptions
{
ResourceVersion
:
"3"
})
if
err
!=
nil
{
t
.
Fatalf
(
"Unexpected error: %v"
,
err
)
}
...
...
pkg/controller/gc/gc_controller.go
View file @
b6ef62af
...
...
@@ -22,6 +22,7 @@ import (
"time"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/client/record"
client
"k8s.io/kubernetes/pkg/client/unversioned"
...
...
@@ -68,7 +69,7 @@ func New(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc,
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
gcc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
terminatedSelector
)
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
gcc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
terminatedSelector
,
options
)
},
},
...
...
pkg/controller/job/controller.go
View file @
b6ef62af
...
...
@@ -88,7 +88,7 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
jm
.
kubeClient
.
Extensions
()
.
Jobs
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
jm
.
kubeClient
.
Extensions
()
.
Jobs
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -111,7 +111,7 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
jm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
jm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/controller/namespace/namespace_controller.go
View file @
b6ef62af
...
...
@@ -50,7 +50,7 @@ func NewNamespaceController(kubeClient client.Interface, versions *unversioned.A
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
kubeClient
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/controller/node/nodecontroller.go
View file @
b6ef62af
...
...
@@ -166,7 +166,7 @@ func NewNodeController(
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
nc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
nc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -182,7 +182,7 @@ func NewNodeController(
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
nc
.
kubeClient
.
Nodes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
nc
.
kubeClient
.
Nodes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/controller/node/nodecontroller_test.go
View file @
b6ef62af
...
...
@@ -136,7 +136,7 @@ func (m *FakeNodeHandler) UpdateStatus(node *api.Node) (*api.Node, error) {
return
node
,
nil
}
func
(
m
*
FakeNodeHandler
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
m
*
FakeNodeHandler
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
nil
,
nil
}
...
...
pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/controller/framework"
...
...
@@ -58,7 +59,7 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
kubeClient
.
PersistentVolumes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -76,7 +77,7 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
kubeClient
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/controller/persistentvolume/persistentvolume_recycler_controller.go
View file @
b6ef62af
...
...
@@ -22,6 +22,7 @@ import (
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/cloudprovider"
...
...
@@ -66,7 +67,7 @@ func NewPersistentVolumeRecycler(kubeClient client.Interface, syncPeriod time.Du
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
kubeClient
.
PersistentVolumes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/controller/replication/replication_controller.go
View file @
b6ef62af
...
...
@@ -24,6 +24,7 @@ import (
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/client/record"
client
"k8s.io/kubernetes/pkg/client/unversioned"
...
...
@@ -110,7 +111,7 @@ func NewReplicationManager(kubeClient client.Interface, resyncPeriod controller.
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
rm
.
kubeClient
.
ReplicationControllers
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
rm
.
kubeClient
.
ReplicationControllers
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -151,7 +152,7 @@ func NewReplicationManager(kubeClient client.Interface, resyncPeriod controller.
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
rm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
rm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/controller/serviceaccount/serviceaccounts_controller.go
View file @
b6ef62af
...
...
@@ -24,6 +24,7 @@ import (
"k8s.io/kubernetes/pkg/api"
apierrs
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/controller/framework"
...
...
@@ -80,7 +81,7 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
accountSelector
)
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
accountSelector
,
options
)
},
},
...
...
@@ -97,7 +98,7 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
e
.
client
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
pkg/controller/serviceaccount/tokens_controller.go
View file @
b6ef62af
...
...
@@ -24,6 +24,7 @@ import (
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
apierrors
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/controller/framework"
...
...
@@ -65,7 +66,7 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) *
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -85,7 +86,7 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) *
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
e
.
client
.
Secrets
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
tokenSelector
)
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Secrets
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
tokenSelector
,
options
)
},
},
...
...
pkg/kubelet/config/apiserver_test.go
View file @
b6ef62af
...
...
@@ -20,6 +20,7 @@ import (
"testing"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
kubetypes
"k8s.io/kubernetes/pkg/kubelet/types"
"k8s.io/kubernetes/pkg/runtime"
...
...
@@ -35,7 +36,7 @@ func (lw fakePodLW) List() (runtime.Object, error) {
return
lw
.
listResp
,
nil
}
func
(
lw
fakePodLW
)
Watch
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
lw
fakePodLW
)
Watch
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
lw
.
watchResp
,
nil
}
...
...
pkg/kubelet/kubelet.go
View file @
b6ef62af
...
...
@@ -238,7 +238,7 @@ func NewMainKubelet(
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
kubeClient
.
Services
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
Services
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
}
...
...
@@ -255,7 +255,7 @@ func NewMainKubelet(
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
kubeClient
.
Nodes
()
.
List
(
labels
.
Everything
(),
fieldSelector
)
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
Nodes
()
.
Watch
(
labels
.
Everything
(),
fieldSelector
,
options
)
},
}
...
...
pkg/proxy/config/api_test.go
View file @
b6ef62af
...
...
@@ -21,6 +21,7 @@ import (
"time"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/watch"
...
...
@@ -35,7 +36,7 @@ func (lw fakeLW) List() (runtime.Object, error) {
return
lw
.
listResp
,
nil
}
func
(
lw
fakeLW
)
Watch
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
lw
fakeLW
)
Watch
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
lw
.
watchResp
,
nil
}
...
...
pkg/storage/cacher.go
View file @
b6ef62af
...
...
@@ -26,6 +26,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/conversion"
"k8s.io/kubernetes/pkg/runtime"
...
...
@@ -395,7 +396,7 @@ func (lw *cacherListerWatcher) List() (runtime.Object, error) {
}
// Implements cache.ListerWatcher interface.
func
(
lw
*
cacherListerWatcher
)
Watch
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
lw
*
cacherListerWatcher
)
Watch
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
version
,
err
:=
ParseWatchResourceVersion
(
options
.
ResourceVersion
,
lw
.
resourcePrefix
)
if
err
!=
nil
{
return
nil
,
err
...
...
pkg/storage/watch_cache_test.go
View file @
b6ef62af
...
...
@@ -250,11 +250,11 @@ func TestWaitUntilFreshAndList(t *testing.T) {
type
testLW
struct
{
ListFunc
func
()
(
runtime
.
Object
,
error
)
WatchFunc
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
WatchFunc
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
func
(
t
*
testLW
)
List
()
(
runtime
.
Object
,
error
)
{
return
t
.
ListFunc
()
}
func
(
t
*
testLW
)
Watch
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
t
*
testLW
)
Watch
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
t
.
WatchFunc
(
options
)
}
...
...
@@ -269,7 +269,7 @@ func TestReflectorForWatchCache(t *testing.T) {
}
lw
:=
&
testLW
{
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
fw
:=
watch
.
NewFake
()
go
fw
.
Stop
()
return
fw
,
nil
...
...
pkg/volume/util.go
View file @
b6ef62af
...
...
@@ -21,6 +21,7 @@ import (
"time"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
...
...
@@ -111,7 +112,7 @@ func (c *realRecyclerClient) WatchPod(name, namespace, resourceVersion string, s
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
c
.
client
.
Pods
(
namespace
)
.
List
(
labels
.
Everything
(),
fieldSelector
)
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Pods
(
namespace
)
.
Watch
(
labels
.
Everything
(),
fieldSelector
,
options
)
},
}
...
...
plugin/pkg/admission/limitranger/admission.go
View file @
b6ef62af
...
...
@@ -26,6 +26,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
...
...
@@ -102,7 +103,7 @@ func NewLimitRanger(client client.Interface, limitFunc LimitFunc) admission.Inte
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
client
.
LimitRanges
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
client
.
LimitRanges
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
}
...
...
plugin/pkg/admission/namespace/autoprovision/admission.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
...
...
@@ -87,7 +88,7 @@ func NewProvision(c client.Interface) admission.Interface {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
c
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
plugin/pkg/admission/namespace/exists/admission.go
View file @
b6ef62af
...
...
@@ -24,6 +24,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
...
...
@@ -94,7 +95,7 @@ func NewExists(c client.Interface) admission.Interface {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
c
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
plugin/pkg/admission/namespace/lifecycle/admission.go
View file @
b6ef62af
...
...
@@ -25,6 +25,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
...
...
@@ -111,7 +112,7 @@ func NewLifecycle(c client.Interface) admission.Interface {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
c
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
plugin/pkg/admission/resourcequota/admission.go
View file @
b6ef62af
...
...
@@ -25,6 +25,7 @@ import (
"k8s.io/kubernetes/pkg/admission"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
resourcequotacontroller
"k8s.io/kubernetes/pkg/controller/resourcequota"
...
...
@@ -53,7 +54,7 @@ func NewResourceQuota(client client.Interface) admission.Interface {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
client
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
client
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
}
...
...
plugin/pkg/admission/serviceaccount/admission.go
View file @
b6ef62af
...
...
@@ -25,6 +25,7 @@ import (
"k8s.io/kubernetes/pkg/admission"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/controller/serviceaccount"
...
...
@@ -85,7 +86,7 @@ func NewServiceAccount(cl client.Interface) *serviceAccount {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
cl
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
cl
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -99,7 +100,7 @@ func NewServiceAccount(cl client.Interface) *serviceAccount {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
cl
.
Secrets
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
tokenSelector
)
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
cl
.
Secrets
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
tokenSelector
,
options
)
},
},
...
...
test/e2e/daemon_restart.go
View file @
b6ef62af
...
...
@@ -22,6 +22,7 @@ import (
"time"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
controllerframework
"k8s.io/kubernetes/pkg/controller/framework"
...
...
@@ -222,7 +223,7 @@ var _ = Describe("DaemonRestart", func() {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
framework
.
Client
.
Pods
(
ns
)
.
List
(
labelSelector
,
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
framework
.
Client
.
Pods
(
ns
)
.
Watch
(
labelSelector
,
fields
.
Everything
(),
options
)
},
},
...
...
test/e2e/density.go
View file @
b6ef62af
...
...
@@ -198,7 +198,7 @@ var _ = Describe("Density [Skipped]", func() {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
c
.
Events
(
ns
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Events
(
ns
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
@@ -281,7 +281,7 @@ var _ = Describe("Density [Skipped]", func() {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
c
.
Pods
(
ns
)
.
List
(
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
}),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Pods
(
ns
)
.
Watch
(
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
}),
fields
.
Everything
(),
options
)
},
},
...
...
test/e2e/framework.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ 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"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -178,7 +179,7 @@ func (f *Framework) WaitForAnEndpoint(serviceName string) error {
w
,
err
:=
f
.
Client
.
Endpoints
(
f
.
Namespace
.
Name
)
.
Watch
(
labels
.
Everything
(),
fields
.
Set
{
"metadata.name"
:
serviceName
}
.
AsSelector
(),
api
.
ListOptions
{
ResourceVersion
:
rv
},
unversioned
.
ListOptions
{
ResourceVersion
:
rv
},
)
if
err
!=
nil
{
return
err
...
...
test/e2e/latency.go
View file @
b6ef62af
...
...
@@ -25,7 +25,7 @@ import (
"time"
"k8s.io/kubernetes/pkg/api"
unversioned
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/controller/framework"
...
...
@@ -146,7 +146,7 @@ func runLatencyTest(nodeCount int, c *client.Client, ns string) {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
c
.
Pods
(
ns
)
.
List
(
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
}),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Pods
(
ns
)
.
Watch
(
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
}),
fields
.
Everything
(),
options
)
},
},
...
...
test/e2e/pods.go
View file @
b6ef62af
...
...
@@ -30,6 +30,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/unversioned"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/kubelet"
...
...
@@ -306,7 +307,7 @@ var _ = Describe("Pods", func() {
Expect
(
len
(
pods
.
Items
))
.
To
(
Equal
(
0
))
w
,
err
:=
podClient
.
Watch
(
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"time"
:
value
})),
fields
.
Everything
(),
api
.
ListOptions
{
ResourceVersion
:
pods
.
ListMeta
.
ResourceVersion
})
unversioned
.
ListOptions
{
ResourceVersion
:
pods
.
ListMeta
.
ResourceVersion
})
if
err
!=
nil
{
Failf
(
"Failed to set up watch: %v"
,
err
)
}
...
...
test/e2e/service_latency.go
View file @
b6ef62af
...
...
@@ -23,6 +23,7 @@ import (
"time"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/controller/framework"
"k8s.io/kubernetes/pkg/fields"
...
...
@@ -281,7 +282,7 @@ func startEndpointWatcher(f *Framework, q *endpointQueries) {
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
f
.
Client
.
Endpoints
(
f
.
Namespace
.
Name
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
f
.
Client
.
Endpoints
(
f
.
Namespace
.
Name
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
},
},
...
...
test/e2e/util.go
View file @
b6ef62af
...
...
@@ -160,7 +160,7 @@ func newPodStore(c *client.Client, namespace string, label labels.Selector, fiel
ListFunc
:
func
()
(
runtime
.
Object
,
error
)
{
return
c
.
Pods
(
namespace
)
.
List
(
label
,
field
)
},
WatchFunc
:
func
(
options
api
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Pods
(
namespace
)
.
Watch
(
label
,
field
,
options
)
},
}
...
...
test/integration/client_test.go
View file @
b6ef62af
...
...
@@ -29,6 +29,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -247,7 +248,7 @@ func TestMultiWatch(t *testing.T) {
w
,
err
:=
client
.
Pods
(
ns
)
.
Watch
(
labels
.
Set
{
"watchlabel"
:
name
}
.
AsSelector
(),
fields
.
Everything
(),
api
.
ListOptions
{
ResourceVersion
:
rv
},
unversioned
.
ListOptions
{
ResourceVersion
:
rv
},
)
if
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"watch error for %v: %v"
,
name
,
err
))
...
...
test/integration/persistent_volumes_test.go
View file @
b6ef62af
...
...
@@ -25,6 +25,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/resource"
"k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/unversioned"
client
"k8s.io/kubernetes/pkg/client/unversioned"
persistentvolumecontroller
"k8s.io/kubernetes/pkg/controller/persistentvolume"
"k8s.io/kubernetes/pkg/fields"
...
...
@@ -74,7 +75,7 @@ func TestPersistentVolumeRecycler(t *testing.T) {
},
}
w
,
_
:=
testClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
w
,
_
:=
testClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
defer
w
.
Stop
()
_
,
_
=
testClient
.
PersistentVolumes
()
.
Create
(
pv
)
...
...
@@ -100,7 +101,7 @@ func TestPersistentVolumeRecycler(t *testing.T) {
// change the reclamation policy of the PV for the next test
pv
.
Spec
.
PersistentVolumeReclaimPolicy
=
api
.
PersistentVolumeReclaimDelete
w
,
_
=
testClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
api
.
ListOptions
{})
w
,
_
=
testClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
defer
w
.
Stop
()
_
,
_
=
testClient
.
PersistentVolumes
()
.
Create
(
pv
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment