Commit e5c2d716 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #41887 from liggitt/watch-verb

Automatic merge from submit-queue (batch tested with PRs 39855, 41433, 41567, 41887, 41652) Use watch param instead of deprecated /watch/ prefix Reopen of https://github.com/kubernetes/kubernetes/pull/41722 after reverted in https://github.com/kubernetes/kubernetes/pull/41774 Required https://github.com/kubernetes/kubernetes/pull/41797 to merge first cc @deads2k @wojtek-t
parents bb5fdff5 4202489a
...@@ -322,8 +322,8 @@ func (c *$.type|privatePlural$) UpdateStatus($.type|private$ *$.type|raw$) (resu ...@@ -322,8 +322,8 @@ func (c *$.type|privatePlural$) UpdateStatus($.type|private$ *$.type|raw$) (resu
var watchTemplate = ` var watchTemplate = `
// Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. // Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$.
func (c *$.type|privatePlural$) Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { func (c *$.type|privatePlural$) Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
$if .namespaced$Namespace(c.ns).$end$ $if .namespaced$Namespace(c.ns).$end$
Resource("$.type|allLowercasePlural$"). Resource("$.type|allLowercasePlural$").
VersionedParams(&opts, $.schemeParameterCodec|raw$). VersionedParams(&opts, $.schemeParameterCodec|raw$).
......
...@@ -149,8 +149,8 @@ func (c *testTypes) List(opts v1.ListOptions) (result *testgroup.TestTypeList, e ...@@ -149,8 +149,8 @@ func (c *testTypes) List(opts v1.ListOptions) (result *testgroup.TestTypeList, e
// Watch returns a watch.Interface that watches the requested testTypes. // Watch returns a watch.Interface that watches the requested testTypes.
func (c *testTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *testTypes) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("testtypes"). Resource("testtypes").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.Ho ...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.Ho
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { ...@@ -149,8 +149,8 @@ func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, 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(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("jobs"). Resource("jobs").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, e ...@@ -132,8 +132,8 @@ func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, e
// Watch returns a watch.Interface that watches the requested configMaps. // Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("configmaps"). Resource("configmaps").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error ...@@ -132,8 +132,8 @@ func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error
// Watch returns a watch.Interface that watches the requested events. // Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("events"). Resource("events").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -140,8 +140,8 @@ func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, e ...@@ -140,8 +140,8 @@ func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, e
// Watch returns a watch.Interface that watches the requested namespaces. // Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("namespaces"). Resource("namespaces").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -132,8 +132,8 @@ func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err err ...@@ -132,8 +132,8 @@ func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err err
// Watch returns a watch.Interface that watches the requested secrets. // Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("secrets"). Resource("secrets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err e ...@@ -149,8 +149,8 @@ func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err e
// Watch returns a watch.Interface that watches the requested services. // Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("services"). Resource("services").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e ...@@ -149,8 +149,8 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e
// Watch returns a watch.Interface that watches the requested daemonSets. // Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("daemonsets"). Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, ...@@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList,
// Watch returns a watch.Interface that watches the requested deployments. // Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err ...@@ -149,8 +149,8 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err
// Watch returns a watch.Interface that watches the requested ingresses. // Watch returns a watch.Interface that watches the requested ingresses.
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("ingresses"). Resource("ingresses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, ...@@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList,
// Watch returns a watch.Interface that watches the requested replicaSets. // Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -140,8 +140,8 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, err e ...@@ -140,8 +140,8 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, err e
// Watch returns a watch.Interface that watches the requested clusters. // Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("clusters"). Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscalin ...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscalin
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *jobs) List(opts v1.ListOptions) (result *batch.JobList, err error) { ...@@ -149,8 +149,8 @@ func (c *jobs) List(opts v1.ListOptions) (result *batch.JobList, 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(opts v1.ListOptions) (watch.Interface, error) { func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("jobs"). Resource("jobs").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *configMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err e ...@@ -132,8 +132,8 @@ func (c *configMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err e
// Watch returns a watch.Interface that watches the requested configMaps. // Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("configmaps"). Resource("configmaps").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *events) List(opts v1.ListOptions) (result *api.EventList, err error) { ...@@ -132,8 +132,8 @@ func (c *events) List(opts v1.ListOptions) (result *api.EventList, err error) {
// Watch returns a watch.Interface that watches the requested events. // Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("events"). Resource("events").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -140,8 +140,8 @@ func (c *namespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err e ...@@ -140,8 +140,8 @@ func (c *namespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err e
// Watch returns a watch.Interface that watches the requested namespaces. // Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("namespaces"). Resource("namespaces").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -132,8 +132,8 @@ func (c *secrets) List(opts v1.ListOptions) (result *api.SecretList, err error) ...@@ -132,8 +132,8 @@ func (c *secrets) List(opts v1.ListOptions) (result *api.SecretList, err error)
// Watch returns a watch.Interface that watches the requested secrets. // Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("secrets"). Resource("secrets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *services) List(opts v1.ListOptions) (result *api.ServiceList, err error ...@@ -149,8 +149,8 @@ func (c *services) List(opts v1.ListOptions) (result *api.ServiceList, err 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(opts v1.ListOptions) (watch.Interface, error) { func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("services"). Resource("services").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList ...@@ -149,8 +149,8 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList
// Watch returns a watch.Interface that watches the requested daemonSets. // Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("daemonsets"). Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *extensions.DeploymentLi ...@@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *extensions.DeploymentLi
// Watch returns a watch.Interface that watches the requested deployments. // Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *ingresses) List(opts v1.ListOptions) (result *extensions.IngressList, e ...@@ -149,8 +149,8 @@ func (c *ingresses) List(opts v1.ListOptions) (result *extensions.IngressList, e
// Watch returns a watch.Interface that watches the requested ingresses. // Watch returns a watch.Interface that watches the requested ingresses.
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("ingresses"). Resource("ingresses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetLi ...@@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetLi
// Watch returns a watch.Interface that watches the requested replicaSets. // Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -140,8 +140,8 @@ func (c *clusters) List(opts v1.ListOptions) (result *federation.ClusterList, er ...@@ -140,8 +140,8 @@ func (c *clusters) List(opts v1.ListOptions) (result *federation.ClusterList, er
// Watch returns a watch.Interface that watches the requested clusters. // Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("clusters"). Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -149,8 +149,8 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetLis ...@@ -149,8 +149,8 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetLis
// Watch returns a watch.Interface that watches the requested statefulSets. // Watch returns a watch.Interface that watches the requested statefulSets.
func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("statefulsets"). Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.Ho ...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.Ho
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.H ...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.H
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { ...@@ -149,8 +149,8 @@ func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, 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(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("jobs"). Resource("jobs").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err ...@@ -149,8 +149,8 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err
// Watch returns a watch.Interface that watches the requested cronJobs. // Watch returns a watch.Interface that watches the requested cronJobs.
func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("cronjobs"). Resource("cronjobs").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *jobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, err error) { ...@@ -149,8 +149,8 @@ func (c *jobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, 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(opts v1.ListOptions) (watch.Interface, error) { func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("jobs"). Resource("jobs").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -140,8 +140,8 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1. ...@@ -140,8 +140,8 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.
// Watch returns a watch.Interface that watches the requested certificateSigningRequests. // Watch returns a watch.Interface that watches the requested certificateSigningRequests.
func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("certificatesigningrequests"). Resource("certificatesigningrequests").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -124,8 +124,8 @@ func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.Component ...@@ -124,8 +124,8 @@ func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.Component
// Watch returns a watch.Interface that watches the requested componentStatuses. // Watch returns a watch.Interface that watches the requested componentStatuses.
func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("componentstatuses"). Resource("componentstatuses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -132,8 +132,8 @@ func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, e ...@@ -132,8 +132,8 @@ func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, e
// Watch returns a watch.Interface that watches the requested configMaps. // Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("configmaps"). Resource("configmaps").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, er ...@@ -132,8 +132,8 @@ func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, er
// Watch returns a watch.Interface that watches the requested endpoints. // Watch returns a watch.Interface that watches the requested endpoints.
func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("endpoints"). Resource("endpoints").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error ...@@ -132,8 +132,8 @@ func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error
// Watch returns a watch.Interface that watches the requested events. // Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("events"). Resource("events").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, ...@@ -132,8 +132,8 @@ func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList,
// Watch returns a watch.Interface that watches the requested limitRanges. // Watch returns a watch.Interface that watches the requested limitRanges.
func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("limitranges"). Resource("limitranges").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -140,8 +140,8 @@ func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, e ...@@ -140,8 +140,8 @@ func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, e
// Watch returns a watch.Interface that watches the requested namespaces. // Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("namespaces"). Resource("namespaces").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -140,8 +140,8 @@ func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) ...@@ -140,8 +140,8 @@ func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err 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(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("nodes"). Resource("nodes").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -140,8 +140,8 @@ func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.Persisten ...@@ -140,8 +140,8 @@ func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.Persisten
// Watch returns a watch.Interface that watches the requested persistentVolumes. // Watch returns a watch.Interface that watches the requested persistentVolumes.
func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("persistentvolumes"). Resource("persistentvolumes").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -149,8 +149,8 @@ func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.Pers ...@@ -149,8 +149,8 @@ func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.Pers
// Watch returns a watch.Interface that watches the requested persistentVolumeClaims. // Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("persistentvolumeclaims"). Resource("persistentvolumeclaims").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) { ...@@ -149,8 +149,8 @@ func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, 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(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("pods"). Resource("pods").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateLis ...@@ -132,8 +132,8 @@ func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateLis
// Watch returns a watch.Interface that watches the requested podTemplates. // Watch returns a watch.Interface that watches the requested podTemplates.
func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("podtemplates"). Resource("podtemplates").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.Repl ...@@ -149,8 +149,8 @@ func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.Repl
// Watch returns a watch.Interface that watches the requested replicationControllers. // Watch returns a watch.Interface that watches the requested replicationControllers.
func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("replicationcontrollers"). Resource("replicationcontrollers").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuot ...@@ -149,8 +149,8 @@ func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuot
// Watch returns a watch.Interface that watches the requested resourceQuotas. // Watch returns a watch.Interface that watches the requested resourceQuotas.
func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("resourcequotas"). Resource("resourcequotas").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err err ...@@ -132,8 +132,8 @@ func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err err
// Watch returns a watch.Interface that watches the requested secrets. // Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("secrets"). Resource("secrets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err e ...@@ -149,8 +149,8 @@ func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err e
// Watch returns a watch.Interface that watches the requested services. // Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("services"). Resource("services").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAcco ...@@ -132,8 +132,8 @@ func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAcco
// Watch returns a watch.Interface that watches the requested serviceAccounts. // Watch returns a watch.Interface that watches the requested serviceAccounts.
func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("serviceaccounts"). Resource("serviceaccounts").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e ...@@ -149,8 +149,8 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e
// Watch returns a watch.Interface that watches the requested daemonSets. // Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("daemonsets"). Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, ...@@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList,
// Watch returns a watch.Interface that watches the requested deployments. // Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err ...@@ -149,8 +149,8 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err
// Watch returns a watch.Interface that watches the requested ingresses. // Watch returns a watch.Interface that watches the requested ingresses.
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("ingresses"). Resource("ingresses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -124,8 +124,8 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecu ...@@ -124,8 +124,8 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecu
// Watch returns a watch.Interface that watches the requested podSecurityPolicies. // Watch returns a watch.Interface that watches the requested podSecurityPolicies.
func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("podsecuritypolicies"). Resource("podsecuritypolicies").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, ...@@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList,
// Watch returns a watch.Interface that watches the requested replicaSets. // Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -124,8 +124,8 @@ func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPa ...@@ -124,8 +124,8 @@ func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPa
// Watch returns a watch.Interface that watches the requested thirdPartyResources. // Watch returns a watch.Interface that watches the requested thirdPartyResources.
func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("thirdpartyresources"). Resource("thirdpartyresources").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -149,8 +149,8 @@ func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDis ...@@ -149,8 +149,8 @@ func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDis
// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. // Watch returns a watch.Interface that watches the requested podDisruptionBudgets.
func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("poddisruptionbudgets"). Resource("poddisruptionbudgets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -124,8 +124,8 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleLi ...@@ -124,8 +124,8 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleLi
// Watch returns a watch.Interface that watches the requested clusterRoles. // Watch returns a watch.Interface that watches the requested clusterRoles.
func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("clusterroles"). Resource("clusterroles").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -124,8 +124,8 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cluste ...@@ -124,8 +124,8 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cluste
// Watch returns a watch.Interface that watches the requested clusterRoleBindings. // Watch returns a watch.Interface that watches the requested clusterRoleBindings.
func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("clusterrolebindings"). Resource("clusterrolebindings").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -132,8 +132,8 @@ func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) ...@@ -132,8 +132,8 @@ func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error)
// Watch returns a watch.Interface that watches the requested roles. // Watch returns a watch.Interface that watches the requested roles.
func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("roles"). Resource("roles").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingLi ...@@ -132,8 +132,8 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingLi
// Watch returns a watch.Interface that watches the requested roleBindings. // Watch returns a watch.Interface that watches the requested roleBindings.
func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("rolebindings"). Resource("rolebindings").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -124,8 +124,8 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleLis ...@@ -124,8 +124,8 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleLis
// Watch returns a watch.Interface that watches the requested clusterRoles. // Watch returns a watch.Interface that watches the requested clusterRoles.
func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("clusterroles"). Resource("clusterroles").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -124,8 +124,8 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.Cluster ...@@ -124,8 +124,8 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.Cluster
// Watch returns a watch.Interface that watches the requested clusterRoleBindings. // Watch returns a watch.Interface that watches the requested clusterRoleBindings.
func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("clusterrolebindings"). Resource("clusterrolebindings").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -132,8 +132,8 @@ func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) ...@@ -132,8 +132,8 @@ func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error)
// Watch returns a watch.Interface that watches the requested roles. // Watch returns a watch.Interface that watches the requested roles.
func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("roles"). Resource("roles").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingLis ...@@ -132,8 +132,8 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingLis
// Watch returns a watch.Interface that watches the requested roleBindings. // Watch returns a watch.Interface that watches the requested roleBindings.
func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("rolebindings"). Resource("rolebindings").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -124,8 +124,8 @@ func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClass ...@@ -124,8 +124,8 @@ func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClass
// Watch returns a watch.Interface that watches the requested storageClasses. // Watch returns a watch.Interface that watches the requested storageClasses.
func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("storageclasses"). Resource("storageclasses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -149,8 +149,8 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *apps.StatefulSetList, ...@@ -149,8 +149,8 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *apps.StatefulSetList,
// Watch returns a watch.Interface that watches the requested statefulSets. // Watch returns a watch.Interface that watches the requested statefulSets.
func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("statefulsets"). Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscalin ...@@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscalin
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *batch.CronJobList, err err ...@@ -149,8 +149,8 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *batch.CronJobList, err err
// Watch returns a watch.Interface that watches the requested cronJobs. // Watch returns a watch.Interface that watches the requested cronJobs.
func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("cronjobs"). Resource("cronjobs").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *jobs) List(opts v1.ListOptions) (result *batch.JobList, err error) { ...@@ -149,8 +149,8 @@ func (c *jobs) List(opts v1.ListOptions) (result *batch.JobList, 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(opts v1.ListOptions) (watch.Interface, error) { func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("jobs"). Resource("jobs").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -140,8 +140,8 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *certific ...@@ -140,8 +140,8 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *certific
// Watch returns a watch.Interface that watches the requested certificateSigningRequests. // Watch returns a watch.Interface that watches the requested certificateSigningRequests.
func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("certificatesigningrequests"). Resource("certificatesigningrequests").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -124,8 +124,8 @@ func (c *componentStatuses) List(opts v1.ListOptions) (result *api.ComponentStat ...@@ -124,8 +124,8 @@ func (c *componentStatuses) List(opts v1.ListOptions) (result *api.ComponentStat
// Watch returns a watch.Interface that watches the requested componentStatuses. // Watch returns a watch.Interface that watches the requested componentStatuses.
func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("componentstatuses"). Resource("componentstatuses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -132,8 +132,8 @@ func (c *configMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err e ...@@ -132,8 +132,8 @@ func (c *configMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err e
// Watch returns a watch.Interface that watches the requested configMaps. // Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("configmaps"). Resource("configmaps").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *endpoints) List(opts v1.ListOptions) (result *api.EndpointsList, err er ...@@ -132,8 +132,8 @@ func (c *endpoints) List(opts v1.ListOptions) (result *api.EndpointsList, err er
// Watch returns a watch.Interface that watches the requested endpoints. // Watch returns a watch.Interface that watches the requested endpoints.
func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("endpoints"). Resource("endpoints").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *events) List(opts v1.ListOptions) (result *api.EventList, err error) { ...@@ -132,8 +132,8 @@ func (c *events) List(opts v1.ListOptions) (result *api.EventList, err error) {
// Watch returns a watch.Interface that watches the requested events. // Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("events"). Resource("events").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *limitRanges) List(opts v1.ListOptions) (result *api.LimitRangeList, err ...@@ -132,8 +132,8 @@ func (c *limitRanges) List(opts v1.ListOptions) (result *api.LimitRangeList, err
// Watch returns a watch.Interface that watches the requested limitRanges. // Watch returns a watch.Interface that watches the requested limitRanges.
func (c *limitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *limitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("limitranges"). Resource("limitranges").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -140,8 +140,8 @@ func (c *namespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err e ...@@ -140,8 +140,8 @@ func (c *namespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err e
// Watch returns a watch.Interface that watches the requested namespaces. // Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("namespaces"). Resource("namespaces").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -140,8 +140,8 @@ func (c *nodes) List(opts v1.ListOptions) (result *api.NodeList, err error) { ...@@ -140,8 +140,8 @@ func (c *nodes) List(opts v1.ListOptions) (result *api.NodeList, err 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(opts v1.ListOptions) (watch.Interface, error) { func (c *nodes) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("nodes"). Resource("nodes").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -140,8 +140,8 @@ func (c *persistentVolumes) List(opts v1.ListOptions) (result *api.PersistentVol ...@@ -140,8 +140,8 @@ func (c *persistentVolumes) List(opts v1.ListOptions) (result *api.PersistentVol
// Watch returns a watch.Interface that watches the requested persistentVolumes. // Watch returns a watch.Interface that watches the requested persistentVolumes.
func (c *persistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *persistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("persistentvolumes"). Resource("persistentvolumes").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -149,8 +149,8 @@ func (c *persistentVolumeClaims) List(opts v1.ListOptions) (result *api.Persiste ...@@ -149,8 +149,8 @@ func (c *persistentVolumeClaims) List(opts v1.ListOptions) (result *api.Persiste
// Watch returns a watch.Interface that watches the requested persistentVolumeClaims. // Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
func (c *persistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *persistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("persistentvolumeclaims"). Resource("persistentvolumeclaims").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *pods) List(opts v1.ListOptions) (result *api.PodList, err error) { ...@@ -149,8 +149,8 @@ func (c *pods) List(opts v1.ListOptions) (result *api.PodList, 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(opts v1.ListOptions) (watch.Interface, error) { func (c *pods) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("pods"). Resource("pods").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *podTemplates) List(opts v1.ListOptions) (result *api.PodTemplateList, e ...@@ -132,8 +132,8 @@ func (c *podTemplates) List(opts v1.ListOptions) (result *api.PodTemplateList, e
// Watch returns a watch.Interface that watches the requested podTemplates. // Watch returns a watch.Interface that watches the requested podTemplates.
func (c *podTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *podTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("podtemplates"). Resource("podtemplates").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *replicationControllers) List(opts v1.ListOptions) (result *api.Replicat ...@@ -149,8 +149,8 @@ func (c *replicationControllers) List(opts v1.ListOptions) (result *api.Replicat
// Watch returns a watch.Interface that watches the requested replicationControllers. // Watch returns a watch.Interface that watches the requested replicationControllers.
func (c *replicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *replicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("replicationcontrollers"). Resource("replicationcontrollers").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *resourceQuotas) List(opts v1.ListOptions) (result *api.ResourceQuotaLis ...@@ -149,8 +149,8 @@ func (c *resourceQuotas) List(opts v1.ListOptions) (result *api.ResourceQuotaLis
// Watch returns a watch.Interface that watches the requested resourceQuotas. // Watch returns a watch.Interface that watches the requested resourceQuotas.
func (c *resourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *resourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("resourcequotas"). Resource("resourcequotas").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *secrets) List(opts v1.ListOptions) (result *api.SecretList, err error) ...@@ -132,8 +132,8 @@ func (c *secrets) List(opts v1.ListOptions) (result *api.SecretList, err error)
// Watch returns a watch.Interface that watches the requested secrets. // Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("secrets"). Resource("secrets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *services) List(opts v1.ListOptions) (result *api.ServiceList, err error ...@@ -149,8 +149,8 @@ func (c *services) List(opts v1.ListOptions) (result *api.ServiceList, err 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(opts v1.ListOptions) (watch.Interface, error) { func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("services"). Resource("services").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *serviceAccounts) List(opts v1.ListOptions) (result *api.ServiceAccountL ...@@ -132,8 +132,8 @@ func (c *serviceAccounts) List(opts v1.ListOptions) (result *api.ServiceAccountL
// Watch returns a watch.Interface that watches the requested serviceAccounts. // Watch returns a watch.Interface that watches the requested serviceAccounts.
func (c *serviceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *serviceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("serviceaccounts"). Resource("serviceaccounts").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList ...@@ -149,8 +149,8 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList
// Watch returns a watch.Interface that watches the requested daemonSets. // Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("daemonsets"). Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *extensions.DeploymentLi ...@@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *extensions.DeploymentLi
// Watch returns a watch.Interface that watches the requested deployments. // Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("deployments"). Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -149,8 +149,8 @@ func (c *ingresses) List(opts v1.ListOptions) (result *extensions.IngressList, e ...@@ -149,8 +149,8 @@ func (c *ingresses) List(opts v1.ListOptions) (result *extensions.IngressList, e
// Watch returns a watch.Interface that watches the requested ingresses. // Watch returns a watch.Interface that watches the requested ingresses.
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("ingresses"). Resource("ingresses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *networkPolicies) List(opts v1.ListOptions) (result *extensions.NetworkP ...@@ -132,8 +132,8 @@ func (c *networkPolicies) List(opts v1.ListOptions) (result *extensions.NetworkP
// Watch returns a watch.Interface that watches the requested networkPolicies. // Watch returns a watch.Interface that watches the requested networkPolicies.
func (c *networkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *networkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("networkpolicies"). Resource("networkpolicies").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -124,8 +124,8 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *extensions.PodS ...@@ -124,8 +124,8 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *extensions.PodS
// Watch returns a watch.Interface that watches the requested podSecurityPolicies. // Watch returns a watch.Interface that watches the requested podSecurityPolicies.
func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("podsecuritypolicies"). Resource("podsecuritypolicies").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetLi ...@@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetLi
// Watch returns a watch.Interface that watches the requested replicaSets. // Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -124,8 +124,8 @@ func (c *thirdPartyResources) List(opts v1.ListOptions) (result *extensions.Thir ...@@ -124,8 +124,8 @@ func (c *thirdPartyResources) List(opts v1.ListOptions) (result *extensions.Thir
// Watch returns a watch.Interface that watches the requested thirdPartyResources. // Watch returns a watch.Interface that watches the requested thirdPartyResources.
func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("thirdpartyresources"). Resource("thirdpartyresources").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -149,8 +149,8 @@ func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *policy.PodDisr ...@@ -149,8 +149,8 @@ func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *policy.PodDisr
// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. // Watch returns a watch.Interface that watches the requested podDisruptionBudgets.
func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("poddisruptionbudgets"). Resource("poddisruptionbudgets").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -124,8 +124,8 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *rbac.ClusterRoleList, ...@@ -124,8 +124,8 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *rbac.ClusterRoleList,
// Watch returns a watch.Interface that watches the requested clusterRoles. // Watch returns a watch.Interface that watches the requested clusterRoles.
func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("clusterroles"). Resource("clusterroles").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -124,8 +124,8 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *rbac.ClusterRol ...@@ -124,8 +124,8 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *rbac.ClusterRol
// Watch returns a watch.Interface that watches the requested clusterRoleBindings. // Watch returns a watch.Interface that watches the requested clusterRoleBindings.
func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("clusterrolebindings"). Resource("clusterrolebindings").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -132,8 +132,8 @@ func (c *roles) List(opts v1.ListOptions) (result *rbac.RoleList, err error) { ...@@ -132,8 +132,8 @@ func (c *roles) List(opts v1.ListOptions) (result *rbac.RoleList, err error) {
// Watch returns a watch.Interface that watches the requested roles. // Watch returns a watch.Interface that watches the requested roles.
func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("roles"). Resource("roles").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -132,8 +132,8 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *rbac.RoleBindingList, ...@@ -132,8 +132,8 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *rbac.RoleBindingList,
// Watch returns a watch.Interface that watches the requested roleBindings. // Watch returns a watch.Interface that watches the requested roleBindings.
func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
Resource("rolebindings"). Resource("rolebindings").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
......
...@@ -124,8 +124,8 @@ func (c *storageClasses) List(opts v1.ListOptions) (result *storage.StorageClass ...@@ -124,8 +124,8 @@ func (c *storageClasses) List(opts v1.ListOptions) (result *storage.StorageClass
// Watch returns a watch.Interface that watches the requested storageClasses. // Watch returns a watch.Interface that watches the requested storageClasses.
func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("storageclasses"). Resource("storageclasses").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -122,8 +122,8 @@ func TestListWatchesCanWatch(t *testing.T) { ...@@ -122,8 +122,8 @@ func TestListWatchesCanWatch(t *testing.T) {
// Node // Node
{ {
location: buildLocation( location: buildLocation(
testapi.Default.ResourcePathWithPrefix("watch", "nodes", metav1.NamespaceAll, ""), testapi.Default.ResourcePath("nodes", metav1.NamespaceAll, ""),
buildQueryValues(url.Values{})), buildQueryValues(url.Values{"watch": []string{"true"}})),
rv: "", rv: "",
resource: "nodes", resource: "nodes",
namespace: metav1.NamespaceAll, namespace: metav1.NamespaceAll,
...@@ -131,8 +131,8 @@ func TestListWatchesCanWatch(t *testing.T) { ...@@ -131,8 +131,8 @@ func TestListWatchesCanWatch(t *testing.T) {
}, },
{ {
location: buildLocation( location: buildLocation(
testapi.Default.ResourcePathWithPrefix("watch", "nodes", metav1.NamespaceAll, ""), testapi.Default.ResourcePath("nodes", metav1.NamespaceAll, ""),
buildQueryValues(url.Values{"resourceVersion": []string{"42"}})), buildQueryValues(url.Values{"resourceVersion": []string{"42"}, "watch": []string{"true"}})),
rv: "42", rv: "42",
resource: "nodes", resource: "nodes",
namespace: metav1.NamespaceAll, namespace: metav1.NamespaceAll,
...@@ -141,8 +141,8 @@ func TestListWatchesCanWatch(t *testing.T) { ...@@ -141,8 +141,8 @@ func TestListWatchesCanWatch(t *testing.T) {
// pod with "assigned" field selector. // pod with "assigned" field selector.
{ {
location: buildLocation( location: buildLocation(
testapi.Default.ResourcePathWithPrefix("watch", "pods", metav1.NamespaceAll, ""), testapi.Default.ResourcePath("pods", metav1.NamespaceAll, ""),
buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}})), buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}, "watch": []string{"true"}})),
rv: "0", rv: "0",
resource: "pods", resource: "pods",
namespace: metav1.NamespaceAll, namespace: metav1.NamespaceAll,
...@@ -151,8 +151,8 @@ func TestListWatchesCanWatch(t *testing.T) { ...@@ -151,8 +151,8 @@ func TestListWatchesCanWatch(t *testing.T) {
// pod with namespace foo and assigned field selector // pod with namespace foo and assigned field selector
{ {
location: buildLocation( location: buildLocation(
testapi.Default.ResourcePathWithPrefix("watch", "pods", "foo", ""), testapi.Default.ResourcePath("pods", "foo", ""),
buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}})), buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}, "watch": []string{"true"}})),
rv: "0", rv: "0",
resource: "pods", resource: "pods",
namespace: "foo", namespace: "foo",
......
...@@ -460,7 +460,7 @@ func gcListWatcher(client *dynamic.Client, resource schema.GroupVersionResource) ...@@ -460,7 +460,7 @@ func gcListWatcher(client *dynamic.Client, resource schema.GroupVersionResource)
apiResource := metav1.APIResource{Name: resource.Resource} apiResource := metav1.APIResource{Name: resource.Resource}
return client.ParameterCodec(dynamic.VersionedParameterEncoderWithV1Fallback). return client.ParameterCodec(dynamic.VersionedParameterEncoderWithV1Fallback).
Resource(&apiResource, metav1.NamespaceAll). Resource(&apiResource, metav1.NamespaceAll).
List(&options) List(options)
}, },
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
// APIResource.Kind is not used by the dynamic client, so // APIResource.Kind is not used by the dynamic client, so
...@@ -470,7 +470,7 @@ func gcListWatcher(client *dynamic.Client, resource schema.GroupVersionResource) ...@@ -470,7 +470,7 @@ func gcListWatcher(client *dynamic.Client, resource schema.GroupVersionResource)
apiResource := metav1.APIResource{Name: resource.Resource} apiResource := metav1.APIResource{Name: resource.Resource}
return client.ParameterCodec(dynamic.VersionedParameterEncoderWithV1Fallback). return client.ParameterCodec(dynamic.VersionedParameterEncoderWithV1Fallback).
Resource(&apiResource, metav1.NamespaceAll). Resource(&apiResource, metav1.NamespaceAll).
Watch(&options) Watch(options)
}, },
} }
} }
......
...@@ -354,7 +354,7 @@ func TestGCListWatcher(t *testing.T) { ...@@ -354,7 +354,7 @@ func TestGCListWatcher(t *testing.T) {
if e, a := 2, len(testHandler.actions); e != a { if e, a := 2, len(testHandler.actions); e != a {
t.Errorf("expect %d requests, got %d", e, a) t.Errorf("expect %d requests, got %d", e, a)
} }
if e, a := "resourceVersion=1", testHandler.actions[0].query; e != a { if e, a := "resourceVersion=1&watch=true", testHandler.actions[0].query; e != a {
t.Errorf("expect %s, got %s", e, a) t.Errorf("expect %s, got %s", e, a)
} }
if e, a := "resourceVersion=1", testHandler.actions[1].query; e != a { if e, a := "resourceVersion=1", testHandler.actions[1].query; e != a {
......
...@@ -341,7 +341,7 @@ func (d *namespacedResourcesDeleter) deleteCollection( ...@@ -341,7 +341,7 @@ func (d *namespacedResourcesDeleter) deleteCollection(
// resource deletions generically. it will ensure all resources in the namespace are purged prior to releasing // resource deletions generically. it will ensure all resources in the namespace are purged prior to releasing
// namespace itself. // namespace itself.
orphanDependents := false orphanDependents := false
err := dynamicClient.Resource(&apiResource, namespace).DeleteCollection(&metav1.DeleteOptions{OrphanDependents: &orphanDependents}, &metav1.ListOptions{}) err := dynamicClient.Resource(&apiResource, namespace).DeleteCollection(&metav1.DeleteOptions{OrphanDependents: &orphanDependents}, metav1.ListOptions{})
if err == nil { if err == nil {
return true, nil return true, nil
...@@ -379,7 +379,7 @@ func (d *namespacedResourcesDeleter) listCollection( ...@@ -379,7 +379,7 @@ func (d *namespacedResourcesDeleter) listCollection(
} }
apiResource := metav1.APIResource{Name: gvr.Resource, Namespaced: true} apiResource := metav1.APIResource{Name: gvr.Resource, Namespaced: true}
obj, err := dynamicClient.Resource(&apiResource, namespace).List(&metav1.ListOptions{}) obj, err := dynamicClient.Resource(&apiResource, namespace).List(metav1.ListOptions{})
if err == nil { if err == nil {
unstructuredList, ok := obj.(*unstructured.UnstructuredList) unstructuredList, ok := obj.(*unstructured.UnstructuredList)
if !ok { if !ok {
......
...@@ -767,9 +767,11 @@ func TestWatchSelector(t *testing.T) { ...@@ -767,9 +767,11 @@ func TestWatchSelector(t *testing.T) {
} }
switch req.URL.Path { switch req.URL.Path {
case "/namespaces/test/pods": case "/namespaces/test/pods":
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, podList)}, nil if req.URL.Query().Get("watch") == "true" {
case "/watch/namespaces/test/pods": return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[2:])}, nil
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[2:])}, nil } else {
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, podList)}, nil
}
default: default:
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req) t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
return nil, nil return nil, nil
...@@ -807,8 +809,12 @@ func TestWatchResource(t *testing.T) { ...@@ -807,8 +809,12 @@ func TestWatchResource(t *testing.T) {
switch req.URL.Path { switch req.URL.Path {
case "/namespaces/test/pods/foo": case "/namespaces/test/pods/foo":
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &pods[1])}, nil return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &pods[1])}, nil
case "/watch/namespaces/test/pods/foo": case "/namespaces/test/pods":
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[1:])}, nil if req.URL.Query().Get("watch") == "true" && req.URL.Query().Get("fieldSelector") == "metadata.name=foo" {
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[1:])}, nil
}
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
return nil, nil
default: default:
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req) t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
return nil, nil return nil, nil
...@@ -845,8 +851,12 @@ func TestWatchResourceIdentifiedByFile(t *testing.T) { ...@@ -845,8 +851,12 @@ func TestWatchResourceIdentifiedByFile(t *testing.T) {
switch req.URL.Path { switch req.URL.Path {
case "/namespaces/test/replicationcontrollers/cassandra": case "/namespaces/test/replicationcontrollers/cassandra":
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &pods[1])}, nil return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &pods[1])}, nil
case "/watch/namespaces/test/replicationcontrollers/cassandra": case "/namespaces/test/replicationcontrollers":
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[1:])}, nil if req.URL.Query().Get("watch") == "true" && req.URL.Query().Get("fieldSelector") == "metadata.name=cassandra" {
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[1:])}, nil
}
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
return nil, nil
default: default:
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req) t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
return nil, nil return nil, nil
...@@ -884,8 +894,12 @@ func TestWatchOnlyResource(t *testing.T) { ...@@ -884,8 +894,12 @@ func TestWatchOnlyResource(t *testing.T) {
switch req.URL.Path { switch req.URL.Path {
case "/namespaces/test/pods/foo": case "/namespaces/test/pods/foo":
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &pods[1])}, nil return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &pods[1])}, nil
case "/watch/namespaces/test/pods/foo": case "/namespaces/test/pods":
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[1:])}, nil if req.URL.Query().Get("watch") == "true" && req.URL.Query().Get("fieldSelector") == "metadata.name=foo" {
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[1:])}, nil
}
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
return nil, nil
default: default:
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req) t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
return nil, nil return nil, nil
...@@ -927,9 +941,11 @@ func TestWatchOnlyList(t *testing.T) { ...@@ -927,9 +941,11 @@ func TestWatchOnlyList(t *testing.T) {
Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) {
switch req.URL.Path { switch req.URL.Path {
case "/namespaces/test/pods": case "/namespaces/test/pods":
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, podList)}, nil if req.URL.Query().Get("watch") == "true" {
case "/watch/namespaces/test/pods": return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[2:])}, nil
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: watchBody(codec, events[2:])}, nil } else {
return &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, podList)}, nil
}
default: default:
t.Fatalf("unexpected request: %#v\n%#v", req.URL, req) t.Fatalf("unexpected request: %#v\n%#v", req.URL, req)
return nil, nil return nil, nil
......
...@@ -31,6 +31,7 @@ go_library( ...@@ -31,6 +31,7 @@ go_library(
"//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/errors",
"//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/api/meta",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/fields",
"//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/schema",
......
...@@ -1069,7 +1069,7 @@ func TestListObjectWithDifferentVersions(t *testing.T) { ...@@ -1069,7 +1069,7 @@ func TestListObjectWithDifferentVersions(t *testing.T) {
func TestWatch(t *testing.T) { func TestWatch(t *testing.T) {
_, svc := testData() _, svc := testData()
w, err := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClientWith("", t, map[string]string{ w, err := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClientWith("", t, map[string]string{
"/watch/namespaces/test/services/redis-master?resourceVersion=12": watchBody(watch.Event{ "/namespaces/test/services?fieldSelector=metadata.name%3Dredis-master&resourceVersion=12&watch=true": watchBody(watch.Event{
Type: watch.Added, Type: watch.Added,
Object: &svc.Items[0], Object: &svc.Items[0],
}), }),
......
...@@ -20,6 +20,7 @@ import ( ...@@ -20,6 +20,7 @@ import (
"strconv" "strconv"
"k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
...@@ -75,21 +76,21 @@ func (m *Helper) List(namespace, apiVersion string, selector labels.Selector, ex ...@@ -75,21 +76,21 @@ func (m *Helper) List(namespace, apiVersion string, selector labels.Selector, ex
func (m *Helper) Watch(namespace, resourceVersion, apiVersion string, labelSelector labels.Selector) (watch.Interface, error) { func (m *Helper) Watch(namespace, resourceVersion, apiVersion string, labelSelector labels.Selector) (watch.Interface, error) {
return m.RESTClient.Get(). return m.RESTClient.Get().
Prefix("watch").
NamespaceIfScoped(namespace, m.NamespaceScoped). NamespaceIfScoped(namespace, m.NamespaceScoped).
Resource(m.Resource). Resource(m.Resource).
Param("resourceVersion", resourceVersion). Param("resourceVersion", resourceVersion).
Param("watch", "true").
LabelsSelectorParam(labelSelector). LabelsSelectorParam(labelSelector).
Watch() Watch()
} }
func (m *Helper) WatchSingle(namespace, name, resourceVersion string) (watch.Interface, error) { func (m *Helper) WatchSingle(namespace, name, resourceVersion string) (watch.Interface, error) {
return m.RESTClient.Get(). return m.RESTClient.Get().
Prefix("watch").
NamespaceIfScoped(namespace, m.NamespaceScoped). NamespaceIfScoped(namespace, m.NamespaceScoped).
Resource(m.Resource). Resource(m.Resource).
Name(name).
Param("resourceVersion", resourceVersion). Param("resourceVersion", resourceVersion).
Param("watch", "true").
FieldsSelectorParam(fields.OneTermEqualSelector("metadata.name", name)).
Watch() Watch()
} }
......
...@@ -757,6 +757,7 @@ func TestNotFound(t *testing.T) { ...@@ -757,6 +757,7 @@ func TestNotFound(t *testing.T) {
"groupless namespaced PUT with extra segment": {"PUT", "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/ns/simples/bar/baz", http.StatusNotFound}, "groupless namespaced PUT with extra segment": {"PUT", "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/ns/simples/bar/baz", http.StatusNotFound},
"groupless namespaced watch missing storage": {"GET", "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/watch/", http.StatusNotFound}, "groupless namespaced watch missing storage": {"GET", "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/watch/", http.StatusNotFound},
"groupless namespaced watch with bad method": {"POST", "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/watch/namespaces/ns/simples/bar", http.StatusMethodNotAllowed}, "groupless namespaced watch with bad method": {"POST", "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/watch/namespaces/ns/simples/bar", http.StatusMethodNotAllowed},
"groupless namespaced watch param with bad method": {"POST", "/" + grouplessPrefix + "/" + grouplessGroupVersion.Version + "/namespaces/ns/simples/bar?watch=true", http.StatusMethodNotAllowed},
// Positive checks to make sure everything is wired correctly // Positive checks to make sure everything is wired correctly
"GET root": {"GET", "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simpleroots", http.StatusOK}, "GET root": {"GET", "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/simpleroots", http.StatusOK},
...@@ -788,6 +789,7 @@ func TestNotFound(t *testing.T) { ...@@ -788,6 +789,7 @@ func TestNotFound(t *testing.T) {
"namespaced PUT with extra segment": {"PUT", "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/ns/simples/bar/baz", http.StatusNotFound}, "namespaced PUT with extra segment": {"PUT", "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/ns/simples/bar/baz", http.StatusNotFound},
"namespaced watch missing storage": {"GET", "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/watch/", http.StatusNotFound}, "namespaced watch missing storage": {"GET", "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/watch/", http.StatusNotFound},
"namespaced watch with bad method": {"POST", "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/watch/namespaces/ns/simples/bar", http.StatusMethodNotAllowed}, "namespaced watch with bad method": {"POST", "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/watch/namespaces/ns/simples/bar", http.StatusMethodNotAllowed},
"namespaced watch param with bad method": {"POST", "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/ns/simples/bar?watch=true", http.StatusMethodNotAllowed},
} }
handler := handle(map[string]rest.Storage{ handler := handle(map[string]rest.Storage{
"simples": &SimpleRESTStorage{}, "simples": &SimpleRESTStorage{},
......
...@@ -112,7 +112,7 @@ type ResourceClient struct { ...@@ -112,7 +112,7 @@ type ResourceClient struct {
} }
// List returns a list of objects for this resource. // List returns a list of objects for this resource.
func (rc *ResourceClient) List(opts runtime.Object) (runtime.Object, error) { func (rc *ResourceClient) List(opts metav1.ListOptions) (runtime.Object, error) {
parameterEncoder := rc.parameterCodec parameterEncoder := rc.parameterCodec
if parameterEncoder == nil { if parameterEncoder == nil {
parameterEncoder = defaultParameterEncoder parameterEncoder = defaultParameterEncoder
...@@ -120,7 +120,7 @@ func (rc *ResourceClient) List(opts runtime.Object) (runtime.Object, error) { ...@@ -120,7 +120,7 @@ func (rc *ResourceClient) List(opts runtime.Object) (runtime.Object, error) {
return rc.cl.Get(). return rc.cl.Get().
NamespaceIfScoped(rc.ns, rc.resource.Namespaced). NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
Resource(rc.resource.Name). Resource(rc.resource.Name).
VersionedParams(opts, parameterEncoder). VersionedParams(&opts, parameterEncoder).
Do(). Do().
Get() Get()
} }
...@@ -149,7 +149,7 @@ func (rc *ResourceClient) Delete(name string, opts *metav1.DeleteOptions) error ...@@ -149,7 +149,7 @@ func (rc *ResourceClient) Delete(name string, opts *metav1.DeleteOptions) error
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions runtime.Object) error { func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
parameterEncoder := rc.parameterCodec parameterEncoder := rc.parameterCodec
if parameterEncoder == nil { if parameterEncoder == nil {
parameterEncoder = defaultParameterEncoder parameterEncoder = defaultParameterEncoder
...@@ -157,7 +157,7 @@ func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, ...@@ -157,7 +157,7 @@ func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions,
return rc.cl.Delete(). return rc.cl.Delete().
NamespaceIfScoped(rc.ns, rc.resource.Namespaced). NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
Resource(rc.resource.Name). Resource(rc.resource.Name).
VersionedParams(listOptions, parameterEncoder). VersionedParams(&listOptions, parameterEncoder).
Body(deleteOptions). Body(deleteOptions).
Do(). Do().
Error() Error()
...@@ -192,16 +192,16 @@ func (rc *ResourceClient) Update(obj *unstructured.Unstructured) (*unstructured. ...@@ -192,16 +192,16 @@ func (rc *ResourceClient) Update(obj *unstructured.Unstructured) (*unstructured.
} }
// Watch returns a watch.Interface that watches the resource. // Watch returns a watch.Interface that watches the resource.
func (rc *ResourceClient) Watch(opts runtime.Object) (watch.Interface, error) { func (rc *ResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
parameterEncoder := rc.parameterCodec parameterEncoder := rc.parameterCodec
if parameterEncoder == nil { if parameterEncoder == nil {
parameterEncoder = defaultParameterEncoder parameterEncoder = defaultParameterEncoder
} }
opts.Watch = true
return rc.cl.Get(). return rc.cl.Get().
Prefix("watch").
NamespaceIfScoped(rc.ns, rc.resource.Namespaced). NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
Resource(rc.resource.Name). Resource(rc.resource.Name).
VersionedParams(opts, parameterEncoder). VersionedParams(&opts, parameterEncoder).
Watch() Watch()
} }
......
...@@ -136,7 +136,7 @@ func TestList(t *testing.T) { ...@@ -136,7 +136,7 @@ func TestList(t *testing.T) {
} }
defer srv.Close() defer srv.Close()
got, err := cl.Resource(resource, tc.namespace).List(&metav1.ListOptions{}) got, err := cl.Resource(resource, tc.namespace).List(metav1.ListOptions{})
if err != nil { if err != nil {
t.Errorf("unexpected error when listing %q: %v", tc.name, err) t.Errorf("unexpected error when listing %q: %v", tc.name, err)
continue continue
...@@ -293,7 +293,7 @@ func TestDeleteCollection(t *testing.T) { ...@@ -293,7 +293,7 @@ func TestDeleteCollection(t *testing.T) {
} }
defer srv.Close() defer srv.Close()
err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, &metav1.ListOptions{}) err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, metav1.ListOptions{})
if err != nil { if err != nil {
t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err) t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err)
continue continue
...@@ -425,10 +425,12 @@ func TestWatch(t *testing.T) { ...@@ -425,10 +425,12 @@ func TestWatch(t *testing.T) {
namespace string namespace string
events []watch.Event events []watch.Event
path string path string
query string
}{ }{
{ {
name: "normal_watch", name: "normal_watch",
path: "/api/gtest/vtest/watch/rtest", path: "/api/gtest/vtest/rtest",
query: "watch=true",
events: []watch.Event{ events: []watch.Event{
{Type: watch.Added, Object: getObject("vTest", "rTest", "normal_watch")}, {Type: watch.Added, Object: getObject("vTest", "rTest", "normal_watch")},
{Type: watch.Modified, Object: getObject("vTest", "rTest", "normal_watch")}, {Type: watch.Modified, Object: getObject("vTest", "rTest", "normal_watch")},
...@@ -438,7 +440,8 @@ func TestWatch(t *testing.T) { ...@@ -438,7 +440,8 @@ func TestWatch(t *testing.T) {
{ {
name: "namespaced_watch", name: "namespaced_watch",
namespace: "nstest", namespace: "nstest",
path: "/api/gtest/vtest/watch/namespaces/nstest/rtest", path: "/api/gtest/vtest/namespaces/nstest/rtest",
query: "watch=true",
events: []watch.Event{ events: []watch.Event{
{Type: watch.Added, Object: getObject("vTest", "rTest", "namespaced_watch")}, {Type: watch.Added, Object: getObject("vTest", "rTest", "namespaced_watch")},
{Type: watch.Modified, Object: getObject("vTest", "rTest", "namespaced_watch")}, {Type: watch.Modified, Object: getObject("vTest", "rTest", "namespaced_watch")},
...@@ -457,6 +460,9 @@ func TestWatch(t *testing.T) { ...@@ -457,6 +460,9 @@ func TestWatch(t *testing.T) {
if r.URL.Path != tc.path { if r.URL.Path != tc.path {
t.Errorf("Watch(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path) t.Errorf("Watch(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path)
} }
if r.URL.RawQuery != tc.query {
t.Errorf("Watch(%q) got query %s. wanted %s", tc.name, r.URL.RawQuery, tc.query)
}
enc := restclientwatch.NewEncoder(streaming.NewEncoder(w, dynamicCodec{}), dynamicCodec{}) enc := restclientwatch.NewEncoder(streaming.NewEncoder(w, dynamicCodec{}), dynamicCodec{})
for _, e := range tc.events { for _, e := range tc.events {
...@@ -469,7 +475,7 @@ func TestWatch(t *testing.T) { ...@@ -469,7 +475,7 @@ func TestWatch(t *testing.T) {
} }
defer srv.Close() defer srv.Close()
watcher, err := cl.Resource(resource, tc.namespace).Watch(&metav1.ListOptions{}) watcher, err := cl.Resource(resource, tc.namespace).Watch(metav1.ListOptions{})
if err != nil { if err != nil {
t.Errorf("unexpected error when watching %q: %v", tc.name, err) t.Errorf("unexpected error when watching %q: %v", tc.name, err)
continue continue
......
...@@ -67,8 +67,8 @@ func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSe ...@@ -67,8 +67,8 @@ func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSe
Get() Get()
} }
watchFunc := func(options metav1.ListOptions) (watch.Interface, error) { watchFunc := func(options metav1.ListOptions) (watch.Interface, error) {
options.Watch = true
return c.Get(). return c.Get().
Prefix("watch").
Namespace(namespace). Namespace(namespace).
Resource(resource). Resource(resource).
VersionedParams(&options, metav1.ParameterCodec). VersionedParams(&options, metav1.ParameterCodec).
......
...@@ -140,8 +140,8 @@ func (c *aPIServices) List(opts v1.ListOptions) (result *v1alpha1.APIServiceList ...@@ -140,8 +140,8 @@ func (c *aPIServices) List(opts v1.ListOptions) (result *v1alpha1.APIServiceList
// Watch returns a watch.Interface that watches the requested aPIServices. // Watch returns a watch.Interface that watches the requested aPIServices.
func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("apiservices"). Resource("apiservices").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -140,8 +140,8 @@ func (c *aPIServices) List(opts v1.ListOptions) (result *apiregistration.APIServ ...@@ -140,8 +140,8 @@ func (c *aPIServices) List(opts v1.ListOptions) (result *apiregistration.APIServ
// Watch returns a watch.Interface that watches the requested aPIServices. // Watch returns a watch.Interface that watches the requested aPIServices.
func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get(). return c.client.Get().
Prefix("watch").
Resource("apiservices"). Resource("apiservices").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Watch() Watch()
......
...@@ -363,7 +363,7 @@ func SkipIfMissingResource(clientPool dynamic.ClientPool, gvr schema.GroupVersio ...@@ -363,7 +363,7 @@ func SkipIfMissingResource(clientPool dynamic.ClientPool, gvr schema.GroupVersio
Failf("Unexpected error getting dynamic client for %v: %v", gvr.GroupVersion(), err) Failf("Unexpected error getting dynamic client for %v: %v", gvr.GroupVersion(), err)
} }
apiResource := metav1.APIResource{Name: gvr.Resource, Namespaced: true} apiResource := metav1.APIResource{Name: gvr.Resource, Namespaced: true}
_, err = dynamicClient.Resource(&apiResource, namespace).List(&metav1.ListOptions{}) _, err = dynamicClient.Resource(&apiResource, namespace).List(metav1.ListOptions{})
if err != nil { if err != nil {
// not all resources support list, so we ignore those // not all resources support list, so we ignore those
if apierrs.IsMethodNotSupported(err) || apierrs.IsNotFound(err) || apierrs.IsForbidden(err) { if apierrs.IsMethodNotSupported(err) || apierrs.IsNotFound(err) || apierrs.IsForbidden(err) {
...@@ -1086,7 +1086,7 @@ func hasRemainingContent(c clientset.Interface, clientPool dynamic.ClientPool, n ...@@ -1086,7 +1086,7 @@ func hasRemainingContent(c clientset.Interface, clientPool dynamic.ClientPool, n
Logf("namespace: %s, resource: %s, ignored listing per whitelist", namespace, apiResource.Name) Logf("namespace: %s, resource: %s, ignored listing per whitelist", namespace, apiResource.Name)
continue continue
} }
obj, err := dynamicClient.Resource(&apiResource, namespace).List(&metav1.ListOptions{}) obj, err := dynamicClient.Resource(&apiResource, namespace).List(metav1.ListOptions{})
if err != nil { if err != nil {
// not all resources support list, so we ignore those // not all resources support list, so we ignore those
if apierrs.IsMethodNotSupported(err) || apierrs.IsNotFound(err) || apierrs.IsForbidden(err) { if apierrs.IsMethodNotSupported(err) || apierrs.IsNotFound(err) || apierrs.IsForbidden(err) {
......
...@@ -29,6 +29,7 @@ import ( ...@@ -29,6 +29,7 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
...@@ -491,11 +492,11 @@ func TestSingleWatch(t *testing.T) { ...@@ -491,11 +492,11 @@ func TestSingleWatch(t *testing.T) {
} }
w, err := client.Core().RESTClient().Get(). w, err := client.Core().RESTClient().Get().
Prefix("watch").
Namespace(ns.Name). Namespace(ns.Name).
Resource("events"). Resource("events").
Name("event-9").
Param("resourceVersion", rv1). Param("resourceVersion", rv1).
Param("watch", "true").
FieldsSelectorParam(fields.OneTermEqualSelector("metadata.name", "event-9")).
Watch() Watch()
if err != nil { if err != nil {
......
...@@ -93,7 +93,7 @@ func TestDynamicClient(t *testing.T) { ...@@ -93,7 +93,7 @@ func TestDynamicClient(t *testing.T) {
} }
// check dynamic list // check dynamic list
obj, err := dynamicClient.Resource(&resource, ns.Name).List(&metav1.ListOptions{}) obj, err := dynamicClient.Resource(&resource, ns.Name).List(metav1.ListOptions{})
unstructuredList, ok := obj.(*unstructured.UnstructuredList) unstructuredList, ok := obj.(*unstructured.UnstructuredList)
if !ok { if !ok {
t.Fatalf("expected *unstructured.UnstructuredList, got %#v", obj) t.Fatalf("expected *unstructured.UnstructuredList, got %#v", obj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment