Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Use watch param instead of deprecated /watch/ prefix" #41774

Merged
merged 1 commit into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ func (c *$.type|privatePlural$) UpdateStatus($.type|private$ *$.type|raw$) (resu
var watchTemplate = `
// Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$.
func (c *$.type|privatePlural$) Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
$if .namespaced$Namespace(c.ns).$end$
Resource("$.type|allLowercasePlural$").
VersionedParams(&opts, $.apiParameterCodec|raw$).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *testTypes) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("testtypes").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("jobs").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("configmaps").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("events").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Resource("namespaces").
VersionedParams(&opts, api.ParameterCodec).
Watch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("secrets").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("services").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("daemonsets").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList,

// Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("deployments").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("ingresses").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList,

// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("replicasets").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Resource("clusters").
VersionedParams(&opts, api.ParameterCodec).
Watch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscalin

// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("jobs").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func (c *configMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err e

// Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("configmaps").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func (c *events) List(opts v1.ListOptions) (result *api.EventList, err error) {

// Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("events").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ func (c *namespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err e

// Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Resource("namespaces").
VersionedParams(&opts, api.ParameterCodec).
Watch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func (c *secrets) List(opts v1.ListOptions) (result *api.SecretList, err error)

// Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("secrets").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ func (c *services) List(opts v1.ListOptions) (result *api.ServiceList, err error

// Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("services").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList

// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("daemonsets").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (c *deployments) List(opts v1.ListOptions) (result *extensions.DeploymentLi

// Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("deployments").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("ingresses").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetLi

// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("replicasets").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Resource("clusters").
VersionedParams(&opts, api.ParameterCodec).
Watch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetLis

// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("statefulsets").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.H

// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("jobs").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("cronjobs").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("jobs").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.

// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Resource("certificatesigningrequests").
VersionedParams(&opts, api.ParameterCodec).
Watch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Resource("componentstatuses").
VersionedParams(&opts, api.ParameterCodec).
Watch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("configmaps").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("endpoints").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("events").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Namespace(c.ns).
Resource("limitranges").
VersionedParams(&opts, api.ParameterCodec).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Resource("namespaces").
VersionedParams(&opts, api.ParameterCodec).
Watch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Prefix("watch").
Resource("nodes").
VersionedParams(&opts, api.ParameterCodec).
Watch()
Expand Down