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
d2dfc912
Commit
d2dfc912
authored
Nov 26, 2015
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify Watch() signature in clients.
parent
ea14d1c3
Hide whitespace changes
Inline
Side-by-side
Showing
77 changed files
with
172 additions
and
183 deletions
+172
-183
endpoints_controller.go
contrib/mesos/pkg/service/endpoints_controller.go
+2
-2
daemon_sets.go
pkg/client/unversioned/daemon_sets.go
+2
-4
deployment.go
pkg/client/unversioned/deployment.go
+2
-4
deployment_test.go
pkg/client/unversioned/deployment_test.go
+1
-1
endpoints.go
pkg/client/unversioned/endpoints.go
+2
-4
events.go
pkg/client/unversioned/events.go
+2
-4
horizontalpodautoscaler.go
pkg/client/unversioned/horizontalpodautoscaler.go
+2
-4
horizontalpodautoscaler_test.go
pkg/client/unversioned/horizontalpodautoscaler_test.go
+1
-1
ingress.go
pkg/client/unversioned/ingress.go
+2
-4
jobs.go
pkg/client/unversioned/jobs.go
+2
-4
limit_ranges.go
pkg/client/unversioned/limit_ranges.go
+2
-4
limit_ranges_test.go
pkg/client/unversioned/limit_ranges_test.go
+1
-1
namespaces.go
pkg/client/unversioned/namespaces.go
+2
-4
namespaces_test.go
pkg/client/unversioned/namespaces_test.go
+1
-1
nodes.go
pkg/client/unversioned/nodes.go
+2
-4
persistentvolume_test.go
pkg/client/unversioned/persistentvolume_test.go
+1
-1
persistentvolumeclaim.go
pkg/client/unversioned/persistentvolumeclaim.go
+2
-4
persistentvolumeclaim_test.go
pkg/client/unversioned/persistentvolumeclaim_test.go
+1
-1
persistentvolumes.go
pkg/client/unversioned/persistentvolumes.go
+2
-4
pod_templates.go
pkg/client/unversioned/pod_templates.go
+2
-4
pod_templates_test.go
pkg/client/unversioned/pod_templates_test.go
+1
-1
pods.go
pkg/client/unversioned/pods.go
+2
-4
replication_controllers.go
pkg/client/unversioned/replication_controllers.go
+2
-4
resource_quotas.go
pkg/client/unversioned/resource_quotas.go
+2
-4
resource_quotas_test.go
pkg/client/unversioned/resource_quotas_test.go
+1
-1
secrets.go
pkg/client/unversioned/secrets.go
+2
-4
service_accounts.go
pkg/client/unversioned/service_accounts.go
+2
-4
services.go
pkg/client/unversioned/services.go
+2
-4
actions.go
pkg/client/unversioned/testclient/actions.go
+20
-4
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
-2
fake_endpoints.go
pkg/client/unversioned/testclient/fake_endpoints.go
+2
-2
fake_events.go
pkg/client/unversioned/testclient/fake_events.go
+3
-3
fake_horizontal_pod_autoscalers.go
...unversioned/testclient/fake_horizontal_pod_autoscalers.go
+2
-2
fake_ingress.go
pkg/client/unversioned/testclient/fake_ingress.go
+2
-2
fake_jobs.go
pkg/client/unversioned/testclient/fake_jobs.go
+2
-2
fake_limit_ranges.go
pkg/client/unversioned/testclient/fake_limit_ranges.go
+2
-2
fake_namespaces.go
pkg/client/unversioned/testclient/fake_namespaces.go
+2
-2
fake_nodes.go
pkg/client/unversioned/testclient/fake_nodes.go
+2
-2
fake_persistent_volume_claims.go
...t/unversioned/testclient/fake_persistent_volume_claims.go
+2
-2
fake_persistent_volumes.go
pkg/client/unversioned/testclient/fake_persistent_volumes.go
+2
-2
fake_pod_templates.go
pkg/client/unversioned/testclient/fake_pod_templates.go
+2
-2
fake_pods.go
pkg/client/unversioned/testclient/fake_pods.go
+2
-2
fake_replication_controllers.go
...nt/unversioned/testclient/fake_replication_controllers.go
+2
-2
fake_resource_quotas.go
pkg/client/unversioned/testclient/fake_resource_quotas.go
+2
-2
fake_secrets.go
pkg/client/unversioned/testclient/fake_secrets.go
+2
-2
fake_service_accounts.go
pkg/client/unversioned/testclient/fake_service_accounts.go
+2
-2
fake_services.go
pkg/client/unversioned/testclient/fake_services.go
+2
-2
controller.go
pkg/controller/daemon/controller.go
+3
-3
endpoints_controller.go
pkg/controller/endpoint/endpoints_controller.go
+2
-2
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
+2
-2
persistentvolume_recycler_controller.go
.../persistentvolume/persistentvolume_recycler_controller.go
+1
-1
replication_controller.go
pkg/controller/replication/replication_controller.go
+2
-2
serviceaccounts_controller.go
pkg/controller/serviceaccount/serviceaccounts_controller.go
+3
-2
tokens_controller.go
pkg/controller/serviceaccount/tokens_controller.go
+3
-2
kubelet.go
pkg/kubelet/kubelet.go
+3
-2
util.go
pkg/volume/util.go
+2
-1
admission.go
plugin/pkg/admission/limitranger/admission.go
+1
-1
admission.go
plugin/pkg/admission/namespace/autoprovision/admission.go
+1
-1
admission.go
plugin/pkg/admission/namespace/exists/admission.go
+1
-1
admission.go
plugin/pkg/admission/namespace/lifecycle/admission.go
+1
-1
admission.go
plugin/pkg/admission/resourcequota/admission.go
+1
-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
+3
-2
framework.go
test/e2e/framework.go
+5
-5
latency.go
test/e2e/latency.go
+2
-1
pods.go
test/e2e/pods.go
+5
-3
service_latency.go
test/e2e/service_latency.go
+1
-1
util.go
test/e2e/util.go
+3
-1
client_test.go
test/integration/client_test.go
+5
-5
persistent_volumes_test.go
test/integration/persistent_volumes_test.go
+2
-4
No files found.
contrib/mesos/pkg/service/endpoints_controller.go
View file @
d2dfc912
...
@@ -63,7 +63,7 @@ func NewEndpointController(client *client.Client) *endpointController {
...
@@ -63,7 +63,7 @@ func NewEndpointController(client *client.Client) *endpointController {
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Service
{},
&
api
.
Service
{},
...
@@ -83,7 +83,7 @@ func NewEndpointController(client *client.Client) *endpointController {
...
@@ -83,7 +83,7 @@ func NewEndpointController(client *client.Client) *endpointController {
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
...
pkg/client/unversioned/daemon_sets.go
View file @
d2dfc912
...
@@ -37,7 +37,7 @@ type DaemonSetInterface interface {
...
@@ -37,7 +37,7 @@ type DaemonSetInterface interface {
Update
(
ctrl
*
extensions
.
DaemonSet
)
(
*
extensions
.
DaemonSet
,
error
)
Update
(
ctrl
*
extensions
.
DaemonSet
)
(
*
extensions
.
DaemonSet
,
error
)
UpdateStatus
(
ctrl
*
extensions
.
DaemonSet
)
(
*
extensions
.
DaemonSet
,
error
)
UpdateStatus
(
ctrl
*
extensions
.
DaemonSet
)
(
*
extensions
.
DaemonSet
,
error
)
Delete
(
name
string
)
error
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// daemonSets implements DaemonsSetsNamespacer interface
// daemonSets implements DaemonsSetsNamespacer interface
...
@@ -93,13 +93,11 @@ func (c *daemonSets) Delete(name string) error {
...
@@ -93,13 +93,11 @@ func (c *daemonSets) Delete(name string) error {
}
}
// Watch returns a watch.Interface that watches the requested daemon sets.
// Watch returns a watch.Interface that watches the requested daemon sets.
func
(
c
*
daemonSets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
daemonSets
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"daemonsets"
)
.
Resource
(
"daemonsets"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/deployment.go
View file @
d2dfc912
...
@@ -38,7 +38,7 @@ type DeploymentInterface interface {
...
@@ -38,7 +38,7 @@ type DeploymentInterface interface {
Create
(
*
extensions
.
Deployment
)
(
*
extensions
.
Deployment
,
error
)
Create
(
*
extensions
.
Deployment
)
(
*
extensions
.
Deployment
,
error
)
Update
(
*
extensions
.
Deployment
)
(
*
extensions
.
Deployment
,
error
)
Update
(
*
extensions
.
Deployment
)
(
*
extensions
.
Deployment
,
error
)
UpdateStatus
(
*
extensions
.
Deployment
)
(
*
extensions
.
Deployment
,
error
)
UpdateStatus
(
*
extensions
.
Deployment
)
(
*
extensions
.
Deployment
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// deployments implements DeploymentInterface
// deployments implements DeploymentInterface
...
@@ -102,13 +102,11 @@ func (c *deployments) UpdateStatus(deployment *extensions.Deployment) (result *e
...
@@ -102,13 +102,11 @@ func (c *deployments) UpdateStatus(deployment *extensions.Deployment) (result *e
}
}
// Watch returns a watch.Interface that watches the requested deployments.
// Watch returns a watch.Interface that watches the requested deployments.
func
(
c
*
deployments
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
deployments
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Get
()
.
return
c
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"deployments"
)
.
Resource
(
"deployments"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/deployment_test.go
View file @
d2dfc912
...
@@ -169,6 +169,6 @@ func TestDeploymentWatch(t *testing.T) {
...
@@ -169,6 +169,6 @@ func TestDeploymentWatch(t *testing.T) {
},
},
Response
:
Response
{
StatusCode
:
200
},
Response
:
Response
{
StatusCode
:
200
},
}
}
_
,
err
:=
c
.
Setup
(
t
)
.
Deployments
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
Deployments
(
api
.
NamespaceAll
)
.
Watch
(
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
c
.
Validate
(
t
,
nil
,
err
)
}
}
pkg/client/unversioned/endpoints.go
View file @
d2dfc912
...
@@ -38,7 +38,7 @@ type EndpointsInterface interface {
...
@@ -38,7 +38,7 @@ type EndpointsInterface interface {
Get
(
name
string
)
(
*
api
.
Endpoints
,
error
)
Get
(
name
string
)
(
*
api
.
Endpoints
,
error
)
Delete
(
name
string
)
error
Delete
(
name
string
)
error
Update
(
endpoints
*
api
.
Endpoints
)
(
*
api
.
Endpoints
,
error
)
Update
(
endpoints
*
api
.
Endpoints
)
(
*
api
.
Endpoints
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// endpoints implements EndpointsInterface
// endpoints implements EndpointsInterface
...
@@ -85,14 +85,12 @@ func (c *endpoints) Delete(name string) error {
...
@@ -85,14 +85,12 @@ func (c *endpoints) Delete(name string) error {
}
}
// Watch returns a watch.Interface that watches the requested endpoints for a service.
// Watch returns a watch.Interface that watches the requested endpoints for a service.
func
(
c
*
endpoints
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
endpoints
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"endpoints"
)
.
Resource
(
"endpoints"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
...
...
pkg/client/unversioned/events.go
View file @
d2dfc912
...
@@ -39,7 +39,7 @@ type EventInterface interface {
...
@@ -39,7 +39,7 @@ type EventInterface interface {
Patch
(
event
*
api
.
Event
,
data
[]
byte
)
(
*
api
.
Event
,
error
)
Patch
(
event
*
api
.
Event
,
data
[]
byte
)
(
*
api
.
Event
,
error
)
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
EventList
,
error
)
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
EventList
,
error
)
Get
(
name
string
)
(
*
api
.
Event
,
error
)
Get
(
name
string
)
(
*
api
.
Event
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
// Search finds events about the specified object
// Search finds events about the specified object
Search
(
objOrRef
runtime
.
Object
)
(
*
api
.
EventList
,
error
)
Search
(
objOrRef
runtime
.
Object
)
(
*
api
.
EventList
,
error
)
Delete
(
name
string
)
error
Delete
(
name
string
)
error
...
@@ -142,14 +142,12 @@ func (e *events) Get(name string) (*api.Event, error) {
...
@@ -142,14 +142,12 @@ func (e *events) Get(name string) (*api.Event, error) {
}
}
// Watch starts watching for events matching the given selectors.
// Watch starts watching for events matching the given selectors.
func
(
e
*
events
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
e
*
events
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Get
()
.
return
e
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
NamespaceIfScoped
(
e
.
namespace
,
len
(
e
.
namespace
)
>
0
)
.
NamespaceIfScoped
(
e
.
namespace
,
len
(
e
.
namespace
)
>
0
)
.
Resource
(
"events"
)
.
Resource
(
"events"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
...
...
pkg/client/unversioned/horizontalpodautoscaler.go
View file @
d2dfc912
...
@@ -38,7 +38,7 @@ type HorizontalPodAutoscalerInterface interface {
...
@@ -38,7 +38,7 @@ type HorizontalPodAutoscalerInterface interface {
Create
(
horizontalPodAutoscaler
*
extensions
.
HorizontalPodAutoscaler
)
(
*
extensions
.
HorizontalPodAutoscaler
,
error
)
Create
(
horizontalPodAutoscaler
*
extensions
.
HorizontalPodAutoscaler
)
(
*
extensions
.
HorizontalPodAutoscaler
,
error
)
Update
(
horizontalPodAutoscaler
*
extensions
.
HorizontalPodAutoscaler
)
(
*
extensions
.
HorizontalPodAutoscaler
,
error
)
Update
(
horizontalPodAutoscaler
*
extensions
.
HorizontalPodAutoscaler
)
(
*
extensions
.
HorizontalPodAutoscaler
,
error
)
UpdateStatus
(
horizontalPodAutoscaler
*
extensions
.
HorizontalPodAutoscaler
)
(
*
extensions
.
HorizontalPodAutoscaler
,
error
)
UpdateStatus
(
horizontalPodAutoscaler
*
extensions
.
HorizontalPodAutoscaler
)
(
*
extensions
.
HorizontalPodAutoscaler
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// horizontalPodAutoscalers implements HorizontalPodAutoscalersNamespacer interface
// horizontalPodAutoscalers implements HorizontalPodAutoscalersNamespacer interface
...
@@ -104,13 +104,11 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *extensi
...
@@ -104,13 +104,11 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *extensi
}
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func
(
c
*
horizontalPodAutoscalers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
horizontalPodAutoscalers
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Get
()
.
return
c
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"horizontalPodAutoscalers"
)
.
Resource
(
"horizontalPodAutoscalers"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/horizontalpodautoscaler_test.go
View file @
d2dfc912
...
@@ -156,6 +156,6 @@ func TestHorizontalPodAutoscalerWatch(t *testing.T) {
...
@@ -156,6 +156,6 @@ func TestHorizontalPodAutoscalerWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
Response
:
Response
{
StatusCode
:
200
},
}
}
_
,
err
:=
c
.
Setup
(
t
)
.
Extensions
()
.
HorizontalPodAutoscalers
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
Extensions
()
.
HorizontalPodAutoscalers
(
api
.
NamespaceAll
)
.
Watch
(
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
c
.
Validate
(
t
,
nil
,
err
)
}
}
pkg/client/unversioned/ingress.go
View file @
d2dfc912
...
@@ -37,7 +37,7 @@ type IngressInterface interface {
...
@@ -37,7 +37,7 @@ type IngressInterface interface {
Create
(
ingress
*
extensions
.
Ingress
)
(
*
extensions
.
Ingress
,
error
)
Create
(
ingress
*
extensions
.
Ingress
)
(
*
extensions
.
Ingress
,
error
)
Update
(
ingress
*
extensions
.
Ingress
)
(
*
extensions
.
Ingress
,
error
)
Update
(
ingress
*
extensions
.
Ingress
)
(
*
extensions
.
Ingress
,
error
)
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
UpdateStatus
(
ingress
*
extensions
.
Ingress
)
(
*
extensions
.
Ingress
,
error
)
UpdateStatus
(
ingress
*
extensions
.
Ingress
)
(
*
extensions
.
Ingress
,
error
)
}
}
...
@@ -94,14 +94,12 @@ func (c *ingress) Delete(name string, options *api.DeleteOptions) (err error) {
...
@@ -94,14 +94,12 @@ func (c *ingress) Delete(name string, options *api.DeleteOptions) (err error) {
}
}
// Watch returns a watch.Interface that watches the requested ingress.
// Watch returns a watch.Interface that watches the requested ingress.
func
(
c
*
ingress
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
ingress
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"ingresses"
)
.
Resource
(
"ingresses"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
...
...
pkg/client/unversioned/jobs.go
View file @
d2dfc912
...
@@ -38,7 +38,7 @@ type JobInterface interface {
...
@@ -38,7 +38,7 @@ type JobInterface interface {
Create
(
job
*
extensions
.
Job
)
(
*
extensions
.
Job
,
error
)
Create
(
job
*
extensions
.
Job
)
(
*
extensions
.
Job
,
error
)
Update
(
job
*
extensions
.
Job
)
(
*
extensions
.
Job
,
error
)
Update
(
job
*
extensions
.
Job
)
(
*
extensions
.
Job
,
error
)
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
UpdateStatus
(
job
*
extensions
.
Job
)
(
*
extensions
.
Job
,
error
)
UpdateStatus
(
job
*
extensions
.
Job
)
(
*
extensions
.
Job
,
error
)
}
}
...
@@ -98,14 +98,12 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) (err error) {
...
@@ -98,14 +98,12 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) (err error) {
}
}
// Watch returns a watch.Interface that watches the requested jobs.
// Watch returns a watch.Interface that watches the requested jobs.
func
(
c
*
jobs
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
jobs
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"jobs"
)
.
Resource
(
"jobs"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
...
...
pkg/client/unversioned/limit_ranges.go
View file @
d2dfc912
...
@@ -38,7 +38,7 @@ type LimitRangeInterface interface {
...
@@ -38,7 +38,7 @@ type LimitRangeInterface interface {
Delete
(
name
string
)
error
Delete
(
name
string
)
error
Create
(
limitRange
*
api
.
LimitRange
)
(
*
api
.
LimitRange
,
error
)
Create
(
limitRange
*
api
.
LimitRange
)
(
*
api
.
LimitRange
,
error
)
Update
(
limitRange
*
api
.
LimitRange
)
(
*
api
.
LimitRange
,
error
)
Update
(
limitRange
*
api
.
LimitRange
)
(
*
api
.
LimitRange
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// limitRanges implements LimitRangesNamespacer interface
// limitRanges implements LimitRangesNamespacer interface
...
@@ -93,13 +93,11 @@ func (c *limitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange
...
@@ -93,13 +93,11 @@ func (c *limitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange
}
}
// Watch returns a watch.Interface that watches the requested resource
// Watch returns a watch.Interface that watches the requested resource
func
(
c
*
limitRanges
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
limitRanges
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"limitRanges"
)
.
Resource
(
"limitRanges"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/limit_ranges_test.go
View file @
d2dfc912
...
@@ -208,6 +208,6 @@ func TestLimitRangeWatch(t *testing.T) {
...
@@ -208,6 +208,6 @@ func TestLimitRangeWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
Response
:
Response
{
StatusCode
:
200
},
}
}
_
,
err
:=
c
.
Setup
(
t
)
.
LimitRanges
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
LimitRanges
(
api
.
NamespaceAll
)
.
Watch
(
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
c
.
Validate
(
t
,
nil
,
err
)
}
}
pkg/client/unversioned/namespaces.go
View file @
d2dfc912
...
@@ -36,7 +36,7 @@ type NamespaceInterface interface {
...
@@ -36,7 +36,7 @@ type NamespaceInterface interface {
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
NamespaceList
,
error
)
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
NamespaceList
,
error
)
Delete
(
name
string
)
error
Delete
(
name
string
)
error
Update
(
item
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
Update
(
item
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Finalize
(
item
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
Finalize
(
item
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
Status
(
item
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
Status
(
item
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
}
}
...
@@ -115,12 +115,10 @@ func (c *namespaces) Delete(name string) error {
...
@@ -115,12 +115,10 @@ func (c *namespaces) Delete(name string) error {
}
}
// Watch returns a watch.Interface that watches the requested namespaces.
// Watch returns a watch.Interface that watches the requested namespaces.
func
(
c
*
namespaces
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
namespaces
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Resource
(
"namespaces"
)
.
Resource
(
"namespaces"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/namespaces_test.go
View file @
d2dfc912
...
@@ -175,6 +175,6 @@ func TestNamespaceWatch(t *testing.T) {
...
@@ -175,6 +175,6 @@ func TestNamespaceWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
Response
:
Response
{
StatusCode
:
200
},
}
}
_
,
err
:=
c
.
Setup
(
t
)
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
Namespaces
()
.
Watch
(
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
c
.
Validate
(
t
,
nil
,
err
)
}
}
pkg/client/unversioned/nodes.go
View file @
d2dfc912
...
@@ -37,7 +37,7 @@ type NodeInterface interface {
...
@@ -37,7 +37,7 @@ type NodeInterface interface {
Delete
(
name
string
)
error
Delete
(
name
string
)
error
Update
(
*
api
.
Node
)
(
*
api
.
Node
,
error
)
Update
(
*
api
.
Node
)
(
*
api
.
Node
,
error
)
UpdateStatus
(
*
api
.
Node
)
(
*
api
.
Node
,
error
)
UpdateStatus
(
*
api
.
Node
)
(
*
api
.
Node
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// nodes implements NodesInterface
// nodes implements NodesInterface
...
@@ -103,13 +103,11 @@ func (c *nodes) UpdateStatus(node *api.Node) (*api.Node, error) {
...
@@ -103,13 +103,11 @@ func (c *nodes) UpdateStatus(node *api.Node) (*api.Node, error) {
}
}
// Watch returns a watch.Interface that watches the requested nodes.
// Watch returns a watch.Interface that watches the requested nodes.
func
(
c
*
nodes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
nodes
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
api
.
NamespaceAll
)
.
Namespace
(
api
.
NamespaceAll
)
.
Resource
(
c
.
resourceName
())
.
Resource
(
c
.
resourceName
())
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/persistentvolume_test.go
View file @
d2dfc912
...
@@ -181,6 +181,6 @@ func TestPersistentVolumeWatch(t *testing.T) {
...
@@ -181,6 +181,6 @@ func TestPersistentVolumeWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
Response
:
Response
{
StatusCode
:
200
},
}
}
_
,
err
:=
c
.
Setup
(
t
)
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
PersistentVolumes
()
.
Watch
(
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
c
.
Validate
(
t
,
nil
,
err
)
}
}
pkg/client/unversioned/persistentvolumeclaim.go
View file @
d2dfc912
...
@@ -39,7 +39,7 @@ type PersistentVolumeClaimInterface interface {
...
@@ -39,7 +39,7 @@ type PersistentVolumeClaimInterface interface {
Update
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
Update
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
UpdateStatus
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
UpdateStatus
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
Delete
(
name
string
)
error
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// persistentVolumeClaims implements PersistentVolumeClaimsNamespacer interface
// persistentVolumeClaims implements PersistentVolumeClaimsNamespacer interface
...
@@ -99,13 +99,11 @@ func (c *persistentVolumeClaims) Delete(name string) error {
...
@@ -99,13 +99,11 @@ func (c *persistentVolumeClaims) Delete(name string) error {
return
c
.
client
.
Delete
()
.
Namespace
(
c
.
namespace
)
.
Resource
(
"persistentVolumeClaims"
)
.
Name
(
name
)
.
Do
()
.
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
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
persistentVolumeClaims
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Get
()
.
return
c
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
namespace
)
.
Namespace
(
c
.
namespace
)
.
Resource
(
"persistentVolumeClaims"
)
.
Resource
(
"persistentVolumeClaims"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/persistentvolumeclaim_test.go
View file @
d2dfc912
...
@@ -198,6 +198,6 @@ func TestPersistentVolumeClaimWatch(t *testing.T) {
...
@@ -198,6 +198,6 @@ func TestPersistentVolumeClaimWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
Response
:
Response
{
StatusCode
:
200
},
}
}
_
,
err
:=
c
.
Setup
(
t
)
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
Watch
(
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
c
.
Validate
(
t
,
nil
,
err
)
}
}
pkg/client/unversioned/persistentvolumes.go
View file @
d2dfc912
...
@@ -38,7 +38,7 @@ type PersistentVolumeInterface interface {
...
@@ -38,7 +38,7 @@ type PersistentVolumeInterface interface {
Update
(
volume
*
api
.
PersistentVolume
)
(
*
api
.
PersistentVolume
,
error
)
Update
(
volume
*
api
.
PersistentVolume
)
(
*
api
.
PersistentVolume
,
error
)
UpdateStatus
(
persistentVolume
*
api
.
PersistentVolume
)
(
*
api
.
PersistentVolume
,
error
)
UpdateStatus
(
persistentVolume
*
api
.
PersistentVolume
)
(
*
api
.
PersistentVolume
,
error
)
Delete
(
name
string
)
error
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// persistentVolumes implements PersistentVolumesInterface
// persistentVolumes implements PersistentVolumesInterface
...
@@ -94,12 +94,10 @@ func (c *persistentVolumes) Delete(name string) error {
...
@@ -94,12 +94,10 @@ func (c *persistentVolumes) Delete(name string) error {
return
c
.
client
.
Delete
()
.
Resource
(
"persistentVolumes"
)
.
Name
(
name
)
.
Do
()
.
Error
()
return
c
.
client
.
Delete
()
.
Resource
(
"persistentVolumes"
)
.
Name
(
name
)
.
Do
()
.
Error
()
}
}
func
(
c
*
persistentVolumes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
persistentVolumes
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Get
()
.
return
c
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Resource
(
"persistentVolumes"
)
.
Resource
(
"persistentVolumes"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/pod_templates.go
View file @
d2dfc912
...
@@ -36,7 +36,7 @@ type PodTemplateInterface interface {
...
@@ -36,7 +36,7 @@ type PodTemplateInterface interface {
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Create
(
podTemplate
*
api
.
PodTemplate
)
(
*
api
.
PodTemplate
,
error
)
Create
(
podTemplate
*
api
.
PodTemplate
)
(
*
api
.
PodTemplate
,
error
)
Update
(
podTemplate
*
api
.
PodTemplate
)
(
*
api
.
PodTemplate
,
error
)
Update
(
podTemplate
*
api
.
PodTemplate
)
(
*
api
.
PodTemplate
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// podTemplates implements PodTemplatesNamespacer interface
// podTemplates implements PodTemplatesNamespacer interface
...
@@ -95,13 +95,11 @@ func (c *podTemplates) Update(podTemplate *api.PodTemplate) (result *api.PodTemp
...
@@ -95,13 +95,11 @@ func (c *podTemplates) Update(podTemplate *api.PodTemplate) (result *api.PodTemp
}
}
// Watch returns a watch.Interface that watches the requested podTemplates.
// Watch returns a watch.Interface that watches the requested podTemplates.
func
(
c
*
podTemplates
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
podTemplates
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"podTemplates"
)
.
Resource
(
"podTemplates"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/pod_templates_test.go
View file @
d2dfc912
...
@@ -138,6 +138,6 @@ func TestPodTemplateWatch(t *testing.T) {
...
@@ -138,6 +138,6 @@ func TestPodTemplateWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
Response
:
Response
{
StatusCode
:
200
},
}
}
_
,
err
:=
c
.
Setup
(
t
)
.
PodTemplates
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
PodTemplates
(
api
.
NamespaceAll
)
.
Watch
(
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
c
.
Validate
(
t
,
nil
,
err
)
}
}
pkg/client/unversioned/pods.go
View file @
d2dfc912
...
@@ -36,7 +36,7 @@ type PodInterface interface {
...
@@ -36,7 +36,7 @@ type PodInterface interface {
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Delete
(
name
string
,
options
*
api
.
DeleteOptions
)
error
Create
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
Create
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
Update
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
Update
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Bind
(
binding
*
api
.
Binding
)
error
Bind
(
binding
*
api
.
Binding
)
error
UpdateStatus
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
UpdateStatus
(
pod
*
api
.
Pod
)
(
*
api
.
Pod
,
error
)
GetLogs
(
name
string
,
opts
*
api
.
PodLogOptions
)
*
Request
GetLogs
(
name
string
,
opts
*
api
.
PodLogOptions
)
*
Request
...
@@ -98,14 +98,12 @@ func (c *pods) Update(pod *api.Pod) (result *api.Pod, err error) {
...
@@ -98,14 +98,12 @@ func (c *pods) Update(pod *api.Pod) (result *api.Pod, err error) {
}
}
// Watch returns a watch.Interface that watches the requested pods.
// Watch returns a watch.Interface that watches the requested pods.
func
(
c
*
pods
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
pods
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"pods"
)
.
Resource
(
"pods"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
...
...
pkg/client/unversioned/replication_controllers.go
View file @
d2dfc912
...
@@ -37,7 +37,7 @@ type ReplicationControllerInterface interface {
...
@@ -37,7 +37,7 @@ type ReplicationControllerInterface interface {
Update
(
ctrl
*
api
.
ReplicationController
)
(
*
api
.
ReplicationController
,
error
)
Update
(
ctrl
*
api
.
ReplicationController
)
(
*
api
.
ReplicationController
,
error
)
UpdateStatus
(
ctrl
*
api
.
ReplicationController
)
(
*
api
.
ReplicationController
,
error
)
UpdateStatus
(
ctrl
*
api
.
ReplicationController
)
(
*
api
.
ReplicationController
,
error
)
Delete
(
name
string
)
error
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// replicationControllers implements ReplicationControllersNamespacer interface
// replicationControllers implements ReplicationControllersNamespacer interface
...
@@ -92,13 +92,11 @@ func (c *replicationControllers) Delete(name string) error {
...
@@ -92,13 +92,11 @@ func (c *replicationControllers) Delete(name string) error {
}
}
// Watch returns a watch.Interface that watches the requested controllers.
// Watch returns a watch.Interface that watches the requested controllers.
func
(
c
*
replicationControllers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
replicationControllers
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"replicationControllers"
)
.
Resource
(
"replicationControllers"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/resource_quotas.go
View file @
d2dfc912
...
@@ -37,7 +37,7 @@ type ResourceQuotaInterface interface {
...
@@ -37,7 +37,7 @@ type ResourceQuotaInterface interface {
Create
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
Create
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
Update
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
Update
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
UpdateStatus
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
UpdateStatus
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// resourceQuotas implements ResourceQuotasNamespacer interface
// resourceQuotas implements ResourceQuotasNamespacer interface
...
@@ -95,13 +95,11 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (result
...
@@ -95,13 +95,11 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (result
}
}
// Watch returns a watch.Interface that watches the requested resource
// Watch returns a watch.Interface that watches the requested resource
func
(
c
*
resourceQuotas
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
resourceQuotas
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"resourceQuotas"
)
.
Resource
(
"resourceQuotas"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
pkg/client/unversioned/resource_quotas_test.go
View file @
d2dfc912
...
@@ -194,6 +194,6 @@ func TestResourceQuotaWatch(t *testing.T) {
...
@@ -194,6 +194,6 @@ func TestResourceQuotaWatch(t *testing.T) {
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Query
:
url
.
Values
{
"resourceVersion"
:
[]
string
{}}},
Response
:
Response
{
StatusCode
:
200
},
Response
:
Response
{
StatusCode
:
200
},
}
}
_
,
err
:=
c
.
Setup
(
t
)
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
_
,
err
:=
c
.
Setup
(
t
)
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
Watch
(
unversioned
.
ListOptions
{})
c
.
Validate
(
t
,
nil
,
err
)
c
.
Validate
(
t
,
nil
,
err
)
}
}
pkg/client/unversioned/secrets.go
View file @
d2dfc912
...
@@ -34,7 +34,7 @@ type SecretsInterface interface {
...
@@ -34,7 +34,7 @@ type SecretsInterface interface {
Delete
(
name
string
)
error
Delete
(
name
string
)
error
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
SecretList
,
error
)
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
SecretList
,
error
)
Get
(
name
string
)
(
*
api
.
Secret
,
error
)
Get
(
name
string
)
(
*
api
.
Secret
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// events implements Secrets interface
// events implements Secrets interface
...
@@ -92,14 +92,12 @@ func (s *secrets) Get(name string) (*api.Secret, error) {
...
@@ -92,14 +92,12 @@ func (s *secrets) Get(name string) (*api.Secret, error) {
}
}
// Watch starts watching for secrets matching the given selectors.
// Watch starts watching for secrets matching the given selectors.
func
(
s
*
secrets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
s
*
secrets
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
s
.
client
.
Get
()
.
return
s
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
s
.
namespace
)
.
Namespace
(
s
.
namespace
)
.
Resource
(
"secrets"
)
.
Resource
(
"secrets"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
...
...
pkg/client/unversioned/service_accounts.go
View file @
d2dfc912
...
@@ -34,7 +34,7 @@ type ServiceAccountsInterface interface {
...
@@ -34,7 +34,7 @@ type ServiceAccountsInterface interface {
Delete
(
name
string
)
error
Delete
(
name
string
)
error
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
ServiceAccountList
,
error
)
List
(
label
labels
.
Selector
,
field
fields
.
Selector
)
(
*
api
.
ServiceAccountList
,
error
)
Get
(
name
string
)
(
*
api
.
ServiceAccount
,
error
)
Get
(
name
string
)
(
*
api
.
ServiceAccount
,
error
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
}
}
// serviceAccounts implements ServiceAccounts interface
// serviceAccounts implements ServiceAccounts interface
...
@@ -92,14 +92,12 @@ func (s *serviceAccounts) Get(name string) (*api.ServiceAccount, error) {
...
@@ -92,14 +92,12 @@ func (s *serviceAccounts) Get(name string) (*api.ServiceAccount, error) {
}
}
// Watch starts watching for serviceAccounts matching the given selectors.
// Watch starts watching for serviceAccounts matching the given selectors.
func
(
s
*
serviceAccounts
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
s
*
serviceAccounts
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
s
.
client
.
Get
()
.
return
s
.
client
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
s
.
namespace
)
.
Namespace
(
s
.
namespace
)
.
Resource
(
"serviceAccounts"
)
.
Resource
(
"serviceAccounts"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
...
...
pkg/client/unversioned/services.go
View file @
d2dfc912
...
@@ -37,7 +37,7 @@ type ServiceInterface interface {
...
@@ -37,7 +37,7 @@ type ServiceInterface interface {
Create
(
srv
*
api
.
Service
)
(
*
api
.
Service
,
error
)
Create
(
srv
*
api
.
Service
)
(
*
api
.
Service
,
error
)
Update
(
srv
*
api
.
Service
)
(
*
api
.
Service
,
error
)
Update
(
srv
*
api
.
Service
)
(
*
api
.
Service
,
error
)
Delete
(
name
string
)
error
Delete
(
name
string
)
error
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
ProxyGet
(
scheme
,
name
,
port
,
path
string
,
params
map
[
string
]
string
)
ResponseWrapper
ProxyGet
(
scheme
,
name
,
port
,
path
string
,
params
map
[
string
]
string
)
ResponseWrapper
}
}
...
@@ -92,14 +92,12 @@ func (c *services) Delete(name string) error {
...
@@ -92,14 +92,12 @@ func (c *services) Delete(name string) error {
}
}
// Watch returns a watch.Interface that watches the requested services.
// Watch returns a watch.Interface that watches the requested services.
func
(
c
*
services
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
services
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
r
.
Get
()
.
return
c
.
r
.
Get
()
.
Prefix
(
"watch"
)
.
Prefix
(
"watch"
)
.
Namespace
(
c
.
ns
)
.
Namespace
(
c
.
ns
)
.
Resource
(
"services"
)
.
Resource
(
"services"
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
VersionedParams
(
&
opts
,
api
.
Scheme
)
.
LabelsSelectorParam
(
label
)
.
FieldsSelectorParam
(
field
)
.
Watch
()
Watch
()
}
}
...
...
pkg/client/unversioned/testclient/actions.go
View file @
d2dfc912
...
@@ -150,21 +150,37 @@ func NewDeleteAction(resource, namespace, name string) DeleteActionImpl {
...
@@ -150,21 +150,37 @@ func NewDeleteAction(resource, namespace, name string) DeleteActionImpl {
return
action
return
action
}
}
func
NewRootWatchAction
(
resource
string
,
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
WatchActionImpl
{
func
NewRootWatchAction
(
resource
string
,
opts
unversioned
.
ListOptions
)
WatchActionImpl
{
action
:=
WatchActionImpl
{}
action
:=
WatchActionImpl
{}
action
.
Verb
=
"watch"
action
.
Verb
=
"watch"
action
.
Resource
=
resource
action
.
Resource
=
resource
action
.
WatchRestrictions
=
WatchRestrictions
{
label
,
field
,
opts
.
ResourceVersion
}
labelSelector
:=
opts
.
LabelSelector
.
Selector
if
labelSelector
==
nil
{
labelSelector
=
labels
.
Everything
()
}
fieldSelector
:=
opts
.
FieldSelector
.
Selector
if
fieldSelector
==
nil
{
fieldSelector
=
fields
.
Everything
()
}
action
.
WatchRestrictions
=
WatchRestrictions
{
labelSelector
,
fieldSelector
,
opts
.
ResourceVersion
}
return
action
return
action
}
}
func
NewWatchAction
(
resource
,
namespace
string
,
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
WatchActionImpl
{
func
NewWatchAction
(
resource
,
namespace
string
,
opts
unversioned
.
ListOptions
)
WatchActionImpl
{
action
:=
WatchActionImpl
{}
action
:=
WatchActionImpl
{}
action
.
Verb
=
"watch"
action
.
Verb
=
"watch"
action
.
Resource
=
resource
action
.
Resource
=
resource
action
.
Namespace
=
namespace
action
.
Namespace
=
namespace
action
.
WatchRestrictions
=
WatchRestrictions
{
label
,
field
,
opts
.
ResourceVersion
}
labelSelector
:=
opts
.
LabelSelector
.
Selector
if
labelSelector
==
nil
{
labelSelector
=
labels
.
Everything
()
}
fieldSelector
:=
opts
.
FieldSelector
.
Selector
if
fieldSelector
==
nil
{
fieldSelector
=
fields
.
Everything
()
}
action
.
WatchRestrictions
=
WatchRestrictions
{
labelSelector
,
fieldSelector
,
opts
.
ResourceVersion
}
return
action
return
action
}
}
...
...
pkg/client/unversioned/testclient/fake_daemon_sets.go
View file @
d2dfc912
...
@@ -80,6 +80,6 @@ func (c *FakeDaemonSets) Delete(name string) error {
...
@@ -80,6 +80,6 @@ func (c *FakeDaemonSets) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeDaemonSets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeDaemonSets
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"daemonsets"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"daemonsets"
,
c
.
Namespace
,
opts
))
}
}
pkg/client/unversioned/testclient/fake_deployments.go
View file @
d2dfc912
...
@@ -87,6 +87,6 @@ func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error
...
@@ -87,6 +87,6 @@ func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error
return
err
return
err
}
}
func
(
c
*
FakeDeployments
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeDeployments
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"deployments"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"deployments"
,
c
.
Namespace
,
opts
))
}
}
pkg/client/unversioned/testclient/fake_endpoints.go
View file @
d2dfc912
...
@@ -72,6 +72,6 @@ func (c *FakeEndpoints) Delete(name string) error {
...
@@ -72,6 +72,6 @@ func (c *FakeEndpoints) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeEndpoints
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeEndpoints
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"endpoints"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"endpoints"
,
c
.
Namespace
,
opts
))
}
}
pkg/client/unversioned/testclient/fake_events.go
View file @
d2dfc912
...
@@ -112,10 +112,10 @@ func (c *FakeEvents) Delete(name string) error {
...
@@ -112,10 +112,10 @@ func (c *FakeEvents) Delete(name string) error {
}
}
// Watch starts watching for events matching the given selectors.
// Watch starts watching for events matching the given selectors.
func
(
c
*
FakeEvents
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeEvents
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
action
:=
NewRootWatchAction
(
"events"
,
label
,
field
,
opts
)
action
:=
NewRootWatchAction
(
"events"
,
opts
)
if
c
.
Namespace
!=
""
{
if
c
.
Namespace
!=
""
{
action
=
NewWatchAction
(
"events"
,
c
.
Namespace
,
label
,
field
,
opts
)
action
=
NewWatchAction
(
"events"
,
c
.
Namespace
,
opts
)
}
}
return
c
.
Fake
.
InvokesWatch
(
action
)
return
c
.
Fake
.
InvokesWatch
(
action
)
}
}
...
...
pkg/client/unversioned/testclient/fake_horizontal_pod_autoscalers.go
View file @
d2dfc912
...
@@ -86,6 +86,6 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOp
...
@@ -86,6 +86,6 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOp
return
err
return
err
}
}
func
(
c
*
FakeHorizontalPodAutoscalers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeHorizontalPodAutoscalers
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"horizontalpodautoscalers"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"horizontalpodautoscalers"
,
c
.
Namespace
,
opts
))
}
}
pkg/client/unversioned/testclient/fake_ingress.go
View file @
d2dfc912
...
@@ -73,8 +73,8 @@ func (c *FakeIngress) Delete(name string, options *api.DeleteOptions) error {
...
@@ -73,8 +73,8 @@ func (c *FakeIngress) Delete(name string, options *api.DeleteOptions) error {
return
err
return
err
}
}
func
(
c
*
FakeIngress
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeIngress
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"ingresses"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"ingresses"
,
c
.
Namespace
,
opts
))
}
}
func
(
c
*
FakeIngress
)
UpdateStatus
(
ingress
*
extensions
.
Ingress
)
(
result
*
extensions
.
Ingress
,
err
error
)
{
func
(
c
*
FakeIngress
)
UpdateStatus
(
ingress
*
extensions
.
Ingress
)
(
result
*
extensions
.
Ingress
,
err
error
)
{
...
...
pkg/client/unversioned/testclient/fake_jobs.go
View file @
d2dfc912
...
@@ -73,8 +73,8 @@ func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
...
@@ -73,8 +73,8 @@ func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
return
err
return
err
}
}
func
(
c
*
FakeJobs
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeJobs
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"jobs"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"jobs"
,
c
.
Namespace
,
opts
))
}
}
func
(
c
*
FakeJobs
)
UpdateStatus
(
job
*
extensions
.
Job
)
(
result
*
extensions
.
Job
,
err
error
)
{
func
(
c
*
FakeJobs
)
UpdateStatus
(
job
*
extensions
.
Job
)
(
result
*
extensions
.
Job
,
err
error
)
{
...
...
pkg/client/unversioned/testclient/fake_limit_ranges.go
View file @
d2dfc912
...
@@ -72,6 +72,6 @@ func (c *FakeLimitRanges) Delete(name string) error {
...
@@ -72,6 +72,6 @@ func (c *FakeLimitRanges) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeLimitRanges
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeLimitRanges
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"limitranges"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"limitranges"
,
c
.
Namespace
,
opts
))
}
}
pkg/client/unversioned/testclient/fake_namespaces.go
View file @
d2dfc912
...
@@ -71,8 +71,8 @@ func (c *FakeNamespaces) Delete(name string) error {
...
@@ -71,8 +71,8 @@ func (c *FakeNamespaces) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeNamespaces
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeNamespaces
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewRootWatchAction
(
"namespaces"
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewRootWatchAction
(
"namespaces"
,
opts
))
}
}
func
(
c
*
FakeNamespaces
)
Finalize
(
namespace
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
{
func
(
c
*
FakeNamespaces
)
Finalize
(
namespace
*
api
.
Namespace
)
(
*
api
.
Namespace
,
error
)
{
...
...
pkg/client/unversioned/testclient/fake_nodes.go
View file @
d2dfc912
...
@@ -71,8 +71,8 @@ func (c *FakeNodes) Delete(name string) error {
...
@@ -71,8 +71,8 @@ func (c *FakeNodes) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeNodes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeNodes
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewRootWatchAction
(
"nodes"
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewRootWatchAction
(
"nodes"
,
opts
))
}
}
func
(
c
*
FakeNodes
)
UpdateStatus
(
node
*
api
.
Node
)
(
*
api
.
Node
,
error
)
{
func
(
c
*
FakeNodes
)
UpdateStatus
(
node
*
api
.
Node
)
(
*
api
.
Node
,
error
)
{
...
...
pkg/client/unversioned/testclient/fake_persistent_volume_claims.go
View file @
d2dfc912
...
@@ -70,8 +70,8 @@ func (c *FakePersistentVolumeClaims) Delete(name string) error {
...
@@ -70,8 +70,8 @@ func (c *FakePersistentVolumeClaims) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakePersistentVolumeClaims
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakePersistentVolumeClaims
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"persistentvolumeclaims"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"persistentvolumeclaims"
,
c
.
Namespace
,
opts
))
}
}
func
(
c
*
FakePersistentVolumeClaims
)
UpdateStatus
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
{
func
(
c
*
FakePersistentVolumeClaims
)
UpdateStatus
(
claim
*
api
.
PersistentVolumeClaim
)
(
*
api
.
PersistentVolumeClaim
,
error
)
{
...
...
pkg/client/unversioned/testclient/fake_persistent_volumes.go
View file @
d2dfc912
...
@@ -69,8 +69,8 @@ func (c *FakePersistentVolumes) Delete(name string) error {
...
@@ -69,8 +69,8 @@ func (c *FakePersistentVolumes) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakePersistentVolumes
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakePersistentVolumes
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewRootWatchAction
(
"persistentvolumes"
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewRootWatchAction
(
"persistentvolumes"
,
opts
))
}
}
func
(
c
*
FakePersistentVolumes
)
UpdateStatus
(
pv
*
api
.
PersistentVolume
)
(
*
api
.
PersistentVolume
,
error
)
{
func
(
c
*
FakePersistentVolumes
)
UpdateStatus
(
pv
*
api
.
PersistentVolume
)
(
*
api
.
PersistentVolume
,
error
)
{
...
...
pkg/client/unversioned/testclient/fake_pod_templates.go
View file @
d2dfc912
...
@@ -72,6 +72,6 @@ func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error
...
@@ -72,6 +72,6 @@ func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error
return
err
return
err
}
}
func
(
c
*
FakePodTemplates
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakePodTemplates
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"podtemplates"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"podtemplates"
,
c
.
Namespace
,
opts
))
}
}
pkg/client/unversioned/testclient/fake_pods.go
View file @
d2dfc912
...
@@ -78,8 +78,8 @@ func (c *FakePods) Delete(name string, options *api.DeleteOptions) error {
...
@@ -78,8 +78,8 @@ func (c *FakePods) Delete(name string, options *api.DeleteOptions) error {
return
err
return
err
}
}
func
(
c
*
FakePods
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakePods
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"pods"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"pods"
,
c
.
Namespace
,
opts
))
}
}
func
(
c
*
FakePods
)
Bind
(
binding
*
api
.
Binding
)
error
{
func
(
c
*
FakePods
)
Bind
(
binding
*
api
.
Binding
)
error
{
...
...
pkg/client/unversioned/testclient/fake_replication_controllers.go
View file @
d2dfc912
...
@@ -80,6 +80,6 @@ func (c *FakeReplicationControllers) Delete(name string) error {
...
@@ -80,6 +80,6 @@ func (c *FakeReplicationControllers) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeReplicationControllers
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeReplicationControllers
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"replicationcontrollers"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"replicationcontrollers"
,
c
.
Namespace
,
opts
))
}
}
pkg/client/unversioned/testclient/fake_resource_quotas.go
View file @
d2dfc912
...
@@ -72,8 +72,8 @@ func (c *FakeResourceQuotas) Delete(name string) error {
...
@@ -72,8 +72,8 @@ func (c *FakeResourceQuotas) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeResourceQuotas
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeResourceQuotas
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"resourcequotas"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"resourcequotas"
,
c
.
Namespace
,
opts
))
}
}
func
(
c
*
FakeResourceQuotas
)
UpdateStatus
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
{
func
(
c
*
FakeResourceQuotas
)
UpdateStatus
(
resourceQuota
*
api
.
ResourceQuota
)
(
*
api
.
ResourceQuota
,
error
)
{
...
...
pkg/client/unversioned/testclient/fake_secrets.go
View file @
d2dfc912
...
@@ -72,6 +72,6 @@ func (c *FakeSecrets) Delete(name string) error {
...
@@ -72,6 +72,6 @@ func (c *FakeSecrets) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeSecrets
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeSecrets
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"secrets"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"secrets"
,
c
.
Namespace
,
opts
))
}
}
pkg/client/unversioned/testclient/fake_service_accounts.go
View file @
d2dfc912
...
@@ -72,6 +72,6 @@ func (c *FakeServiceAccounts) Delete(name string) error {
...
@@ -72,6 +72,6 @@ func (c *FakeServiceAccounts) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeServiceAccounts
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeServiceAccounts
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"serviceaccounts"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"serviceaccounts"
,
c
.
Namespace
,
opts
))
}
}
pkg/client/unversioned/testclient/fake_services.go
View file @
d2dfc912
...
@@ -73,8 +73,8 @@ func (c *FakeServices) Delete(name string) error {
...
@@ -73,8 +73,8 @@ func (c *FakeServices) Delete(name string) error {
return
err
return
err
}
}
func
(
c
*
FakeServices
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
c
*
FakeServices
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"services"
,
c
.
Namespace
,
label
,
field
,
opts
))
return
c
.
Fake
.
InvokesWatch
(
NewWatchAction
(
"services"
,
c
.
Namespace
,
opts
))
}
}
func
(
c
*
FakeServices
)
ProxyGet
(
scheme
,
name
,
port
,
path
string
,
params
map
[
string
]
string
)
client
.
ResponseWrapper
{
func
(
c
*
FakeServices
)
ProxyGet
(
scheme
,
name
,
port
,
path
string
,
params
map
[
string
]
string
)
client
.
ResponseWrapper
{
...
...
pkg/controller/daemon/controller.go
View file @
d2dfc912
...
@@ -101,7 +101,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
...
@@ -101,7 +101,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
return
dsc
.
kubeClient
.
Extensions
()
.
DaemonSets
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
dsc
.
kubeClient
.
Extensions
()
.
DaemonSets
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
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
)
return
dsc
.
kubeClient
.
Extensions
()
.
DaemonSets
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
extensions
.
DaemonSet
{},
&
extensions
.
DaemonSet
{},
...
@@ -133,7 +133,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
...
@@ -133,7 +133,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
return
dsc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
dsc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
dsc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
dsc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
@@ -151,7 +151,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
...
@@ -151,7 +151,7 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle
return
dsc
.
kubeClient
.
Nodes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
dsc
.
kubeClient
.
Nodes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
dsc
.
kubeClient
.
Nodes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
dsc
.
kubeClient
.
Nodes
()
.
Watch
(
options
)
},
},
},
},
&
api
.
Node
{},
&
api
.
Node
{},
...
...
pkg/controller/endpoint/endpoints_controller.go
View file @
d2dfc912
...
@@ -67,7 +67,7 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync
...
@@ -67,7 +67,7 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
e
.
client
.
Services
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Service
{},
&
api
.
Service
{},
...
@@ -88,7 +88,7 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync
...
@@ -88,7 +88,7 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
e
.
client
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
...
pkg/controller/gc/gc_controller.go
View file @
d2dfc912
...
@@ -70,7 +70,8 @@ func New(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc,
...
@@ -70,7 +70,8 @@ func New(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc,
return
gcc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
terminatedSelector
)
return
gcc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
terminatedSelector
)
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
gcc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
terminatedSelector
,
options
)
options
.
FieldSelector
.
Selector
=
terminatedSelector
return
gcc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
...
pkg/controller/job/controller.go
View file @
d2dfc912
...
@@ -89,7 +89,7 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn
...
@@ -89,7 +89,7 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn
return
jm
.
kubeClient
.
Extensions
()
.
Jobs
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
jm
.
kubeClient
.
Extensions
()
.
Jobs
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
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
)
return
jm
.
kubeClient
.
Extensions
()
.
Jobs
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
extensions
.
Job
{},
&
extensions
.
Job
{},
...
@@ -112,7 +112,7 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn
...
@@ -112,7 +112,7 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn
return
jm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
jm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
jm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
jm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
...
pkg/controller/namespace/namespace_controller.go
View file @
d2dfc912
...
@@ -51,7 +51,7 @@ func NewNamespaceController(kubeClient client.Interface, versions *unversioned.A
...
@@ -51,7 +51,7 @@ func NewNamespaceController(kubeClient client.Interface, versions *unversioned.A
return
kubeClient
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
kubeClient
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
kubeClient
.
Namespaces
()
.
Watch
(
options
)
},
},
},
},
&
api
.
Namespace
{},
&
api
.
Namespace
{},
...
...
pkg/controller/node/nodecontroller.go
View file @
d2dfc912
...
@@ -167,7 +167,7 @@ func NewNodeController(
...
@@ -167,7 +167,7 @@ func NewNodeController(
return
nc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
nc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
nc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
nc
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
@@ -183,7 +183,7 @@ func NewNodeController(
...
@@ -183,7 +183,7 @@ func NewNodeController(
return
nc
.
kubeClient
.
Nodes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
nc
.
kubeClient
.
Nodes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
nc
.
kubeClient
.
Nodes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
nc
.
kubeClient
.
Nodes
()
.
Watch
(
options
)
},
},
},
},
&
api
.
Node
{},
&
api
.
Node
{},
...
...
pkg/controller/node/nodecontroller_test.go
View file @
d2dfc912
...
@@ -136,7 +136,7 @@ func (m *FakeNodeHandler) UpdateStatus(node *api.Node) (*api.Node, error) {
...
@@ -136,7 +136,7 @@ func (m *FakeNodeHandler) UpdateStatus(node *api.Node) (*api.Node, error) {
return
node
,
nil
return
node
,
nil
}
}
func
(
m
*
FakeNodeHandler
)
Watch
(
label
labels
.
Selector
,
field
fields
.
Selector
,
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
func
(
m
*
FakeNodeHandler
)
Watch
(
opts
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
nil
,
nil
return
nil
,
nil
}
}
...
...
pkg/controller/persistentvolume/persistentvolume_claim_binder_controller.go
View file @
d2dfc912
...
@@ -61,7 +61,7 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time
...
@@ -61,7 +61,7 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time
return
kubeClient
.
PersistentVolumes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
kubeClient
.
PersistentVolumes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
kubeClient
.
PersistentVolumes
()
.
Watch
(
options
)
},
},
},
},
&
api
.
PersistentVolume
{},
&
api
.
PersistentVolume
{},
...
@@ -79,7 +79,7 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time
...
@@ -79,7 +79,7 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time
return
kubeClient
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
kubeClient
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
kubeClient
.
PersistentVolumeClaims
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
PersistentVolumeClaim
{},
&
api
.
PersistentVolumeClaim
{},
...
...
pkg/controller/persistentvolume/persistentvolume_recycler_controller.go
View file @
d2dfc912
...
@@ -68,7 +68,7 @@ func NewPersistentVolumeRecycler(kubeClient client.Interface, syncPeriod time.Du
...
@@ -68,7 +68,7 @@ func NewPersistentVolumeRecycler(kubeClient client.Interface, syncPeriod time.Du
return
kubeClient
.
PersistentVolumes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
kubeClient
.
PersistentVolumes
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
kubeClient
.
PersistentVolumes
()
.
Watch
(
options
)
},
},
},
},
&
api
.
PersistentVolume
{},
&
api
.
PersistentVolume
{},
...
...
pkg/controller/replication/replication_controller.go
View file @
d2dfc912
...
@@ -112,7 +112,7 @@ func NewReplicationManager(kubeClient client.Interface, resyncPeriod controller.
...
@@ -112,7 +112,7 @@ func NewReplicationManager(kubeClient client.Interface, resyncPeriod controller.
return
rm
.
kubeClient
.
ReplicationControllers
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
rm
.
kubeClient
.
ReplicationControllers
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
rm
.
kubeClient
.
ReplicationControllers
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
rm
.
kubeClient
.
ReplicationControllers
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
ReplicationController
{},
&
api
.
ReplicationController
{},
...
@@ -153,7 +153,7 @@ func NewReplicationManager(kubeClient client.Interface, resyncPeriod controller.
...
@@ -153,7 +153,7 @@ func NewReplicationManager(kubeClient client.Interface, resyncPeriod controller.
return
rm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
rm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
rm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
rm
.
kubeClient
.
Pods
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
...
pkg/controller/serviceaccount/serviceaccounts_controller.go
View file @
d2dfc912
...
@@ -82,7 +82,8 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo
...
@@ -82,7 +82,8 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
accountSelector
)
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
accountSelector
)
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
accountSelector
,
options
)
options
.
FieldSelector
.
Selector
=
accountSelector
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
ServiceAccount
{},
&
api
.
ServiceAccount
{},
...
@@ -99,7 +100,7 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo
...
@@ -99,7 +100,7 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo
return
e
.
client
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
e
.
client
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
e
.
client
.
Namespaces
()
.
Watch
(
options
)
},
},
},
},
&
api
.
Namespace
{},
&
api
.
Namespace
{},
...
...
pkg/controller/serviceaccount/tokens_controller.go
View file @
d2dfc912
...
@@ -67,7 +67,7 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) *
...
@@ -67,7 +67,7 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) *
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
e
.
client
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
ServiceAccount
{},
&
api
.
ServiceAccount
{},
...
@@ -87,7 +87,8 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) *
...
@@ -87,7 +87,8 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) *
return
e
.
client
.
Secrets
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
tokenSelector
)
return
e
.
client
.
Secrets
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
tokenSelector
)
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
e
.
client
.
Secrets
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
tokenSelector
,
options
)
options
.
FieldSelector
.
Selector
=
tokenSelector
return
e
.
client
.
Secrets
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Secret
{},
&
api
.
Secret
{},
...
...
pkg/kubelet/kubelet.go
View file @
d2dfc912
...
@@ -240,7 +240,7 @@ func NewMainKubelet(
...
@@ -240,7 +240,7 @@ func NewMainKubelet(
return
kubeClient
.
Services
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
kubeClient
.
Services
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
Services
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
kubeClient
.
Services
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
}
}
cache
.
NewReflector
(
listWatch
,
&
api
.
Service
{},
serviceStore
,
0
)
.
Run
()
cache
.
NewReflector
(
listWatch
,
&
api
.
Service
{},
serviceStore
,
0
)
.
Run
()
...
@@ -257,7 +257,8 @@ func NewMainKubelet(
...
@@ -257,7 +257,8 @@ func NewMainKubelet(
return
kubeClient
.
Nodes
()
.
List
(
labels
.
Everything
(),
fieldSelector
)
return
kubeClient
.
Nodes
()
.
List
(
labels
.
Everything
(),
fieldSelector
)
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
kubeClient
.
Nodes
()
.
Watch
(
labels
.
Everything
(),
fieldSelector
,
options
)
options
.
FieldSelector
.
Selector
=
fieldSelector
return
kubeClient
.
Nodes
()
.
Watch
(
options
)
},
},
}
}
cache
.
NewReflector
(
listWatch
,
&
api
.
Node
{},
nodeStore
,
0
)
.
Run
()
cache
.
NewReflector
(
listWatch
,
&
api
.
Node
{},
nodeStore
,
0
)
.
Run
()
...
...
pkg/volume/util.go
View file @
d2dfc912
...
@@ -113,7 +113,8 @@ func (c *realRecyclerClient) WatchPod(name, namespace, resourceVersion string, s
...
@@ -113,7 +113,8 @@ func (c *realRecyclerClient) WatchPod(name, namespace, resourceVersion string, s
return
c
.
client
.
Pods
(
namespace
)
.
List
(
labels
.
Everything
(),
fieldSelector
)
return
c
.
client
.
Pods
(
namespace
)
.
List
(
labels
.
Everything
(),
fieldSelector
)
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
client
.
Pods
(
namespace
)
.
Watch
(
labels
.
Everything
(),
fieldSelector
,
options
)
options
.
FieldSelector
.
Selector
=
fieldSelector
return
c
.
client
.
Pods
(
namespace
)
.
Watch
(
options
)
},
},
}
}
queue
:=
cache
.
NewFIFO
(
cache
.
MetaNamespaceKeyFunc
)
queue
:=
cache
.
NewFIFO
(
cache
.
MetaNamespaceKeyFunc
)
...
...
plugin/pkg/admission/limitranger/admission.go
View file @
d2dfc912
...
@@ -104,7 +104,7 @@ func NewLimitRanger(client client.Interface, limitFunc LimitFunc) admission.Inte
...
@@ -104,7 +104,7 @@ func NewLimitRanger(client client.Interface, limitFunc LimitFunc) admission.Inte
return
client
.
LimitRanges
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
client
.
LimitRanges
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
client
.
LimitRanges
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
client
.
LimitRanges
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
}
}
indexer
,
reflector
:=
cache
.
NewNamespaceKeyedIndexerAndReflector
(
lw
,
&
api
.
LimitRange
{},
0
)
indexer
,
reflector
:=
cache
.
NewNamespaceKeyedIndexerAndReflector
(
lw
,
&
api
.
LimitRange
{},
0
)
...
...
plugin/pkg/admission/namespace/autoprovision/admission.go
View file @
d2dfc912
...
@@ -89,7 +89,7 @@ func NewProvision(c client.Interface) admission.Interface {
...
@@ -89,7 +89,7 @@ func NewProvision(c client.Interface) admission.Interface {
return
c
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
c
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
c
.
Namespaces
()
.
Watch
(
options
)
},
},
},
},
&
api
.
Namespace
{},
&
api
.
Namespace
{},
...
...
plugin/pkg/admission/namespace/exists/admission.go
View file @
d2dfc912
...
@@ -96,7 +96,7 @@ func NewExists(c client.Interface) admission.Interface {
...
@@ -96,7 +96,7 @@ func NewExists(c client.Interface) admission.Interface {
return
c
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
c
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
c
.
Namespaces
()
.
Watch
(
options
)
},
},
},
},
&
api
.
Namespace
{},
&
api
.
Namespace
{},
...
...
plugin/pkg/admission/namespace/lifecycle/admission.go
View file @
d2dfc912
...
@@ -113,7 +113,7 @@ func NewLifecycle(c client.Interface) admission.Interface {
...
@@ -113,7 +113,7 @@ func NewLifecycle(c client.Interface) admission.Interface {
return
c
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
c
.
Namespaces
()
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Namespaces
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
c
.
Namespaces
()
.
Watch
(
options
)
},
},
},
},
&
api
.
Namespace
{},
&
api
.
Namespace
{},
...
...
plugin/pkg/admission/resourcequota/admission.go
View file @
d2dfc912
...
@@ -55,7 +55,7 @@ func NewResourceQuota(client client.Interface) admission.Interface {
...
@@ -55,7 +55,7 @@ func NewResourceQuota(client client.Interface) admission.Interface {
return
client
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
client
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
client
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
client
.
ResourceQuotas
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
}
}
indexer
,
reflector
:=
cache
.
NewNamespaceKeyedIndexerAndReflector
(
lw
,
&
api
.
ResourceQuota
{},
0
)
indexer
,
reflector
:=
cache
.
NewNamespaceKeyedIndexerAndReflector
(
lw
,
&
api
.
ResourceQuota
{},
0
)
...
...
plugin/pkg/admission/serviceaccount/admission.go
View file @
d2dfc912
...
@@ -87,7 +87,7 @@ func NewServiceAccount(cl client.Interface) *serviceAccount {
...
@@ -87,7 +87,7 @@ func NewServiceAccount(cl client.Interface) *serviceAccount {
return
cl
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
cl
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
cl
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
cl
.
ServiceAccounts
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
ServiceAccount
{},
&
api
.
ServiceAccount
{},
...
@@ -101,7 +101,8 @@ func NewServiceAccount(cl client.Interface) *serviceAccount {
...
@@ -101,7 +101,8 @@ func NewServiceAccount(cl client.Interface) *serviceAccount {
return
cl
.
Secrets
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
tokenSelector
)
return
cl
.
Secrets
(
api
.
NamespaceAll
)
.
List
(
labels
.
Everything
(),
tokenSelector
)
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
cl
.
Secrets
(
api
.
NamespaceAll
)
.
Watch
(
labels
.
Everything
(),
tokenSelector
,
options
)
options
.
FieldSelector
.
Selector
=
tokenSelector
return
cl
.
Secrets
(
api
.
NamespaceAll
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Secret
{},
&
api
.
Secret
{},
...
...
test/e2e/daemon_restart.go
View file @
d2dfc912
...
@@ -224,7 +224,8 @@ var _ = Describe("DaemonRestart", func() {
...
@@ -224,7 +224,8 @@ var _ = Describe("DaemonRestart", func() {
return
framework
.
Client
.
Pods
(
ns
)
.
List
(
labelSelector
,
fields
.
Everything
())
return
framework
.
Client
.
Pods
(
ns
)
.
List
(
labelSelector
,
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
framework
.
Client
.
Pods
(
ns
)
.
Watch
(
labelSelector
,
fields
.
Everything
(),
options
)
options
.
LabelSelector
.
Selector
=
labelSelector
return
framework
.
Client
.
Pods
(
ns
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
...
test/e2e/density.go
View file @
d2dfc912
...
@@ -203,7 +203,7 @@ var _ = Describe("Density [Skipped]", func() {
...
@@ -203,7 +203,7 @@ var _ = Describe("Density [Skipped]", func() {
return
c
.
Events
(
ns
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
c
.
Events
(
ns
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Events
(
ns
)
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
options
)
return
c
.
Events
(
ns
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Event
{},
&
api
.
Event
{},
...
@@ -286,7 +286,8 @@ var _ = Describe("Density [Skipped]", func() {
...
@@ -286,7 +286,8 @@ var _ = Describe("Density [Skipped]", func() {
return
c
.
Pods
(
ns
)
.
List
(
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
}),
fields
.
Everything
())
return
c
.
Pods
(
ns
)
.
List
(
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
}),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
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
)
options
.
LabelSelector
.
Selector
=
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
})
return
c
.
Pods
(
ns
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
...
test/e2e/framework.go
View file @
d2dfc912
...
@@ -194,11 +194,11 @@ func (f *Framework) WaitForAnEndpoint(serviceName string) error {
...
@@ -194,11 +194,11 @@ func (f *Framework) WaitForAnEndpoint(serviceName string) error {
}
}
}
}
w
,
err
:=
f
.
Client
.
Endpoints
(
f
.
Namespace
.
Name
)
.
Watch
(
options
:=
unversioned
.
ListOptions
{
labels
.
Everything
()
,
FieldSelector
:
unversioned
.
FieldSelector
{
fields
.
Set
{
"metadata.name"
:
serviceName
}
.
AsSelector
()}
,
fields
.
Set
{
"metadata.name"
:
serviceName
}
.
AsSelector
()
,
ResourceVersion
:
rv
,
unversioned
.
ListOptions
{
ResourceVersion
:
rv
},
}
)
w
,
err
:=
f
.
Client
.
Endpoints
(
f
.
Namespace
.
Name
)
.
Watch
(
options
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
test/e2e/latency.go
View file @
d2dfc912
...
@@ -147,7 +147,8 @@ func runLatencyTest(nodeCount int, c *client.Client, ns string) {
...
@@ -147,7 +147,8 @@ func runLatencyTest(nodeCount int, c *client.Client, ns string) {
return
c
.
Pods
(
ns
)
.
List
(
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
}),
fields
.
Everything
())
return
c
.
Pods
(
ns
)
.
List
(
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
}),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
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
)
options
.
LabelSelector
.
Selector
=
labels
.
SelectorFromSet
(
labels
.
Set
{
"name"
:
additionalPodsPrefix
})
return
c
.
Pods
(
ns
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Pod
{},
&
api
.
Pod
{},
...
...
test/e2e/pods.go
View file @
d2dfc912
...
@@ -305,9 +305,11 @@ var _ = Describe("Pods", func() {
...
@@ -305,9 +305,11 @@ var _ = Describe("Pods", func() {
Failf
(
"Failed to query for pods: %v"
,
err
)
Failf
(
"Failed to query for pods: %v"
,
err
)
}
}
Expect
(
len
(
pods
.
Items
))
.
To
(
Equal
(
0
))
Expect
(
len
(
pods
.
Items
))
.
To
(
Equal
(
0
))
w
,
err
:=
podClient
.
Watch
(
options
:=
unversioned
.
ListOptions
{
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"time"
:
value
})),
fields
.
Everything
(),
LabelSelector
:
unversioned
.
LabelSelector
{
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"time"
:
value
}))},
unversioned
.
ListOptions
{
ResourceVersion
:
pods
.
ListMeta
.
ResourceVersion
})
ResourceVersion
:
pods
.
ListMeta
.
ResourceVersion
,
}
w
,
err
:=
podClient
.
Watch
(
options
)
if
err
!=
nil
{
if
err
!=
nil
{
Failf
(
"Failed to set up watch: %v"
,
err
)
Failf
(
"Failed to set up watch: %v"
,
err
)
}
}
...
...
test/e2e/service_latency.go
View file @
d2dfc912
...
@@ -283,7 +283,7 @@ func startEndpointWatcher(f *Framework, q *endpointQueries) {
...
@@ -283,7 +283,7 @@ func startEndpointWatcher(f *Framework, q *endpointQueries) {
return
f
.
Client
.
Endpoints
(
f
.
Namespace
.
Name
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
return
f
.
Client
.
Endpoints
(
f
.
Namespace
.
Name
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
},
},
WatchFunc
:
func
(
options
unversioned
.
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
)
return
f
.
Client
.
Endpoints
(
f
.
Namespace
.
Name
)
.
Watch
(
options
)
},
},
},
},
&
api
.
Endpoints
{},
&
api
.
Endpoints
{},
...
...
test/e2e/util.go
View file @
d2dfc912
...
@@ -165,7 +165,9 @@ func newPodStore(c *client.Client, namespace string, label labels.Selector, fiel
...
@@ -165,7 +165,9 @@ func newPodStore(c *client.Client, namespace string, label labels.Selector, fiel
return
c
.
Pods
(
namespace
)
.
List
(
label
,
field
)
return
c
.
Pods
(
namespace
)
.
List
(
label
,
field
)
},
},
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
WatchFunc
:
func
(
options
unversioned
.
ListOptions
)
(
watch
.
Interface
,
error
)
{
return
c
.
Pods
(
namespace
)
.
Watch
(
label
,
field
,
options
)
options
.
LabelSelector
.
Selector
=
label
options
.
FieldSelector
.
Selector
=
field
return
c
.
Pods
(
namespace
)
.
Watch
(
options
)
},
},
}
}
store
:=
cache
.
NewStore
(
cache
.
MetaNamespaceKeyFunc
)
store
:=
cache
.
NewStore
(
cache
.
MetaNamespaceKeyFunc
)
...
...
test/integration/client_test.go
View file @
d2dfc912
...
@@ -245,11 +245,11 @@ func TestMultiWatch(t *testing.T) {
...
@@ -245,11 +245,11 @@ func TestMultiWatch(t *testing.T) {
t
.
Fatalf
(
"Couldn't make %v: %v"
,
name
,
err
)
t
.
Fatalf
(
"Couldn't make %v: %v"
,
name
,
err
)
}
}
go
func
(
name
,
rv
string
)
{
go
func
(
name
,
rv
string
)
{
w
,
err
:=
client
.
Pods
(
ns
)
.
Watch
(
options
:=
unversioned
.
ListOptions
{
labels
.
Set
{
"watchlabel"
:
name
}
.
AsSelector
()
,
LabelSelector
:
unversioned
.
LabelSelector
{
labels
.
Set
{
"watchlabel"
:
name
}
.
AsSelector
()}
,
fields
.
Everything
()
,
ResourceVersion
:
rv
,
unversioned
.
ListOptions
{
ResourceVersion
:
rv
},
}
)
w
,
err
:=
client
.
Pods
(
ns
)
.
Watch
(
options
)
if
err
!=
nil
{
if
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"watch error for %v: %v"
,
name
,
err
))
panic
(
fmt
.
Sprintf
(
"watch error for %v: %v"
,
name
,
err
))
}
}
...
...
test/integration/persistent_volumes_test.go
View file @
d2dfc912
...
@@ -31,8 +31,6 @@ import (
...
@@ -31,8 +31,6 @@ import (
client
"k8s.io/kubernetes/pkg/client/unversioned"
client
"k8s.io/kubernetes/pkg/client/unversioned"
persistentvolumecontroller
"k8s.io/kubernetes/pkg/controller/persistentvolume"
persistentvolumecontroller
"k8s.io/kubernetes/pkg/controller/persistentvolume"
"k8s.io/kubernetes/pkg/conversion"
"k8s.io/kubernetes/pkg/conversion"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/volume"
"k8s.io/kubernetes/pkg/volume"
"k8s.io/kubernetes/pkg/watch"
"k8s.io/kubernetes/pkg/watch"
"k8s.io/kubernetes/test/integration/framework"
"k8s.io/kubernetes/test/integration/framework"
...
@@ -78,7 +76,7 @@ func TestPersistentVolumeRecycler(t *testing.T) {
...
@@ -78,7 +76,7 @@ func TestPersistentVolumeRecycler(t *testing.T) {
},
},
}
}
w
,
_
:=
testClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
w
,
_
:=
testClient
.
PersistentVolumes
()
.
Watch
(
unversioned
.
ListOptions
{})
defer
w
.
Stop
()
defer
w
.
Stop
()
_
,
_
=
testClient
.
PersistentVolumes
()
.
Create
(
pv
)
_
,
_
=
testClient
.
PersistentVolumes
()
.
Create
(
pv
)
...
@@ -104,7 +102,7 @@ func TestPersistentVolumeRecycler(t *testing.T) {
...
@@ -104,7 +102,7 @@ func TestPersistentVolumeRecycler(t *testing.T) {
// change the reclamation policy of the PV for the next test
// change the reclamation policy of the PV for the next test
pv
.
Spec
.
PersistentVolumeReclaimPolicy
=
api
.
PersistentVolumeReclaimDelete
pv
.
Spec
.
PersistentVolumeReclaimPolicy
=
api
.
PersistentVolumeReclaimDelete
w
,
_
=
testClient
.
PersistentVolumes
()
.
Watch
(
labels
.
Everything
(),
fields
.
Everything
(),
unversioned
.
ListOptions
{})
w
,
_
=
testClient
.
PersistentVolumes
()
.
Watch
(
unversioned
.
ListOptions
{})
defer
w
.
Stop
()
defer
w
.
Stop
()
_
,
_
=
testClient
.
PersistentVolumes
()
.
Create
(
pv
)
_
,
_
=
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