diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index e225763a..c0c54412 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -352,7 +352,7 @@ }, { "ImportPath": "k8s.io/apimachinery", - "Rev": "845a0cbf0d16" + "Rev": "eb4ad4570127" }, { "ImportPath": "k8s.io/gengo", diff --git a/discovery/discovery_client.go b/discovery/discovery_client.go index 5d89457c..dc12f9a2 100644 --- a/discovery/discovery_client.go +++ b/discovery/discovery_client.go @@ -17,6 +17,7 @@ limitations under the License. package discovery import ( + "context" "encoding/json" "fmt" "net/url" @@ -155,7 +156,7 @@ func apiVersionsToAPIGroup(apiVersions *metav1.APIVersions) (apiGroup metav1.API func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err error) { // Get the groupVersions exposed at /api v := &metav1.APIVersions{} - err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do().Into(v) + err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do(context.TODO()).Into(v) apiGroup := metav1.APIGroup{} if err == nil && len(v.Versions) != 0 { apiGroup = apiVersionsToAPIGroup(v) @@ -166,7 +167,7 @@ func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err // Get the groupVersions exposed at /apis apiGroupList = &metav1.APIGroupList{} - err = d.restClient.Get().AbsPath("/apis").Do().Into(apiGroupList) + err = d.restClient.Get().AbsPath("/apis").Do(context.TODO()).Into(apiGroupList) if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) { return nil, err } @@ -196,7 +197,7 @@ func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (r resources = &metav1.APIResourceList{ GroupVersion: groupVersion, } - err = d.restClient.Get().AbsPath(url.String()).Do().Into(resources) + err = d.restClient.Get().AbsPath(url.String()).Do(context.TODO()).Into(resources) if err != nil { // ignore 403 or 404 error to be compatible with an v1.0 server. if groupVersion == "v1" && (errors.IsNotFound(err) || errors.IsForbidden(err)) { @@ -405,7 +406,7 @@ func ServerPreferredNamespacedResources(d DiscoveryInterface) ([]*metav1.APIReso // ServerVersion retrieves and parses the server's version (git version). func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { - body, err := d.restClient.Get().AbsPath("/version").Do().Raw() + body, err := d.restClient.Get().AbsPath("/version").Do(context.TODO()).Raw() if err != nil { return nil, err } @@ -419,12 +420,12 @@ func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { // OpenAPISchema fetches the open api schema using a rest client and parses the proto. func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { - data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do().Raw() + data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do(context.TODO()).Raw() if err != nil { if errors.IsForbidden(err) || errors.IsNotFound(err) || errors.IsNotAcceptable(err) { // single endpoint not found/registered in old server, try to fetch old endpoint // TODO: remove this when kubectl/client-go don't work with 1.9 server - data, err = d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do().Raw() + data, err = d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do(context.TODO()).Raw() if err != nil { return nil, err } diff --git a/dynamic/simple.go b/dynamic/simple.go index 8a026788..d61504b9 100644 --- a/dynamic/simple.go +++ b/dynamic/simple.go @@ -17,6 +17,7 @@ limitations under the License. package dynamic import ( + "context" "fmt" "k8s.io/apimachinery/pkg/api/meta" @@ -111,7 +112,7 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts meta AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(outBytes). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } @@ -146,7 +147,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts meta AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(outBytes). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } @@ -182,7 +183,7 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt AbsPath(append(c.makeURLSegments(name), "status")...). Body(outBytes). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } @@ -214,7 +215,7 @@ func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, Delete(). AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(deleteOptionsByte). - Do() + Do(context.TODO()) return result.Error() } @@ -232,7 +233,7 @@ func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, lis AbsPath(c.makeURLSegments("")...). Body(deleteOptionsByte). SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1). - Do() + Do(context.TODO()) return result.Error() } @@ -240,7 +241,7 @@ func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subreso if len(name) == 0 { return nil, fmt.Errorf("name is required") } - result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do() + result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } @@ -256,7 +257,7 @@ func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subreso } func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { - result := c.client.client.Get().AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do() + result := c.client.client.Get().AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } @@ -283,7 +284,7 @@ func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, opts.Watch = true return c.client.client.Get().AbsPath(c.makeURLSegments("")...). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Watch() + Watch(context.TODO()) } func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) { @@ -295,7 +296,7 @@ func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []by AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(data). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } diff --git a/go.mod b/go.mod index be04f32c..f60e9c56 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 google.golang.org/appengine v1.5.0 // indirect k8s.io/api v0.0.0-20200130072251-812149543c99 - k8s.io/apimachinery v0.0.0-20200130072110-845a0cbf0d16 + k8s.io/apimachinery v0.0.0-20200130072111-eb4ad4570127 k8s.io/klog v1.0.0 k8s.io/utils v0.0.0-20191217005138-9e5e9d854fcc sigs.k8s.io/yaml v1.1.0 @@ -39,5 +39,5 @@ replace ( golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // pinned to release-branch.go1.13 golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13 k8s.io/api => k8s.io/api v0.0.0-20200130072251-812149543c99 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200130072110-845a0cbf0d16 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200130072111-eb4ad4570127 ) diff --git a/go.sum b/go.sum index ab66778f..538dc9a9 100644 --- a/go.sum +++ b/go.sum @@ -191,7 +191,7 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.0.0-20200130072251-812149543c99/go.mod h1:5hz1MDQLlgYnKttI81z5nZ8LGQtHE6oI6Ry3XcXnVAI= -k8s.io/apimachinery v0.0.0-20200130072110-845a0cbf0d16/go.mod h1:HJDBSLM+cx1vex4Ye4/ySVjb/6yt+PEBkK8g2alZ6LM= +k8s.io/apimachinery v0.0.0-20200130072111-eb4ad4570127/go.mod h1:f7PPp70QzCGGLJHvCtiN2lePa9CdVddeAdL5w7NdrrU= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= diff --git a/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go b/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go index 1f5e5e38..c8601218 100644 --- a/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/admissionregistration/v1" @@ -67,7 +68,7 @@ func (c *mutatingWebhookConfigurations) Get(name string, options metav1.GetOptio Resource("mutatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *mutatingWebhookConfigurations) List(opts metav1.ListOptions) (result *v Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *mutatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch.In Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *mutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1. err = c.client.Post(). Resource("mutatingwebhookconfigurations"). Body(mutatingWebhookConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *mutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1. Resource("mutatingwebhookconfigurations"). Name(mutatingWebhookConfiguration.Name). Body(mutatingWebhookConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *mutatingWebhookConfigurations) Delete(name string, options *metav1.Dele Resource("mutatingwebhookconfigurations"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(options *metav1.DeleteO VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *mutatingWebhookConfigurations) Patch(name string, pt types.PatchType, d SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go b/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go index 7987b6e3..6b7c7c6d 100644 --- a/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/admissionregistration/v1" @@ -67,7 +68,7 @@ func (c *validatingWebhookConfigurations) Get(name string, options metav1.GetOpt Resource("validatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *validatingWebhookConfigurations) List(opts metav1.ListOptions) (result Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *validatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch. Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration err = c.client.Post(). Resource("validatingwebhookconfigurations"). Body(validatingWebhookConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration Resource("validatingwebhookconfigurations"). Name(validatingWebhookConfiguration.Name). Body(validatingWebhookConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *validatingWebhookConfigurations) Delete(name string, options *metav1.De Resource("validatingwebhookconfigurations"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *validatingWebhookConfigurations) DeleteCollection(options *metav1.Delet VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index 4524896c..d11c10ed 100644 --- a/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/admissionregistration/v1beta1" @@ -67,7 +68,7 @@ func (c *mutatingWebhookConfigurations) Get(name string, options v1.GetOptions) Resource("mutatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *mutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1bet Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *mutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interf Resource("mutatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *mutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1b err = c.client.Post(). Resource("mutatingwebhookconfigurations"). Body(mutatingWebhookConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *mutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1b Resource("mutatingwebhookconfigurations"). Name(mutatingWebhookConfiguration.Name). Body(mutatingWebhookConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *mutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOp Resource("mutatingwebhookconfigurations"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptio VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *mutatingWebhookConfigurations) Patch(name string, pt types.PatchType, d SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 7e711b30..2d0e7639 100644 --- a/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/admissionregistration/v1beta1" @@ -67,7 +68,7 @@ func (c *validatingWebhookConfigurations) Get(name string, options v1.GetOptions Resource("validatingwebhookconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1b Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Inte Resource("validatingwebhookconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration err = c.client.Post(). Resource("validatingwebhookconfigurations"). Body(validatingWebhookConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration Resource("validatingwebhookconfigurations"). Name(validatingWebhookConfiguration.Name). Body(validatingWebhookConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *validatingWebhookConfigurations) Delete(name string, options *v1.Delete Resource("validatingwebhookconfigurations"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *validatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOpt VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1/controllerrevision.go b/kubernetes/typed/apps/v1/controllerrevision.go index e28e4d2a..d4571fb3 100644 --- a/kubernetes/typed/apps/v1/controllerrevision.go +++ b/kubernetes/typed/apps/v1/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -70,7 +71,7 @@ func (c *controllerRevisions) Get(name string, options metav1.GetOptions) (resul Resource("controllerrevisions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *controllerRevisions) List(opts metav1.ListOptions) (result *v1.Controll Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *controllerRevisions) Watch(opts metav1.ListOptions) (watch.Interface, e Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *controllerRevisions) Create(controllerRevision *v1.ControllerRevision) Namespace(c.ns). Resource("controllerrevisions"). Body(controllerRevision). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *controllerRevisions) Update(controllerRevision *v1.ControllerRevision) Resource("controllerrevisions"). Name(controllerRevision.Name). Body(controllerRevision). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *controllerRevisions) Delete(name string, options *metav1.DeleteOptions) Resource("controllerrevisions"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *controllerRevisions) DeleteCollection(options *metav1.DeleteOptions, li VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1/daemonset.go b/kubernetes/typed/apps/v1/daemonset.go index a535cdab..dc7c6d17 100644 --- a/kubernetes/typed/apps/v1/daemonset.go +++ b/kubernetes/typed/apps/v1/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -71,7 +72,7 @@ func (c *daemonSets) Get(name string, options metav1.GetOptions) (result *v1.Dae Resource("daemonsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *daemonSets) List(opts metav1.ListOptions) (result *v1.DaemonSetList, er Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *daemonSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *daemonSets) Create(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err Namespace(c.ns). Resource("daemonsets"). Body(daemonSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *daemonSets) Update(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err Resource("daemonsets"). Name(daemonSet.Name). Body(daemonSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *daemonSets) UpdateStatus(daemonSet *v1.DaemonSet) (result *v1.DaemonSet Name(daemonSet.Name). SubResource("status"). Body(daemonSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *daemonSets) Delete(name string, options *metav1.DeleteOptions) error { Resource("daemonsets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *daemonSets) DeleteCollection(options *metav1.DeleteOptions, listOptions VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subreso SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1/deployment.go b/kubernetes/typed/apps/v1/deployment.go index f9799a45..d24dcbc9 100644 --- a/kubernetes/typed/apps/v1/deployment.go +++ b/kubernetes/typed/apps/v1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -75,7 +76,7 @@ func (c *deployments) Get(name string, options metav1.GetOptions) (result *v1.De Resource("deployments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -92,7 +93,7 @@ func (c *deployments) List(opts metav1.ListOptions) (result *v1.DeploymentList, Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -109,7 +110,7 @@ func (c *deployments) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. @@ -119,7 +120,7 @@ func (c *deployments) Create(deployment *v1.Deployment) (result *v1.Deployment, Namespace(c.ns). Resource("deployments"). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -132,7 +133,7 @@ func (c *deployments) Update(deployment *v1.Deployment) (result *v1.Deployment, Resource("deployments"). Name(deployment.Name). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -148,7 +149,7 @@ func (c *deployments) UpdateStatus(deployment *v1.Deployment) (result *v1.Deploy Name(deployment.Name). SubResource("status"). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -160,7 +161,7 @@ func (c *deployments) Delete(name string, options *metav1.DeleteOptions) error { Resource("deployments"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -176,7 +177,7 @@ func (c *deployments) DeleteCollection(options *metav1.DeleteOptions, listOption VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -189,7 +190,7 @@ func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subres SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } @@ -203,7 +204,7 @@ func (c *deployments) GetScale(deploymentName string, options metav1.GetOptions) Name(deploymentName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -217,7 +218,7 @@ func (c *deployments) UpdateScale(deploymentName string, scale *autoscalingv1.Sc Name(deploymentName). SubResource("scale"). Body(scale). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1/replicaset.go b/kubernetes/typed/apps/v1/replicaset.go index ff3504e7..f71bc7d9 100644 --- a/kubernetes/typed/apps/v1/replicaset.go +++ b/kubernetes/typed/apps/v1/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -75,7 +76,7 @@ func (c *replicaSets) Get(name string, options metav1.GetOptions) (result *v1.Re Resource("replicasets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -92,7 +93,7 @@ func (c *replicaSets) List(opts metav1.ListOptions) (result *v1.ReplicaSetList, Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -109,7 +110,7 @@ func (c *replicaSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. @@ -119,7 +120,7 @@ func (c *replicaSets) Create(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, Namespace(c.ns). Resource("replicasets"). Body(replicaSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -132,7 +133,7 @@ func (c *replicaSets) Update(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, Resource("replicasets"). Name(replicaSet.Name). Body(replicaSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -148,7 +149,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1.ReplicaSet) (result *v1.Replic Name(replicaSet.Name). SubResource("status"). Body(replicaSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -160,7 +161,7 @@ func (c *replicaSets) Delete(name string, options *metav1.DeleteOptions) error { Resource("replicasets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -176,7 +177,7 @@ func (c *replicaSets) DeleteCollection(options *metav1.DeleteOptions, listOption VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -189,7 +190,7 @@ func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subres SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } @@ -203,7 +204,7 @@ func (c *replicaSets) GetScale(replicaSetName string, options metav1.GetOptions) Name(replicaSetName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -217,7 +218,7 @@ func (c *replicaSets) UpdateScale(replicaSetName string, scale *autoscalingv1.Sc Name(replicaSetName). SubResource("scale"). Body(scale). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1/statefulset.go b/kubernetes/typed/apps/v1/statefulset.go index c12c470b..cf83b528 100644 --- a/kubernetes/typed/apps/v1/statefulset.go +++ b/kubernetes/typed/apps/v1/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/apps/v1" @@ -75,7 +76,7 @@ func (c *statefulSets) Get(name string, options metav1.GetOptions) (result *v1.S Resource("statefulsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -92,7 +93,7 @@ func (c *statefulSets) List(opts metav1.ListOptions) (result *v1.StatefulSetList Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -109,7 +110,7 @@ func (c *statefulSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. @@ -119,7 +120,7 @@ func (c *statefulSets) Create(statefulSet *v1.StatefulSet) (result *v1.StatefulS Namespace(c.ns). Resource("statefulsets"). Body(statefulSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -132,7 +133,7 @@ func (c *statefulSets) Update(statefulSet *v1.StatefulSet) (result *v1.StatefulS Resource("statefulsets"). Name(statefulSet.Name). Body(statefulSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -148,7 +149,7 @@ func (c *statefulSets) UpdateStatus(statefulSet *v1.StatefulSet) (result *v1.Sta Name(statefulSet.Name). SubResource("status"). Body(statefulSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -160,7 +161,7 @@ func (c *statefulSets) Delete(name string, options *metav1.DeleteOptions) error Resource("statefulsets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -176,7 +177,7 @@ func (c *statefulSets) DeleteCollection(options *metav1.DeleteOptions, listOptio VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -189,7 +190,7 @@ func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } @@ -203,7 +204,7 @@ func (c *statefulSets) GetScale(statefulSetName string, options metav1.GetOption Name(statefulSetName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -217,7 +218,7 @@ func (c *statefulSets) UpdateScale(statefulSetName string, scale *autoscalingv1. Name(statefulSetName). SubResource("scale"). Body(scale). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1beta1/controllerrevision.go b/kubernetes/typed/apps/v1beta1/controllerrevision.go index 45ddb915..e2a4e1c0 100644 --- a/kubernetes/typed/apps/v1beta1/controllerrevision.go +++ b/kubernetes/typed/apps/v1beta1/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/apps/v1beta1" @@ -70,7 +71,7 @@ func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v Resource("controllerrevisions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta1.Control Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *controllerRevisions) Create(controllerRevision *v1beta1.ControllerRevis Namespace(c.ns). Resource("controllerrevisions"). Body(controllerRevision). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *controllerRevisions) Update(controllerRevision *v1beta1.ControllerRevis Resource("controllerrevisions"). Name(controllerRevision.Name). Body(controllerRevision). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) err Resource("controllerrevisions"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOp VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1beta1/deployment.go b/kubernetes/typed/apps/v1beta1/deployment.go index 05fdcb7a..e7329ac3 100644 --- a/kubernetes/typed/apps/v1beta1/deployment.go +++ b/kubernetes/typed/apps/v1beta1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/apps/v1beta1" @@ -71,7 +72,7 @@ func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.D Resource("deployments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.De Namespace(c.ns). Resource("deployments"). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.De Resource("deployments"). Name(deployment.Name). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1be Name(deployment.Name). SubResource("status"). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { Resource("deployments"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1 VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subres SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1beta1/statefulset.go b/kubernetes/typed/apps/v1beta1/statefulset.go index c4b35b42..a602528f 100644 --- a/kubernetes/typed/apps/v1beta1/statefulset.go +++ b/kubernetes/typed/apps/v1beta1/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/apps/v1beta1" @@ -71,7 +72,7 @@ func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1. Resource("statefulsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetLis Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *statefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1 Namespace(c.ns). Resource("statefulsets"). Body(statefulSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1 Resource("statefulsets"). Name(statefulSet.Name). Body(statefulSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *statefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (result *v Name(statefulSet.Name). SubResource("status"). Body(statefulSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error { Resource("statefulsets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1beta2/controllerrevision.go b/kubernetes/typed/apps/v1beta2/controllerrevision.go index e1d60251..1f00935b 100644 --- a/kubernetes/typed/apps/v1beta2/controllerrevision.go +++ b/kubernetes/typed/apps/v1beta2/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -70,7 +71,7 @@ func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v Resource("controllerrevisions"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta2.Control Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error Resource("controllerrevisions"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *controllerRevisions) Create(controllerRevision *v1beta2.ControllerRevis Namespace(c.ns). Resource("controllerrevisions"). Body(controllerRevision). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *controllerRevisions) Update(controllerRevision *v1beta2.ControllerRevis Resource("controllerrevisions"). Name(controllerRevision.Name). Body(controllerRevision). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) err Resource("controllerrevisions"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOp VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1beta2/daemonset.go b/kubernetes/typed/apps/v1beta2/daemonset.go index f8b7ac25..2259fa82 100644 --- a/kubernetes/typed/apps/v1beta2/daemonset.go +++ b/kubernetes/typed/apps/v1beta2/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -71,7 +72,7 @@ func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta2.Da Resource("daemonsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetList, e Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *daemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.Daemo Namespace(c.ns). Resource("daemonsets"). Body(daemonSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *daemonSets) Update(daemonSet *v1beta2.DaemonSet) (result *v1beta2.Daemo Resource("daemonsets"). Name(daemonSet.Name). Body(daemonSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *daemonSets) UpdateStatus(daemonSet *v1beta2.DaemonSet) (result *v1beta2 Name(daemonSet.Name). SubResource("status"). Body(daemonSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error { Resource("daemonsets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1. VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subreso SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1beta2/deployment.go b/kubernetes/typed/apps/v1beta2/deployment.go index 510250b0..2bec20ec 100644 --- a/kubernetes/typed/apps/v1beta2/deployment.go +++ b/kubernetes/typed/apps/v1beta2/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -71,7 +72,7 @@ func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta2.D Resource("deployments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentList, Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *deployments) Create(deployment *v1beta2.Deployment) (result *v1beta2.De Namespace(c.ns). Resource("deployments"). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *deployments) Update(deployment *v1beta2.Deployment) (result *v1beta2.De Resource("deployments"). Name(deployment.Name). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *deployments) UpdateStatus(deployment *v1beta2.Deployment) (result *v1be Name(deployment.Name). SubResource("status"). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { Resource("deployments"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1 VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subres SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1beta2/replicaset.go b/kubernetes/typed/apps/v1beta2/replicaset.go index 7b738774..815a9038 100644 --- a/kubernetes/typed/apps/v1beta2/replicaset.go +++ b/kubernetes/typed/apps/v1beta2/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -71,7 +72,7 @@ func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta2.R Resource("replicasets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetList, Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *replicaSets) Create(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.Re Namespace(c.ns). Resource("replicasets"). Body(replicaSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *replicaSets) Update(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.Re Resource("replicasets"). Name(replicaSet.Name). Body(replicaSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1beta2.ReplicaSet) (result *v1be Name(replicaSet.Name). SubResource("status"). Body(replicaSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error { Resource("replicasets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1 VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subres SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/apps/v1beta2/statefulset.go b/kubernetes/typed/apps/v1beta2/statefulset.go index de7c3db8..834fc7dd 100644 --- a/kubernetes/typed/apps/v1beta2/statefulset.go +++ b/kubernetes/typed/apps/v1beta2/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" "time" v1beta2 "k8s.io/api/apps/v1beta2" @@ -74,7 +75,7 @@ func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta2. Resource("statefulsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -91,7 +92,7 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSetLis Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -108,7 +109,7 @@ func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("statefulsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. @@ -118,7 +119,7 @@ func (c *statefulSets) Create(statefulSet *v1beta2.StatefulSet) (result *v1beta2 Namespace(c.ns). Resource("statefulsets"). Body(statefulSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *statefulSets) Update(statefulSet *v1beta2.StatefulSet) (result *v1beta2 Resource("statefulsets"). Name(statefulSet.Name). Body(statefulSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *statefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (result *v Name(statefulSet.Name). SubResource("status"). Body(statefulSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -159,7 +160,7 @@ func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error { Resource("statefulsets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -175,7 +176,7 @@ func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -188,7 +189,7 @@ func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } @@ -202,7 +203,7 @@ func (c *statefulSets) GetScale(statefulSetName string, options v1.GetOptions) ( Name(statefulSetName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -216,7 +217,7 @@ func (c *statefulSets) UpdateScale(statefulSetName string, scale *v1beta2.Scale) Name(statefulSetName). SubResource("scale"). Body(scale). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/auditregistration/v1alpha1/auditsink.go b/kubernetes/typed/auditregistration/v1alpha1/auditsink.go index 414d4800..70cebea0 100644 --- a/kubernetes/typed/auditregistration/v1alpha1/auditsink.go +++ b/kubernetes/typed/auditregistration/v1alpha1/auditsink.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/auditregistration/v1alpha1" @@ -67,7 +68,7 @@ func (c *auditSinks) Get(name string, options v1.GetOptions) (result *v1alpha1.A Resource("auditsinks"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *auditSinks) List(opts v1.ListOptions) (result *v1alpha1.AuditSinkList, Resource("auditsinks"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *auditSinks) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("auditsinks"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *auditSinks) Create(auditSink *v1alpha1.AuditSink) (result *v1alpha1.Aud err = c.client.Post(). Resource("auditsinks"). Body(auditSink). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *auditSinks) Update(auditSink *v1alpha1.AuditSink) (result *v1alpha1.Aud Resource("auditsinks"). Name(auditSink.Name). Body(auditSink). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *auditSinks) Delete(name string, options *v1.DeleteOptions) error { Resource("auditsinks"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *auditSinks) DeleteCollection(options *v1.DeleteOptions, listOptions v1. VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *auditSinks) Patch(name string, pt types.PatchType, data []byte, subreso SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/authentication/v1/tokenreview_expansion.go b/kubernetes/typed/authentication/v1/tokenreview_expansion.go index 8a21b7c7..b930d283 100644 --- a/kubernetes/typed/authentication/v1/tokenreview_expansion.go +++ b/kubernetes/typed/authentication/v1/tokenreview_expansion.go @@ -34,10 +34,9 @@ func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (resul func (c *tokenReviews) CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { result = &authenticationapi.TokenReview{} err = c.client.Post(). - Context(ctx). Resource("tokenreviews"). Body(tokenReview). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go b/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go index 0476b173..624c6156 100644 --- a/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go +++ b/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go @@ -34,10 +34,9 @@ func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (resul func (c *tokenReviews) CreateContext(ctx context.Context, tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) { result = &authenticationapi.TokenReview{} err = c.client.Post(). - Context(ctx). Resource("tokenreviews"). Body(tokenReview). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go b/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go index 9836308b..5601c86f 100644 --- a/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go +++ b/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go @@ -34,11 +34,10 @@ func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAcc func (c *localSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { result = &authorizationapi.LocalSubjectAccessReview{} err = c.client.Post(). - Context(ctx). Namespace(c.ns). Resource("localsubjectaccessreviews"). Body(sar). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go b/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go index 916e5b43..62e79366 100644 --- a/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go +++ b/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go @@ -34,10 +34,9 @@ func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAcces func (c *selfSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { result = &authorizationapi.SelfSubjectAccessReview{} err = c.client.Post(). - Context(ctx). Resource("selfsubjectaccessreviews"). Body(sar). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go b/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go index 365282ed..775abaec 100644 --- a/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go +++ b/kubernetes/typed/authorization/v1/selfsubjectrulesreview_expansion.go @@ -34,10 +34,9 @@ func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesR func (c *selfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { result = &authorizationapi.SelfSubjectRulesReview{} err = c.client.Post(). - Context(ctx). Resource("selfsubjectrulesreviews"). Body(srr). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go b/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go index 927544f1..6a9a8ba9 100644 --- a/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go +++ b/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go @@ -35,10 +35,9 @@ func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) func (c *subjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { result = &authorizationapi.SubjectAccessReview{} err = c.client.Post(). - Context(ctx). Resource("subjectaccessreviews"). Body(sar). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go b/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go index 148cf628..86e8acdb 100644 --- a/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go +++ b/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go @@ -34,11 +34,10 @@ func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAcc func (c *localSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) { result = &authorizationapi.LocalSubjectAccessReview{} err = c.client.Post(). - Context(ctx). Namespace(c.ns). Resource("localsubjectaccessreviews"). Body(sar). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go b/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go index 6edead0e..fa717f34 100644 --- a/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go +++ b/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go @@ -34,10 +34,9 @@ func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAcces func (c *selfSubjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) { result = &authorizationapi.SelfSubjectAccessReview{} err = c.client.Post(). - Context(ctx). Resource("selfsubjectaccessreviews"). Body(sar). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go b/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go index a459d5c3..8137e30e 100644 --- a/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go +++ b/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview_expansion.go @@ -34,10 +34,9 @@ func (c *selfSubjectRulesReviews) Create(srr *authorizationapi.SelfSubjectRulesR func (c *selfSubjectRulesReviews) CreateContext(ctx context.Context, srr *authorizationapi.SelfSubjectRulesReview) (result *authorizationapi.SelfSubjectRulesReview, err error) { result = &authorizationapi.SelfSubjectRulesReview{} err = c.client.Post(). - Context(ctx). Resource("selfsubjectrulesreviews"). Body(srr). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go b/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go index 7072e29c..b5c7e47c 100644 --- a/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go +++ b/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go @@ -35,10 +35,9 @@ func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) func (c *subjectAccessReviews) CreateContext(ctx context.Context, sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { result = &authorizationapi.SubjectAccessReview{} err = c.client.Post(). - Context(ctx). Resource("subjectaccessreviews"). Body(sar). - Do(). + Do(ctx). Into(result) return } diff --git a/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index 0e0839fb..ed5827a6 100644 --- a/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/autoscaling/v1" @@ -71,7 +72,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options metav1.GetOptions) ( Resource("horizontalpodautoscalers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *horizontalPodAutoscalers) List(opts metav1.ListOptions) (result *v1.Hor Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *horizontalPodAutoscalers) Watch(opts metav1.ListOptions) (watch.Interfa Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.Horizontal Namespace(c.ns). Resource("horizontalpodautoscalers"). Body(horizontalPodAutoscaler). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.Horizontal Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). Body(horizontalPodAutoscaler). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.Hori Name(horizontalPodAutoscaler.Name). SubResource("status"). Body(horizontalPodAutoscaler). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *metav1.DeleteOpt Resource("horizontalpodautoscalers"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *metav1.DeleteOption VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data [ SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go b/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go index 02d5cfb9..985d18ea 100644 --- a/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v2beta1 import ( + "context" "time" v2beta1 "k8s.io/api/autoscaling/v2beta1" @@ -71,7 +72,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (resu Resource("horizontalpodautoscalers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.Ho Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.Horiz Namespace(c.ns). Resource("horizontalpodautoscalers"). Body(horizontalPodAutoscaler). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.Horiz Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). Body(horizontalPodAutoscaler). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta1 Name(horizontalPodAutoscaler.Name). SubResource("status"). Body(horizontalPodAutoscaler). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions Resource("horizontalpodautoscalers"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, l VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data [ SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go b/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go index 91a0fa64..14a79246 100644 --- a/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v2beta2 import ( + "context" "time" v2beta2 "k8s.io/api/autoscaling/v2beta2" @@ -71,7 +72,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (resu Resource("horizontalpodautoscalers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.Ho Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, Resource("horizontalpodautoscalers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.Horiz Namespace(c.ns). Resource("horizontalpodautoscalers"). Body(horizontalPodAutoscaler). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.Horiz Resource("horizontalpodautoscalers"). Name(horizontalPodAutoscaler.Name). Body(horizontalPodAutoscaler). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2 Name(horizontalPodAutoscaler.Name). SubResource("status"). Body(horizontalPodAutoscaler). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions Resource("horizontalpodautoscalers"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, l VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data [ SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/batch/v1/job.go b/kubernetes/typed/batch/v1/job.go index b55c602b..b80703e6 100644 --- a/kubernetes/typed/batch/v1/job.go +++ b/kubernetes/typed/batch/v1/job.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/batch/v1" @@ -71,7 +72,7 @@ func (c *jobs) Get(name string, options metav1.GetOptions) (result *v1.Job, err Resource("jobs"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *jobs) List(opts metav1.ListOptions) (result *v1.JobList, err error) { Resource("jobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *jobs) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("jobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *jobs) Create(job *v1.Job) (result *v1.Job, err error) { Namespace(c.ns). Resource("jobs"). Body(job). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *jobs) Update(job *v1.Job) (result *v1.Job, err error) { Resource("jobs"). Name(job.Name). Body(job). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) { Name(job.Name). SubResource("status"). Body(job). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *jobs) Delete(name string, options *metav1.DeleteOptions) error { Resource("jobs"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *jobs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/batch/v1beta1/cronjob.go b/kubernetes/typed/batch/v1beta1/cronjob.go index d89d2fa2..031bb550 100644 --- a/kubernetes/typed/batch/v1beta1/cronjob.go +++ b/kubernetes/typed/batch/v1beta1/cronjob.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/batch/v1beta1" @@ -71,7 +72,7 @@ func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v1beta1.Cron Resource("cronjobs"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err e Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *cronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, er Namespace(c.ns). Resource("cronjobs"). Body(cronJob). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *cronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, er Resource("cronjobs"). Name(cronJob.Name). Body(cronJob). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *cronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (result *v1beta1.CronJ Name(cronJob.Name). SubResource("status"). Body(cronJob). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error { Resource("cronjobs"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresour SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/batch/v2alpha1/cronjob.go b/kubernetes/typed/batch/v2alpha1/cronjob.go index 19123b60..828ec116 100644 --- a/kubernetes/typed/batch/v2alpha1/cronjob.go +++ b/kubernetes/typed/batch/v2alpha1/cronjob.go @@ -19,6 +19,7 @@ limitations under the License. package v2alpha1 import ( + "context" "time" v2alpha1 "k8s.io/api/batch/v2alpha1" @@ -71,7 +72,7 @@ func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Cro Resource("cronjobs"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("cronjobs"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *cronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, Namespace(c.ns). Resource("cronjobs"). Body(cronJob). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *cronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, Resource("cronjobs"). Name(cronJob.Name). Body(cronJob). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *cronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (result *v2alpha1.Cro Name(cronJob.Name). SubResource("status"). Body(cronJob). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error { Resource("cronjobs"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresour SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index 712d3a01..d80b94a2 100644 --- a/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go +++ b/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/certificates/v1beta1" @@ -68,7 +69,7 @@ func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (re Resource("certificatesigningrequests"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -84,7 +85,7 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1. Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -100,7 +101,7 @@ func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface Resource("certificatesigningrequests"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. @@ -109,7 +110,7 @@ func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.C err = c.client.Post(). Resource("certificatesigningrequests"). Body(certificateSigningRequest). - Do(). + Do(context.TODO()). Into(result) return } @@ -121,7 +122,7 @@ func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.C Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). Body(certificateSigningRequest). - Do(). + Do(context.TODO()). Into(result) return } @@ -136,7 +137,7 @@ func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1b Name(certificateSigningRequest.Name). SubResource("status"). Body(certificateSigningRequest). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptio Resource("certificatesigningrequests"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -162,7 +163,7 @@ func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -174,7 +175,7 @@ func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go b/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go index c63b8063..dd954bb1 100644 --- a/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go +++ b/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go @@ -17,6 +17,8 @@ limitations under the License. package v1beta1 import ( + "context" + certificates "k8s.io/api/certificates/v1beta1" ) @@ -31,7 +33,7 @@ func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *c Name(certificateSigningRequest.Name). Body(certificateSigningRequest). SubResource("approval"). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/coordination/v1/lease.go b/kubernetes/typed/coordination/v1/lease.go index b6cf1b64..e006c3bc 100644 --- a/kubernetes/typed/coordination/v1/lease.go +++ b/kubernetes/typed/coordination/v1/lease.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/coordination/v1" @@ -70,7 +71,7 @@ func (c *leases) Get(name string, options metav1.GetOptions) (result *v1.Lease, Resource("leases"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *leases) List(opts metav1.ListOptions) (result *v1.LeaseList, err error) Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *leases) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *leases) Create(lease *v1.Lease) (result *v1.Lease, err error) { Namespace(c.ns). Resource("leases"). Body(lease). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *leases) Update(lease *v1.Lease) (result *v1.Lease, err error) { Resource("leases"). Name(lease.Name). Body(lease). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *leases) Delete(name string, options *metav1.DeleteOptions) error { Resource("leases"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *leases) DeleteCollection(options *metav1.DeleteOptions, listOptions met VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresource SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/coordination/v1beta1/lease.go b/kubernetes/typed/coordination/v1beta1/lease.go index 490d815a..2f56f4e7 100644 --- a/kubernetes/typed/coordination/v1beta1/lease.go +++ b/kubernetes/typed/coordination/v1beta1/lease.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/coordination/v1beta1" @@ -70,7 +71,7 @@ func (c *leases) Get(name string, options v1.GetOptions) (result *v1beta1.Lease, Resource("leases"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *leases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *leases) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("leases"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *leases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) Namespace(c.ns). Resource("leases"). Body(lease). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *leases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) Resource("leases"). Name(lease.Name). Body(lease). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *leases) Delete(name string, options *v1.DeleteOptions) error { Resource("leases"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *leases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.List VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresource SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/componentstatus.go b/kubernetes/typed/core/v1/componentstatus.go index 302b2fdc..3f028cd4 100644 --- a/kubernetes/typed/core/v1/componentstatus.go +++ b/kubernetes/typed/core/v1/componentstatus.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -67,7 +68,7 @@ func (c *componentStatuses) Get(name string, options metav1.GetOptions) (result Resource("componentstatuses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *componentStatuses) List(opts metav1.ListOptions) (result *v1.ComponentS Resource("componentstatuses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *componentStatuses) Watch(opts metav1.ListOptions) (watch.Interface, err Resource("componentstatuses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *componentStatuses) Create(componentStatus *v1.ComponentStatus) (result err = c.client.Post(). Resource("componentstatuses"). Body(componentStatus). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result Resource("componentstatuses"). Name(componentStatus.Name). Body(componentStatus). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *componentStatuses) Delete(name string, options *metav1.DeleteOptions) e Resource("componentstatuses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *componentStatuses) DeleteCollection(options *metav1.DeleteOptions, list VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/configmap.go b/kubernetes/typed/core/v1/configmap.go index 18ce954a..74466d03 100644 --- a/kubernetes/typed/core/v1/configmap.go +++ b/kubernetes/typed/core/v1/configmap.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -70,7 +71,7 @@ func (c *configMaps) Get(name string, options metav1.GetOptions) (result *v1.Con Resource("configmaps"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *configMaps) List(opts metav1.ListOptions) (result *v1.ConfigMapList, er Resource("configmaps"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *configMaps) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("configmaps"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *configMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err Namespace(c.ns). Resource("configmaps"). Body(configMap). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err Resource("configmaps"). Name(configMap.Name). Body(configMap). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *configMaps) Delete(name string, options *metav1.DeleteOptions) error { Resource("configmaps"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *configMaps) DeleteCollection(options *metav1.DeleteOptions, listOptions VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subreso SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/endpoints.go b/kubernetes/typed/core/v1/endpoints.go index 978a2a19..0e2c81e4 100644 --- a/kubernetes/typed/core/v1/endpoints.go +++ b/kubernetes/typed/core/v1/endpoints.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -70,7 +71,7 @@ func (c *endpoints) Get(name string, options metav1.GetOptions) (result *v1.Endp Resource("endpoints"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *endpoints) List(opts metav1.ListOptions) (result *v1.EndpointsList, err Resource("endpoints"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *endpoints) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("endpoints"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *endpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err e Namespace(c.ns). Resource("endpoints"). Body(endpoints). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err e Resource("endpoints"). Name(endpoints.Name). Body(endpoints). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *endpoints) Delete(name string, options *metav1.DeleteOptions) error { Resource("endpoints"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *endpoints) DeleteCollection(options *metav1.DeleteOptions, listOptions VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresou SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/event.go b/kubernetes/typed/core/v1/event.go index 55cfa090..369f9e4a 100644 --- a/kubernetes/typed/core/v1/event.go +++ b/kubernetes/typed/core/v1/event.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -70,7 +71,7 @@ func (c *events) Get(name string, options metav1.GetOptions) (result *v1.Event, Resource("events"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *events) List(opts metav1.ListOptions) (result *v1.EventList, err error) Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *events) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *events) Create(event *v1.Event) (result *v1.Event, err error) { Namespace(c.ns). Resource("events"). Body(event). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) { Resource("events"). Name(event.Name). Body(event). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *events) Delete(name string, options *metav1.DeleteOptions) error { Resource("events"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *events) DeleteCollection(options *metav1.DeleteOptions, listOptions met VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *events) Patch(name string, pt types.PatchType, data []byte, subresource SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/event_expansion.go b/kubernetes/typed/core/v1/event_expansion.go index 5a82afa4..7377ef5d 100644 --- a/kubernetes/typed/core/v1/event_expansion.go +++ b/kubernetes/typed/core/v1/event_expansion.go @@ -17,9 +17,10 @@ limitations under the License. package v1 import ( + "context" "fmt" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" @@ -54,7 +55,7 @@ func (e *events) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) { NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0). Resource("events"). Body(event). - Do(). + Do(context.TODO()). Into(result) return result, err } @@ -71,7 +72,7 @@ func (e *events) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) { Resource("events"). Name(event.Name). Body(event). - Do(). + Do(context.TODO()). Into(result) return result, err } @@ -91,7 +92,7 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) Resource("events"). Name(incompleteEvent.Name). Body(data). - Do(). + Do(context.TODO()). Into(result) return result, err } diff --git a/kubernetes/typed/core/v1/limitrange.go b/kubernetes/typed/core/v1/limitrange.go index 2eeae11a..1c27a1e6 100644 --- a/kubernetes/typed/core/v1/limitrange.go +++ b/kubernetes/typed/core/v1/limitrange.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -70,7 +71,7 @@ func (c *limitRanges) Get(name string, options metav1.GetOptions) (result *v1.Li Resource("limitranges"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *limitRanges) List(opts metav1.ListOptions) (result *v1.LimitRangeList, Resource("limitranges"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *limitRanges) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("limitranges"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *limitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRange, Namespace(c.ns). Resource("limitranges"). Body(limitRange). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *limitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, Resource("limitranges"). Name(limitRange.Name). Body(limitRange). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *limitRanges) Delete(name string, options *metav1.DeleteOptions) error { Resource("limitranges"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *limitRanges) DeleteCollection(options *metav1.DeleteOptions, listOption VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subres SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/namespace.go b/kubernetes/typed/core/v1/namespace.go index 8a81fe85..3f9c0fbc 100644 --- a/kubernetes/typed/core/v1/namespace.go +++ b/kubernetes/typed/core/v1/namespace.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -67,7 +68,7 @@ func (c *namespaces) Get(name string, options metav1.GetOptions) (result *v1.Nam Resource("namespaces"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *namespaces) List(opts metav1.ListOptions) (result *v1.NamespaceList, er Resource("namespaces"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *namespaces) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("namespaces"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *namespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err err = c.client.Post(). Resource("namespaces"). Body(namespace). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *namespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err Resource("namespaces"). Name(namespace.Name). Body(namespace). - Do(). + Do(context.TODO()). Into(result) return } @@ -135,7 +136,7 @@ func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace Name(namespace.Name). SubResource("status"). Body(namespace). - Do(). + Do(context.TODO()). Into(result) return } @@ -146,7 +147,7 @@ func (c *namespaces) Delete(name string, options *metav1.DeleteOptions) error { Resource("namespaces"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subreso SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/namespace_expansion.go b/kubernetes/typed/core/v1/namespace_expansion.go index 17effe29..63482ace 100644 --- a/kubernetes/typed/core/v1/namespace_expansion.go +++ b/kubernetes/typed/core/v1/namespace_expansion.go @@ -16,7 +16,11 @@ limitations under the License. package v1 -import "k8s.io/api/core/v1" +import ( + "context" + + v1 "k8s.io/api/core/v1" +) // The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface. type NamespaceExpansion interface { @@ -26,6 +30,6 @@ type NamespaceExpansion interface { // Finalize takes the representation of a namespace to update. Returns the server's representation of the namespace, and an error, if it occurs. func (c *namespaces) Finalize(namespace *v1.Namespace) (result *v1.Namespace, err error) { result = &v1.Namespace{} - err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result) + err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do(context.TODO()).Into(result) return } diff --git a/kubernetes/typed/core/v1/node.go b/kubernetes/typed/core/v1/node.go index d19fab89..7966ae16 100644 --- a/kubernetes/typed/core/v1/node.go +++ b/kubernetes/typed/core/v1/node.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -68,7 +69,7 @@ func (c *nodes) Get(name string, options metav1.GetOptions) (result *v1.Node, er Resource("nodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -84,7 +85,7 @@ func (c *nodes) List(opts metav1.ListOptions) (result *v1.NodeList, err error) { Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -100,7 +101,7 @@ func (c *nodes) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("nodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any. @@ -109,7 +110,7 @@ func (c *nodes) Create(node *v1.Node) (result *v1.Node, err error) { err = c.client.Post(). Resource("nodes"). Body(node). - Do(). + Do(context.TODO()). Into(result) return } @@ -121,7 +122,7 @@ func (c *nodes) Update(node *v1.Node) (result *v1.Node, err error) { Resource("nodes"). Name(node.Name). Body(node). - Do(). + Do(context.TODO()). Into(result) return } @@ -136,7 +137,7 @@ func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) { Name(node.Name). SubResource("status"). Body(node). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *nodes) Delete(name string, options *metav1.DeleteOptions) error { Resource("nodes"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -162,7 +163,7 @@ func (c *nodes) DeleteCollection(options *metav1.DeleteOptions, listOptions meta VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -174,7 +175,7 @@ func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/node_expansion.go b/kubernetes/typed/core/v1/node_expansion.go index 5db29c3f..1df46ed5 100644 --- a/kubernetes/typed/core/v1/node_expansion.go +++ b/kubernetes/typed/core/v1/node_expansion.go @@ -17,7 +17,9 @@ limitations under the License. package v1 import ( - "k8s.io/api/core/v1" + "context" + + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" ) @@ -37,7 +39,7 @@ func (c *nodes) PatchStatus(nodeName string, data []byte) (*v1.Node, error) { Name(nodeName). SubResource("status"). Body(data). - Do(). + Do(context.TODO()). Into(result) return result, err } diff --git a/kubernetes/typed/core/v1/persistentvolume.go b/kubernetes/typed/core/v1/persistentvolume.go index 74514825..b4c78dd9 100644 --- a/kubernetes/typed/core/v1/persistentvolume.go +++ b/kubernetes/typed/core/v1/persistentvolume.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -68,7 +69,7 @@ func (c *persistentVolumes) Get(name string, options metav1.GetOptions) (result Resource("persistentvolumes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -84,7 +85,7 @@ func (c *persistentVolumes) List(opts metav1.ListOptions) (result *v1.Persistent Resource("persistentvolumes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -100,7 +101,7 @@ func (c *persistentVolumes) Watch(opts metav1.ListOptions) (watch.Interface, err Resource("persistentvolumes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any. @@ -109,7 +110,7 @@ func (c *persistentVolumes) Create(persistentVolume *v1.PersistentVolume) (resul err = c.client.Post(). Resource("persistentvolumes"). Body(persistentVolume). - Do(). + Do(context.TODO()). Into(result) return } @@ -121,7 +122,7 @@ func (c *persistentVolumes) Update(persistentVolume *v1.PersistentVolume) (resul Resource("persistentvolumes"). Name(persistentVolume.Name). Body(persistentVolume). - Do(). + Do(context.TODO()). Into(result) return } @@ -136,7 +137,7 @@ func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) Name(persistentVolume.Name). SubResource("status"). Body(persistentVolume). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *persistentVolumes) Delete(name string, options *metav1.DeleteOptions) e Resource("persistentvolumes"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -162,7 +163,7 @@ func (c *persistentVolumes) DeleteCollection(options *metav1.DeleteOptions, list VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -174,7 +175,7 @@ func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/persistentvolumeclaim.go b/kubernetes/typed/core/v1/persistentvolumeclaim.go index 410ab37d..b3c9591a 100644 --- a/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/kubernetes/typed/core/v1/persistentvolumeclaim.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -71,7 +72,7 @@ func (c *persistentVolumeClaims) Get(name string, options metav1.GetOptions) (re Resource("persistentvolumeclaims"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *persistentVolumeClaims) List(opts metav1.ListOptions) (result *v1.Persi Resource("persistentvolumeclaims"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *persistentVolumeClaims) Watch(opts metav1.ListOptions) (watch.Interface Resource("persistentvolumeclaims"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *persistentVolumeClaims) Create(persistentVolumeClaim *v1.PersistentVolu Namespace(c.ns). Resource("persistentvolumeclaims"). Body(persistentVolumeClaim). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *persistentVolumeClaims) Update(persistentVolumeClaim *v1.PersistentVolu Resource("persistentvolumeclaims"). Name(persistentVolumeClaim.Name). Body(persistentVolumeClaim). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.Persiste Name(persistentVolumeClaim.Name). SubResource("status"). Body(persistentVolumeClaim). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *persistentVolumeClaims) Delete(name string, options *metav1.DeleteOptio Resource("persistentvolumeclaims"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *persistentVolumeClaims) DeleteCollection(options *metav1.DeleteOptions, VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []b SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/pod.go b/kubernetes/typed/core/v1/pod.go index feacd307..30943a39 100644 --- a/kubernetes/typed/core/v1/pod.go +++ b/kubernetes/typed/core/v1/pod.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -74,7 +75,7 @@ func (c *pods) Get(name string, options metav1.GetOptions) (result *v1.Pod, err Resource("pods"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -91,7 +92,7 @@ func (c *pods) List(opts metav1.ListOptions) (result *v1.PodList, err error) { Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -108,7 +109,7 @@ func (c *pods) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("pods"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. @@ -118,7 +119,7 @@ func (c *pods) Create(pod *v1.Pod) (result *v1.Pod, err error) { Namespace(c.ns). Resource("pods"). Body(pod). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *pods) Update(pod *v1.Pod) (result *v1.Pod, err error) { Resource("pods"). Name(pod.Name). Body(pod). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) { Name(pod.Name). SubResource("status"). Body(pod). - Do(). + Do(context.TODO()). Into(result) return } @@ -159,7 +160,7 @@ func (c *pods) Delete(name string, options *metav1.DeleteOptions) error { Resource("pods"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -175,7 +176,7 @@ func (c *pods) DeleteCollection(options *metav1.DeleteOptions, listOptions metav VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -188,7 +189,7 @@ func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } @@ -202,7 +203,7 @@ func (c *pods) GetEphemeralContainers(podName string, options metav1.GetOptions) Name(podName). SubResource("ephemeralcontainers"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -216,7 +217,7 @@ func (c *pods) UpdateEphemeralContainers(podName string, ephemeralContainers *v1 Name(podName). SubResource("ephemeralcontainers"). Body(ephemeralContainers). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/pod_expansion.go b/kubernetes/typed/core/v1/pod_expansion.go index ed876be8..e385adf5 100644 --- a/kubernetes/typed/core/v1/pod_expansion.go +++ b/kubernetes/typed/core/v1/pod_expansion.go @@ -17,7 +17,9 @@ limitations under the License. package v1 import ( - "k8s.io/api/core/v1" + "context" + + v1 "k8s.io/api/core/v1" policy "k8s.io/api/policy/v1beta1" "k8s.io/client-go/kubernetes/scheme" restclient "k8s.io/client-go/rest" @@ -32,11 +34,11 @@ type PodExpansion interface { // Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored). func (c *pods) Bind(binding *v1.Binding) error { - return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do().Error() + return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do(context.TODO()).Error() } func (c *pods) Evict(eviction *policy.Eviction) error { - return c.client.Post().Namespace(c.ns).Resource("pods").Name(eviction.Name).SubResource("eviction").Body(eviction).Do().Error() + return c.client.Post().Namespace(c.ns).Resource("pods").Name(eviction.Name).SubResource("eviction").Body(eviction).Do(context.TODO()).Error() } // Get constructs a request for getting the logs for a pod diff --git a/kubernetes/typed/core/v1/podtemplate.go b/kubernetes/typed/core/v1/podtemplate.go index 84d7c980..b038135f 100644 --- a/kubernetes/typed/core/v1/podtemplate.go +++ b/kubernetes/typed/core/v1/podtemplate.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -70,7 +71,7 @@ func (c *podTemplates) Get(name string, options metav1.GetOptions) (result *v1.P Resource("podtemplates"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *podTemplates) List(opts metav1.ListOptions) (result *v1.PodTemplateList Resource("podtemplates"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *podTemplates) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("podtemplates"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *podTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTempla Namespace(c.ns). Resource("podtemplates"). Body(podTemplate). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *podTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTempla Resource("podtemplates"). Name(podTemplate.Name). Body(podTemplate). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *podTemplates) Delete(name string, options *metav1.DeleteOptions) error Resource("podtemplates"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *podTemplates) DeleteCollection(options *metav1.DeleteOptions, listOptio VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/replicationcontroller.go b/kubernetes/typed/core/v1/replicationcontroller.go index dd3182db..2c264713 100644 --- a/kubernetes/typed/core/v1/replicationcontroller.go +++ b/kubernetes/typed/core/v1/replicationcontroller.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" autoscalingv1 "k8s.io/api/autoscaling/v1" @@ -75,7 +76,7 @@ func (c *replicationControllers) Get(name string, options metav1.GetOptions) (re Resource("replicationcontrollers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -92,7 +93,7 @@ func (c *replicationControllers) List(opts metav1.ListOptions) (result *v1.Repli Resource("replicationcontrollers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -109,7 +110,7 @@ func (c *replicationControllers) Watch(opts metav1.ListOptions) (watch.Interface Resource("replicationcontrollers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any. @@ -119,7 +120,7 @@ func (c *replicationControllers) Create(replicationController *v1.ReplicationCon Namespace(c.ns). Resource("replicationcontrollers"). Body(replicationController). - Do(). + Do(context.TODO()). Into(result) return } @@ -132,7 +133,7 @@ func (c *replicationControllers) Update(replicationController *v1.ReplicationCon Resource("replicationcontrollers"). Name(replicationController.Name). Body(replicationController). - Do(). + Do(context.TODO()). Into(result) return } @@ -148,7 +149,7 @@ func (c *replicationControllers) UpdateStatus(replicationController *v1.Replicat Name(replicationController.Name). SubResource("status"). Body(replicationController). - Do(). + Do(context.TODO()). Into(result) return } @@ -160,7 +161,7 @@ func (c *replicationControllers) Delete(name string, options *metav1.DeleteOptio Resource("replicationcontrollers"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -176,7 +177,7 @@ func (c *replicationControllers) DeleteCollection(options *metav1.DeleteOptions, VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -189,7 +190,7 @@ func (c *replicationControllers) Patch(name string, pt types.PatchType, data []b SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } @@ -203,7 +204,7 @@ func (c *replicationControllers) GetScale(replicationControllerName string, opti Name(replicationControllerName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -217,7 +218,7 @@ func (c *replicationControllers) UpdateScale(replicationControllerName string, s Name(replicationControllerName). SubResource("scale"). Body(scale). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/resourcequota.go b/kubernetes/typed/core/v1/resourcequota.go index 5a178990..a3c451a6 100644 --- a/kubernetes/typed/core/v1/resourcequota.go +++ b/kubernetes/typed/core/v1/resourcequota.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -71,7 +72,7 @@ func (c *resourceQuotas) Get(name string, options metav1.GetOptions) (result *v1 Resource("resourcequotas"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *resourceQuotas) List(opts metav1.ListOptions) (result *v1.ResourceQuota Resource("resourcequotas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *resourceQuotas) Watch(opts metav1.ListOptions) (watch.Interface, error) Resource("resourcequotas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *resourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1.Res Namespace(c.ns). Resource("resourcequotas"). Body(resourceQuota). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *resourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.Res Resource("resourcequotas"). Name(resourceQuota.Name). Body(resourceQuota). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result * Name(resourceQuota.Name). SubResource("status"). Body(resourceQuota). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *resourceQuotas) Delete(name string, options *metav1.DeleteOptions) erro Resource("resourcequotas"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *resourceQuotas) DeleteCollection(options *metav1.DeleteOptions, listOpt VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, sub SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/secret.go b/kubernetes/typed/core/v1/secret.go index 85c143b1..561c04d4 100644 --- a/kubernetes/typed/core/v1/secret.go +++ b/kubernetes/typed/core/v1/secret.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -70,7 +71,7 @@ func (c *secrets) Get(name string, options metav1.GetOptions) (result *v1.Secret Resource("secrets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *secrets) List(opts metav1.ListOptions) (result *v1.SecretList, err erro Resource("secrets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *secrets) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("secrets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *secrets) Create(secret *v1.Secret) (result *v1.Secret, err error) { Namespace(c.ns). Resource("secrets"). Body(secret). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { Resource("secrets"). Name(secret.Name). Body(secret). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *secrets) Delete(name string, options *metav1.DeleteOptions) error { Resource("secrets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *secrets) DeleteCollection(options *metav1.DeleteOptions, listOptions me VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresourc SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/service.go b/kubernetes/typed/core/v1/service.go index b0e09413..84994772 100644 --- a/kubernetes/typed/core/v1/service.go +++ b/kubernetes/typed/core/v1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -70,7 +71,7 @@ func (c *services) Get(name string, options metav1.GetOptions) (result *v1.Servi Resource("services"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *services) List(opts metav1.ListOptions) (result *v1.ServiceList, err er Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *services) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("services"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *services) Create(service *v1.Service) (result *v1.Service, err error) { Namespace(c.ns). Resource("services"). Body(service). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *services) Update(service *v1.Service) (result *v1.Service, err error) { Resource("services"). Name(service.Name). Body(service). - Do(). + Do(context.TODO()). Into(result) return } @@ -143,7 +144,7 @@ func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err er Name(service.Name). SubResource("status"). Body(service). - Do(). + Do(context.TODO()). Into(result) return } @@ -155,7 +156,7 @@ func (c *services) Delete(name string, options *metav1.DeleteOptions) error { Resource("services"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *services) Patch(name string, pt types.PatchType, data []byte, subresour SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/serviceaccount.go b/kubernetes/typed/core/v1/serviceaccount.go index 50af6a21..2b12f8ab 100644 --- a/kubernetes/typed/core/v1/serviceaccount.go +++ b/kubernetes/typed/core/v1/serviceaccount.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/core/v1" @@ -70,7 +71,7 @@ func (c *serviceAccounts) Get(name string, options metav1.GetOptions) (result *v Resource("serviceaccounts"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *serviceAccounts) List(opts metav1.ListOptions) (result *v1.ServiceAccou Resource("serviceaccounts"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *serviceAccounts) Watch(opts metav1.ListOptions) (watch.Interface, error Resource("serviceaccounts"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *serviceAccounts) Create(serviceAccount *v1.ServiceAccount) (result *v1. Namespace(c.ns). Resource("serviceaccounts"). Body(serviceAccount). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *serviceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1. Resource("serviceaccounts"). Name(serviceAccount.Name). Body(serviceAccount). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *serviceAccounts) Delete(name string, options *metav1.DeleteOptions) err Resource("serviceaccounts"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *serviceAccounts) DeleteCollection(options *metav1.DeleteOptions, listOp VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, su SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/core/v1/serviceaccount_expansion.go b/kubernetes/typed/core/v1/serviceaccount_expansion.go index eaf643f1..956a9878 100644 --- a/kubernetes/typed/core/v1/serviceaccount_expansion.go +++ b/kubernetes/typed/core/v1/serviceaccount_expansion.go @@ -17,6 +17,8 @@ limitations under the License. package v1 import ( + "context" + authenticationv1 "k8s.io/api/authentication/v1" ) @@ -35,7 +37,7 @@ func (c *serviceAccounts) CreateToken(name string, tr *authenticationv1.TokenReq SubResource("token"). Name(name). Body(tr). - Do(). + Do(context.TODO()). Into(result) return result, err } diff --git a/kubernetes/typed/discovery/v1alpha1/endpointslice.go b/kubernetes/typed/discovery/v1alpha1/endpointslice.go index 41751476..1c6a34cf 100644 --- a/kubernetes/typed/discovery/v1alpha1/endpointslice.go +++ b/kubernetes/typed/discovery/v1alpha1/endpointslice.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/discovery/v1alpha1" @@ -70,7 +71,7 @@ func (c *endpointSlices) Get(name string, options v1.GetOptions) (result *v1alph Resource("endpointslices"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *endpointSlices) List(opts v1.ListOptions) (result *v1alpha1.EndpointSli Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *endpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *endpointSlices) Create(endpointSlice *v1alpha1.EndpointSlice) (result * Namespace(c.ns). Resource("endpointslices"). Body(endpointSlice). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *endpointSlices) Update(endpointSlice *v1alpha1.EndpointSlice) (result * Resource("endpointslices"). Name(endpointSlice.Name). Body(endpointSlice). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *endpointSlices) Delete(name string, options *v1.DeleteOptions) error { Resource("endpointslices"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *endpointSlices) DeleteCollection(options *v1.DeleteOptions, listOptions VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *endpointSlices) Patch(name string, pt types.PatchType, data []byte, sub SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/discovery/v1beta1/endpointslice.go b/kubernetes/typed/discovery/v1beta1/endpointslice.go index bba656b8..9182655f 100644 --- a/kubernetes/typed/discovery/v1beta1/endpointslice.go +++ b/kubernetes/typed/discovery/v1beta1/endpointslice.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/discovery/v1beta1" @@ -70,7 +71,7 @@ func (c *endpointSlices) Get(name string, options v1.GetOptions) (result *v1beta Resource("endpointslices"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *endpointSlices) List(opts v1.ListOptions) (result *v1beta1.EndpointSlic Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *endpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("endpointslices"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *endpointSlices) Create(endpointSlice *v1beta1.EndpointSlice) (result *v Namespace(c.ns). Resource("endpointslices"). Body(endpointSlice). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *endpointSlices) Update(endpointSlice *v1beta1.EndpointSlice) (result *v Resource("endpointslices"). Name(endpointSlice.Name). Body(endpointSlice). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *endpointSlices) Delete(name string, options *v1.DeleteOptions) error { Resource("endpointslices"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *endpointSlices) DeleteCollection(options *v1.DeleteOptions, listOptions VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *endpointSlices) Patch(name string, pt types.PatchType, data []byte, sub SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/events/v1beta1/event.go b/kubernetes/typed/events/v1beta1/event.go index 143281b2..7f2600fe 100644 --- a/kubernetes/typed/events/v1beta1/event.go +++ b/kubernetes/typed/events/v1beta1/event.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/events/v1beta1" @@ -70,7 +71,7 @@ func (c *events) Get(name string, options v1.GetOptions) (result *v1beta1.Event, Resource("events"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *events) List(opts v1.ListOptions) (result *v1beta1.EventList, err error Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("events"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *events) Create(event *v1beta1.Event) (result *v1beta1.Event, err error) Namespace(c.ns). Resource("events"). Body(event). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *events) Update(event *v1beta1.Event) (result *v1beta1.Event, err error) Resource("events"). Name(event.Name). Body(event). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *events) Delete(name string, options *v1.DeleteOptions) error { Resource("events"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.List VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *events) Patch(name string, pt types.PatchType, data []byte, subresource SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/events/v1beta1/event_expansion.go b/kubernetes/typed/events/v1beta1/event_expansion.go index 312ee428..e0ae41df 100644 --- a/kubernetes/typed/events/v1beta1/event_expansion.go +++ b/kubernetes/typed/events/v1beta1/event_expansion.go @@ -17,6 +17,7 @@ limitations under the License. package v1beta1 import ( + "context" "fmt" "k8s.io/api/events/v1beta1" @@ -51,7 +52,7 @@ func (e *events) CreateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0). Resource("events"). Body(event). - Do(). + Do(context.TODO()). Into(result) return result, err } @@ -72,7 +73,7 @@ func (e *events) UpdateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, Resource("events"). Name(event.Name). Body(event). - Do(). + Do(context.TODO()). Into(result) return result, err } @@ -92,7 +93,7 @@ func (e *events) PatchWithEventNamespace(event *v1beta1.Event, data []byte) (*v1 Resource("events"). Name(event.Name). Body(data). - Do(). + Do(context.TODO()). Into(result) return result, err } diff --git a/kubernetes/typed/extensions/v1beta1/daemonset.go b/kubernetes/typed/extensions/v1beta1/daemonset.go index 93b1ae9b..a3d50efa 100644 --- a/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/kubernetes/typed/extensions/v1beta1/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -71,7 +72,7 @@ func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.Da Resource("daemonsets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("daemonsets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *daemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.Daemo Namespace(c.ns). Resource("daemonsets"). Body(daemonSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *daemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.Daemo Resource("daemonsets"). Name(daemonSet.Name). Body(daemonSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *daemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (result *v1beta1 Name(daemonSet.Name). SubResource("status"). Body(daemonSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error { Resource("daemonsets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1. VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subreso SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/extensions/v1beta1/deployment.go b/kubernetes/typed/extensions/v1beta1/deployment.go index 5557b9f2..990e7ca3 100644 --- a/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/kubernetes/typed/extensions/v1beta1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -74,7 +75,7 @@ func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.D Resource("deployments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -91,7 +92,7 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -108,7 +109,7 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("deployments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. @@ -118,7 +119,7 @@ func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.De Namespace(c.ns). Resource("deployments"). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.De Resource("deployments"). Name(deployment.Name). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1be Name(deployment.Name). SubResource("status"). Body(deployment). - Do(). + Do(context.TODO()). Into(result) return } @@ -159,7 +160,7 @@ func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { Resource("deployments"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -175,7 +176,7 @@ func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1 VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -188,7 +189,7 @@ func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subres SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } @@ -202,7 +203,7 @@ func (c *deployments) GetScale(deploymentName string, options v1.GetOptions) (re Name(deploymentName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -216,7 +217,7 @@ func (c *deployments) UpdateScale(deploymentName string, scale *v1beta1.Scale) ( Name(deploymentName). SubResource("scale"). Body(scale). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/extensions/v1beta1/deployment_expansion.go b/kubernetes/typed/extensions/v1beta1/deployment_expansion.go index 24734be6..1b3df8c0 100644 --- a/kubernetes/typed/extensions/v1beta1/deployment_expansion.go +++ b/kubernetes/typed/extensions/v1beta1/deployment_expansion.go @@ -16,7 +16,11 @@ limitations under the License. package v1beta1 -import "k8s.io/api/extensions/v1beta1" +import ( + "context" + + "k8s.io/api/extensions/v1beta1" +) // The DeploymentExpansion interface allows manually adding extra methods to the DeploymentInterface. type DeploymentExpansion interface { @@ -25,5 +29,5 @@ type DeploymentExpansion interface { // Rollback applied the provided DeploymentRollback to the named deployment in the current namespace. func (c *deployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error { - return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).SubResource("rollback").Body(deploymentRollback).Do().Error() + return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).SubResource("rollback").Body(deploymentRollback).Do(context.TODO()).Error() } diff --git a/kubernetes/typed/extensions/v1beta1/ingress.go b/kubernetes/typed/extensions/v1beta1/ingress.go index 4da51c36..684dba20 100644 --- a/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/kubernetes/typed/extensions/v1beta1/ingress.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -71,7 +72,7 @@ func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ing Resource("ingresses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *ingresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, e Namespace(c.ns). Resource("ingresses"). Body(ingress). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *ingresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, e Resource("ingresses"). Name(ingress.Name). Body(ingress). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingr Name(ingress.Name). SubResource("status"). Body(ingress). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error { Resource("ingresses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresou SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/extensions/v1beta1/networkpolicy.go b/kubernetes/typed/extensions/v1beta1/networkpolicy.go index 0607e2dd..2e04a760 100644 --- a/kubernetes/typed/extensions/v1beta1/networkpolicy.go +++ b/kubernetes/typed/extensions/v1beta1/networkpolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -70,7 +71,7 @@ func (c *networkPolicies) Get(name string, options v1.GetOptions) (result *v1bet Resource("networkpolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *networkPolicies) List(opts v1.ListOptions) (result *v1beta1.NetworkPoli Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *networkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *networkPolicies) Create(networkPolicy *v1beta1.NetworkPolicy) (result * Namespace(c.ns). Resource("networkpolicies"). Body(networkPolicy). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *networkPolicies) Update(networkPolicy *v1beta1.NetworkPolicy) (result * Resource("networkpolicies"). Name(networkPolicy.Name). Body(networkPolicy). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *networkPolicies) Delete(name string, options *v1.DeleteOptions) error { Resource("networkpolicies"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *networkPolicies) DeleteCollection(options *v1.DeleteOptions, listOption VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, su SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go index a947a54a..9f4eff6d 100644 --- a/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -67,7 +68,7 @@ func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v Resource("podsecuritypolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecu Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *podSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolic err = c.client.Post(). Resource("podsecuritypolicies"). Body(podSecurityPolicy). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *podSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolic Resource("podsecuritypolicies"). Name(podSecurityPolicy.Name). Body(podSecurityPolicy). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) err Resource("podsecuritypolicies"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOp VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/extensions/v1beta1/replicaset.go b/kubernetes/typed/extensions/v1beta1/replicaset.go index 44402905..cba24155 100644 --- a/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/kubernetes/typed/extensions/v1beta1/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/extensions/v1beta1" @@ -74,7 +75,7 @@ func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.R Resource("replicasets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -91,7 +92,7 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -108,7 +109,7 @@ func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("replicasets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. @@ -118,7 +119,7 @@ func (c *replicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.Re Namespace(c.ns). Resource("replicasets"). Body(replicaSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *replicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.Re Resource("replicasets"). Name(replicaSet.Name). Body(replicaSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (result *v1be Name(replicaSet.Name). SubResource("status"). Body(replicaSet). - Do(). + Do(context.TODO()). Into(result) return } @@ -159,7 +160,7 @@ func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error { Resource("replicasets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -175,7 +176,7 @@ func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1 VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -188,7 +189,7 @@ func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subres SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } @@ -202,7 +203,7 @@ func (c *replicaSets) GetScale(replicaSetName string, options v1.GetOptions) (re Name(replicaSetName). SubResource("scale"). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -216,7 +217,7 @@ func (c *replicaSets) UpdateScale(replicaSetName string, scale *v1beta1.Scale) ( Name(replicaSetName). SubResource("scale"). Body(scale). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go b/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go index db71d29a..eb0f1ee5 100644 --- a/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go +++ b/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -68,7 +69,7 @@ func (c *flowSchemas) Get(name string, options v1.GetOptions) (result *v1alpha1. Resource("flowschemas"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -84,7 +85,7 @@ func (c *flowSchemas) List(opts v1.ListOptions) (result *v1alpha1.FlowSchemaList Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -100,7 +101,7 @@ func (c *flowSchemas) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("flowschemas"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any. @@ -109,7 +110,7 @@ func (c *flowSchemas) Create(flowSchema *v1alpha1.FlowSchema) (result *v1alpha1. err = c.client.Post(). Resource("flowschemas"). Body(flowSchema). - Do(). + Do(context.TODO()). Into(result) return } @@ -121,7 +122,7 @@ func (c *flowSchemas) Update(flowSchema *v1alpha1.FlowSchema) (result *v1alpha1. Resource("flowschemas"). Name(flowSchema.Name). Body(flowSchema). - Do(). + Do(context.TODO()). Into(result) return } @@ -136,7 +137,7 @@ func (c *flowSchemas) UpdateStatus(flowSchema *v1alpha1.FlowSchema) (result *v1a Name(flowSchema.Name). SubResource("status"). Body(flowSchema). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *flowSchemas) Delete(name string, options *v1.DeleteOptions) error { Resource("flowschemas"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -162,7 +163,7 @@ func (c *flowSchemas) DeleteCollection(options *v1.DeleteOptions, listOptions v1 VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -174,7 +175,7 @@ func (c *flowSchemas) Patch(name string, pt types.PatchType, data []byte, subres SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go index eb99cca6..c474c1cd 100644 --- a/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -68,7 +69,7 @@ func (c *priorityLevelConfigurations) Get(name string, options v1.GetOptions) (r Resource("prioritylevelconfigurations"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -84,7 +85,7 @@ func (c *priorityLevelConfigurations) List(opts v1.ListOptions) (result *v1alpha Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -100,7 +101,7 @@ func (c *priorityLevelConfigurations) Watch(opts v1.ListOptions) (watch.Interfac Resource("prioritylevelconfigurations"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any. @@ -109,7 +110,7 @@ func (c *priorityLevelConfigurations) Create(priorityLevelConfiguration *v1alpha err = c.client.Post(). Resource("prioritylevelconfigurations"). Body(priorityLevelConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -121,7 +122,7 @@ func (c *priorityLevelConfigurations) Update(priorityLevelConfiguration *v1alpha Resource("prioritylevelconfigurations"). Name(priorityLevelConfiguration.Name). Body(priorityLevelConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -136,7 +137,7 @@ func (c *priorityLevelConfigurations) UpdateStatus(priorityLevelConfiguration *v Name(priorityLevelConfiguration.Name). SubResource("status"). Body(priorityLevelConfiguration). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *priorityLevelConfigurations) Delete(name string, options *v1.DeleteOpti Resource("prioritylevelconfigurations"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -162,7 +163,7 @@ func (c *priorityLevelConfigurations) DeleteCollection(options *v1.DeleteOptions VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -174,7 +175,7 @@ func (c *priorityLevelConfigurations) Patch(name string, pt types.PatchType, dat SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/networking/v1/networkpolicy.go b/kubernetes/typed/networking/v1/networkpolicy.go index 3f39be95..32bcf3a1 100644 --- a/kubernetes/typed/networking/v1/networkpolicy.go +++ b/kubernetes/typed/networking/v1/networkpolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/networking/v1" @@ -70,7 +71,7 @@ func (c *networkPolicies) Get(name string, options metav1.GetOptions) (result *v Resource("networkpolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *networkPolicies) List(opts metav1.ListOptions) (result *v1.NetworkPolic Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *networkPolicies) Watch(opts metav1.ListOptions) (watch.Interface, error Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *networkPolicies) Create(networkPolicy *v1.NetworkPolicy) (result *v1.Ne Namespace(c.ns). Resource("networkpolicies"). Body(networkPolicy). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *networkPolicies) Update(networkPolicy *v1.NetworkPolicy) (result *v1.Ne Resource("networkpolicies"). Name(networkPolicy.Name). Body(networkPolicy). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *networkPolicies) Delete(name string, options *metav1.DeleteOptions) err Resource("networkpolicies"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *networkPolicies) DeleteCollection(options *metav1.DeleteOptions, listOp VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, su SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/networking/v1beta1/ingress.go b/kubernetes/typed/networking/v1beta1/ingress.go index 8d76678f..b8c9ca9b 100644 --- a/kubernetes/typed/networking/v1beta1/ingress.go +++ b/kubernetes/typed/networking/v1beta1/ingress.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/networking/v1beta1" @@ -71,7 +72,7 @@ func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ing Resource("ingresses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("ingresses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *ingresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, e Namespace(c.ns). Resource("ingresses"). Body(ingress). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *ingresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, e Resource("ingresses"). Name(ingress.Name). Body(ingress). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingr Name(ingress.Name). SubResource("status"). Body(ingress). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error { Resource("ingresses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresou SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/node/v1alpha1/runtimeclass.go b/kubernetes/typed/node/v1alpha1/runtimeclass.go index 044460ec..5df462f4 100644 --- a/kubernetes/typed/node/v1alpha1/runtimeclass.go +++ b/kubernetes/typed/node/v1alpha1/runtimeclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/node/v1alpha1" @@ -67,7 +68,7 @@ func (c *runtimeClasses) Get(name string, options v1.GetOptions) (result *v1alph Resource("runtimeclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *runtimeClasses) List(opts v1.ListOptions) (result *v1alpha1.RuntimeClas Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *runtimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *runtimeClasses) Create(runtimeClass *v1alpha1.RuntimeClass) (result *v1 err = c.client.Post(). Resource("runtimeclasses"). Body(runtimeClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *runtimeClasses) Update(runtimeClass *v1alpha1.RuntimeClass) (result *v1 Resource("runtimeclasses"). Name(runtimeClass.Name). Body(runtimeClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *runtimeClasses) Delete(name string, options *v1.DeleteOptions) error { Resource("runtimeclasses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *runtimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *runtimeClasses) Patch(name string, pt types.PatchType, data []byte, sub SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/node/v1beta1/runtimeclass.go b/kubernetes/typed/node/v1beta1/runtimeclass.go index b3f7c497..67357329 100644 --- a/kubernetes/typed/node/v1beta1/runtimeclass.go +++ b/kubernetes/typed/node/v1beta1/runtimeclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/node/v1beta1" @@ -67,7 +68,7 @@ func (c *runtimeClasses) Get(name string, options v1.GetOptions) (result *v1beta Resource("runtimeclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *runtimeClasses) List(opts v1.ListOptions) (result *v1beta1.RuntimeClass Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *runtimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("runtimeclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *runtimeClasses) Create(runtimeClass *v1beta1.RuntimeClass) (result *v1b err = c.client.Post(). Resource("runtimeclasses"). Body(runtimeClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *runtimeClasses) Update(runtimeClass *v1beta1.RuntimeClass) (result *v1b Resource("runtimeclasses"). Name(runtimeClass.Name). Body(runtimeClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *runtimeClasses) Delete(name string, options *v1.DeleteOptions) error { Resource("runtimeclasses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *runtimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *runtimeClasses) Patch(name string, pt types.PatchType, data []byte, sub SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/policy/v1beta1/eviction_expansion.go b/kubernetes/typed/policy/v1beta1/eviction_expansion.go index 40bad265..9fd2eb8f 100644 --- a/kubernetes/typed/policy/v1beta1/eviction_expansion.go +++ b/kubernetes/typed/policy/v1beta1/eviction_expansion.go @@ -17,6 +17,8 @@ limitations under the License. package v1beta1 import ( + "context" + policy "k8s.io/api/policy/v1beta1" ) @@ -33,6 +35,6 @@ func (c *evictions) Evict(eviction *policy.Eviction) error { Name(eviction.Name). SubResource("eviction"). Body(eviction). - Do(). + Do(context.TODO()). Error() } diff --git a/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index 864af9a2..1e29f88e 100644 --- a/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go +++ b/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/policy/v1beta1" @@ -71,7 +72,7 @@ func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result * Resource("poddisruptionbudgets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -88,7 +89,7 @@ func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDis Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -105,7 +106,7 @@ func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, erro Resource("poddisruptionbudgets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. @@ -115,7 +116,7 @@ func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1beta1.PodDisruption Namespace(c.ns). Resource("poddisruptionbudgets"). Body(podDisruptionBudget). - Do(). + Do(context.TODO()). Into(result) return } @@ -128,7 +129,7 @@ func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1beta1.PodDisruption Resource("poddisruptionbudgets"). Name(podDisruptionBudget.Name). Body(podDisruptionBudget). - Do(). + Do(context.TODO()). Into(result) return } @@ -144,7 +145,7 @@ func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1beta1.PodDisr Name(podDisruptionBudget.Name). SubResource("status"). Body(podDisruptionBudget). - Do(). + Do(context.TODO()). Into(result) return } @@ -156,7 +157,7 @@ func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) er Resource("poddisruptionbudgets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -172,7 +173,7 @@ func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listO VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -185,7 +186,7 @@ func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byt SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go b/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go index d02096d7..a4896a1f 100644 --- a/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go +++ b/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/policy/v1beta1" @@ -67,7 +68,7 @@ func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v Resource("podsecuritypolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecu Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error Resource("podsecuritypolicies"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *podSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolic err = c.client.Post(). Resource("podsecuritypolicies"). Body(podSecurityPolicy). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *podSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolic Resource("podsecuritypolicies"). Name(podSecurityPolicy.Name). Body(podSecurityPolicy). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) err Resource("podsecuritypolicies"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOp VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1/clusterrole.go b/kubernetes/typed/rbac/v1/clusterrole.go index 0a47c441..f120846d 100644 --- a/kubernetes/typed/rbac/v1/clusterrole.go +++ b/kubernetes/typed/rbac/v1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/rbac/v1" @@ -67,7 +68,7 @@ func (c *clusterRoles) Get(name string, options metav1.GetOptions) (result *v1.C Resource("clusterroles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *clusterRoles) List(opts metav1.ListOptions) (result *v1.ClusterRoleList Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *clusterRoles) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *clusterRoles) Create(clusterRole *v1.ClusterRole) (result *v1.ClusterRo err = c.client.Post(). Resource("clusterroles"). Body(clusterRole). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *clusterRoles) Update(clusterRole *v1.ClusterRole) (result *v1.ClusterRo Resource("clusterroles"). Name(clusterRole.Name). Body(clusterRole). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *clusterRoles) Delete(name string, options *metav1.DeleteOptions) error Resource("clusterroles"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *clusterRoles) DeleteCollection(options *metav1.DeleteOptions, listOptio VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1/clusterrolebinding.go b/kubernetes/typed/rbac/v1/clusterrolebinding.go index c16ebc31..56733888 100644 --- a/kubernetes/typed/rbac/v1/clusterrolebinding.go +++ b/kubernetes/typed/rbac/v1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/rbac/v1" @@ -67,7 +68,7 @@ func (c *clusterRoleBindings) Get(name string, options metav1.GetOptions) (resul Resource("clusterrolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *clusterRoleBindings) List(opts metav1.ListOptions) (result *v1.ClusterR Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *clusterRoleBindings) Watch(opts metav1.ListOptions) (watch.Interface, e Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *clusterRoleBindings) Create(clusterRoleBinding *v1.ClusterRoleBinding) err = c.client.Post(). Resource("clusterrolebindings"). Body(clusterRoleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *clusterRoleBindings) Update(clusterRoleBinding *v1.ClusterRoleBinding) Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). Body(clusterRoleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *clusterRoleBindings) Delete(name string, options *metav1.DeleteOptions) Resource("clusterrolebindings"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *clusterRoleBindings) DeleteCollection(options *metav1.DeleteOptions, li VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1/role.go b/kubernetes/typed/rbac/v1/role.go index a17d791f..6e578c1c 100644 --- a/kubernetes/typed/rbac/v1/role.go +++ b/kubernetes/typed/rbac/v1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/rbac/v1" @@ -70,7 +71,7 @@ func (c *roles) Get(name string, options metav1.GetOptions) (result *v1.Role, er Resource("roles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *roles) List(opts metav1.ListOptions) (result *v1.RoleList, err error) { Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *roles) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *roles) Create(role *v1.Role) (result *v1.Role, err error) { Namespace(c.ns). Resource("roles"). Body(role). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *roles) Update(role *v1.Role) (result *v1.Role, err error) { Resource("roles"). Name(role.Name). Body(role). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *roles) Delete(name string, options *metav1.DeleteOptions) error { Resource("roles"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *roles) DeleteCollection(options *metav1.DeleteOptions, listOptions meta VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1/rolebinding.go b/kubernetes/typed/rbac/v1/rolebinding.go index c87e4571..043e42cd 100644 --- a/kubernetes/typed/rbac/v1/rolebinding.go +++ b/kubernetes/typed/rbac/v1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/rbac/v1" @@ -70,7 +71,7 @@ func (c *roleBindings) Get(name string, options metav1.GetOptions) (result *v1.R Resource("rolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *roleBindings) List(opts metav1.ListOptions) (result *v1.RoleBindingList Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *roleBindings) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *roleBindings) Create(roleBinding *v1.RoleBinding) (result *v1.RoleBindi Namespace(c.ns). Resource("rolebindings"). Body(roleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *roleBindings) Update(roleBinding *v1.RoleBinding) (result *v1.RoleBindi Resource("rolebindings"). Name(roleBinding.Name). Body(roleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *roleBindings) Delete(name string, options *metav1.DeleteOptions) error Resource("rolebindings"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *roleBindings) DeleteCollection(options *metav1.DeleteOptions, listOptio VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/kubernetes/typed/rbac/v1alpha1/clusterrole.go index 77e66877..c8166800 100644 --- a/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/kubernetes/typed/rbac/v1alpha1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -67,7 +68,7 @@ func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1 Resource("clusterroles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleLi Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *clusterRoles) Create(clusterRole *v1alpha1.ClusterRole) (result *v1alph err = c.client.Post(). Resource("clusterroles"). Body(clusterRole). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *clusterRoles) Update(clusterRole *v1alpha1.ClusterRole) (result *v1alph Resource("clusterroles"). Name(clusterRole.Name). Body(clusterRole). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { Resource("clusterroles"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index 0d1b9d20..bcc0e311 100644 --- a/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -67,7 +68,7 @@ func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v Resource("clusterrolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cluste Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *clusterRoleBindings) Create(clusterRoleBinding *v1alpha1.ClusterRoleBin err = c.client.Post(). Resource("clusterrolebindings"). Body(clusterRoleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *clusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBin Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). Body(clusterRoleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) err Resource("clusterrolebindings"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOp VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1alpha1/role.go b/kubernetes/typed/rbac/v1alpha1/role.go index 4a4b6724..a8ce05bc 100644 --- a/kubernetes/typed/rbac/v1alpha1/role.go +++ b/kubernetes/typed/rbac/v1alpha1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -70,7 +71,7 @@ func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, Resource("roles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *roles) Create(role *v1alpha1.Role) (result *v1alpha1.Role, err error) { Namespace(c.ns). Resource("roles"). Body(role). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *roles) Update(role *v1alpha1.Role) (result *v1alpha1.Role, err error) { Resource("roles"). Name(role.Name). Body(role). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *roles) Delete(name string, options *v1.DeleteOptions) error { Resource("roles"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListO VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/kubernetes/typed/rbac/v1alpha1/rolebinding.go index bf4e5a10..a7b72cb8 100644 --- a/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/kubernetes/typed/rbac/v1alpha1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -70,7 +71,7 @@ func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1 Resource("rolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingLi Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *roleBindings) Create(roleBinding *v1alpha1.RoleBinding) (result *v1alph Namespace(c.ns). Resource("rolebindings"). Body(roleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *roleBindings) Update(roleBinding *v1alpha1.RoleBinding) (result *v1alph Resource("rolebindings"). Name(roleBinding.Name). Body(roleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { Resource("rolebindings"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1beta1/clusterrole.go b/kubernetes/typed/rbac/v1beta1/clusterrole.go index 21d3cab3..7baf553e 100644 --- a/kubernetes/typed/rbac/v1beta1/clusterrole.go +++ b/kubernetes/typed/rbac/v1beta1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/rbac/v1beta1" @@ -67,7 +68,7 @@ func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1. Resource("clusterroles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleLis Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("clusterroles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *clusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1 err = c.client.Post(). Resource("clusterroles"). Body(clusterRole). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *clusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1 Resource("clusterroles"). Name(clusterRole.Name). Body(clusterRole). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { Resource("clusterroles"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go index 47eb9e4e..d92a534f 100644 --- a/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go +++ b/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/rbac/v1beta1" @@ -67,7 +68,7 @@ func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v Resource("clusterrolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.Cluster Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error Resource("clusterrolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *clusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBind err = c.client.Post(). Resource("clusterrolebindings"). Body(clusterRoleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *clusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBind Resource("clusterrolebindings"). Name(clusterRoleBinding.Name). Body(clusterRoleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) err Resource("clusterrolebindings"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOp VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1beta1/role.go b/kubernetes/typed/rbac/v1beta1/role.go index 2b61aad5..00709bd0 100644 --- a/kubernetes/typed/rbac/v1beta1/role.go +++ b/kubernetes/typed/rbac/v1beta1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/rbac/v1beta1" @@ -70,7 +71,7 @@ func (c *roles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, e Resource("roles"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("roles"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *roles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) { Namespace(c.ns). Resource("roles"). Body(role). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *roles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) { Resource("roles"). Name(role.Name). Body(role). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *roles) Delete(name string, options *v1.DeleteOptions) error { Resource("roles"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListO VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/rbac/v1beta1/rolebinding.go b/kubernetes/typed/rbac/v1beta1/rolebinding.go index 0bd118fd..aab99a5d 100644 --- a/kubernetes/typed/rbac/v1beta1/rolebinding.go +++ b/kubernetes/typed/rbac/v1beta1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/rbac/v1beta1" @@ -70,7 +71,7 @@ func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1beta1. Resource("rolebindings"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingLis Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("rolebindings"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *roleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1 Namespace(c.ns). Resource("rolebindings"). Body(roleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *roleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1 Resource("rolebindings"). Name(roleBinding.Name). Body(roleBinding). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { Resource("rolebindings"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subre SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/scheduling/v1/priorityclass.go b/kubernetes/typed/scheduling/v1/priorityclass.go index 3abbb7b8..d1d8a1e6 100644 --- a/kubernetes/typed/scheduling/v1/priorityclass.go +++ b/kubernetes/typed/scheduling/v1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/scheduling/v1" @@ -67,7 +68,7 @@ func (c *priorityClasses) Get(name string, options metav1.GetOptions) (result *v Resource("priorityclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *priorityClasses) List(opts metav1.ListOptions) (result *v1.PriorityClas Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *priorityClasses) Watch(opts metav1.ListOptions) (watch.Interface, error Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *priorityClasses) Create(priorityClass *v1.PriorityClass) (result *v1.Pr err = c.client.Post(). Resource("priorityclasses"). Body(priorityClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *priorityClasses) Update(priorityClass *v1.PriorityClass) (result *v1.Pr Resource("priorityclasses"). Name(priorityClass.Name). Body(priorityClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *priorityClasses) Delete(name string, options *metav1.DeleteOptions) err Resource("priorityclasses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *priorityClasses) DeleteCollection(options *metav1.DeleteOptions, listOp VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *priorityClasses) Patch(name string, pt types.PatchType, data []byte, su SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/scheduling/v1alpha1/priorityclass.go b/kubernetes/typed/scheduling/v1alpha1/priorityclass.go index 29d646fb..42f3fbe5 100644 --- a/kubernetes/typed/scheduling/v1alpha1/priorityclass.go +++ b/kubernetes/typed/scheduling/v1alpha1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/scheduling/v1alpha1" @@ -67,7 +68,7 @@ func (c *priorityClasses) Get(name string, options v1.GetOptions) (result *v1alp Resource("priorityclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *priorityClasses) List(opts v1.ListOptions) (result *v1alpha1.PriorityCl Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *priorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *priorityClasses) Create(priorityClass *v1alpha1.PriorityClass) (result err = c.client.Post(). Resource("priorityclasses"). Body(priorityClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *priorityClasses) Update(priorityClass *v1alpha1.PriorityClass) (result Resource("priorityclasses"). Name(priorityClass.Name). Body(priorityClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *priorityClasses) Delete(name string, options *v1.DeleteOptions) error { Resource("priorityclasses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *priorityClasses) DeleteCollection(options *v1.DeleteOptions, listOption VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *priorityClasses) Patch(name string, pt types.PatchType, data []byte, su SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/scheduling/v1beta1/priorityclass.go b/kubernetes/typed/scheduling/v1beta1/priorityclass.go index 5e402f8e..c4fc4b02 100644 --- a/kubernetes/typed/scheduling/v1beta1/priorityclass.go +++ b/kubernetes/typed/scheduling/v1beta1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/scheduling/v1beta1" @@ -67,7 +68,7 @@ func (c *priorityClasses) Get(name string, options v1.GetOptions) (result *v1bet Resource("priorityclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *priorityClasses) List(opts v1.ListOptions) (result *v1beta1.PriorityCla Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *priorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("priorityclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *priorityClasses) Create(priorityClass *v1beta1.PriorityClass) (result * err = c.client.Post(). Resource("priorityclasses"). Body(priorityClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *priorityClasses) Update(priorityClass *v1beta1.PriorityClass) (result * Resource("priorityclasses"). Name(priorityClass.Name). Body(priorityClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *priorityClasses) Delete(name string, options *v1.DeleteOptions) error { Resource("priorityclasses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *priorityClasses) DeleteCollection(options *v1.DeleteOptions, listOption VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *priorityClasses) Patch(name string, pt types.PatchType, data []byte, su SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/settings/v1alpha1/podpreset.go b/kubernetes/typed/settings/v1alpha1/podpreset.go index 8fd6adc5..af7928d2 100644 --- a/kubernetes/typed/settings/v1alpha1/podpreset.go +++ b/kubernetes/typed/settings/v1alpha1/podpreset.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/settings/v1alpha1" @@ -70,7 +71,7 @@ func (c *podPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.P Resource("podpresets"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -87,7 +88,7 @@ func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, Resource("podpresets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -104,7 +105,7 @@ func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("podpresets"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any. @@ -114,7 +115,7 @@ func (c *podPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.Pod Namespace(c.ns). Resource("podpresets"). Body(podPreset). - Do(). + Do(context.TODO()). Into(result) return } @@ -127,7 +128,7 @@ func (c *podPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.Pod Resource("podpresets"). Name(podPreset.Name). Body(podPreset). - Do(). + Do(context.TODO()). Into(result) return } @@ -139,7 +140,7 @@ func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error { Resource("podpresets"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -155,7 +156,7 @@ func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1. VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -168,7 +169,7 @@ func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subreso SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/storage/v1/csinode.go b/kubernetes/typed/storage/v1/csinode.go index 20905417..6066ffaf 100644 --- a/kubernetes/typed/storage/v1/csinode.go +++ b/kubernetes/typed/storage/v1/csinode.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/storage/v1" @@ -67,7 +68,7 @@ func (c *cSINodes) Get(name string, options metav1.GetOptions) (result *v1.CSINo Resource("csinodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *cSINodes) List(opts metav1.ListOptions) (result *v1.CSINodeList, err er Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *cSINodes) Watch(opts metav1.ListOptions) (watch.Interface, error) { Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *cSINodes) Create(cSINode *v1.CSINode) (result *v1.CSINode, err error) { err = c.client.Post(). Resource("csinodes"). Body(cSINode). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *cSINodes) Update(cSINode *v1.CSINode) (result *v1.CSINode, err error) { Resource("csinodes"). Name(cSINode.Name). Body(cSINode). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *cSINodes) Delete(name string, options *metav1.DeleteOptions) error { Resource("csinodes"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *cSINodes) DeleteCollection(options *metav1.DeleteOptions, listOptions m VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *cSINodes) Patch(name string, pt types.PatchType, data []byte, subresour SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/storage/v1/storageclass.go b/kubernetes/typed/storage/v1/storageclass.go index 3f4c48f0..6be2d5e9 100644 --- a/kubernetes/typed/storage/v1/storageclass.go +++ b/kubernetes/typed/storage/v1/storageclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/storage/v1" @@ -67,7 +68,7 @@ func (c *storageClasses) Get(name string, options metav1.GetOptions) (result *v1 Resource("storageclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *storageClasses) List(opts metav1.ListOptions) (result *v1.StorageClassL Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *storageClasses) Watch(opts metav1.ListOptions) (watch.Interface, error) Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *storageClasses) Create(storageClass *v1.StorageClass) (result *v1.Stora err = c.client.Post(). Resource("storageclasses"). Body(storageClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *storageClasses) Update(storageClass *v1.StorageClass) (result *v1.Stora Resource("storageclasses"). Name(storageClass.Name). Body(storageClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *storageClasses) Delete(name string, options *metav1.DeleteOptions) erro Resource("storageclasses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *storageClasses) DeleteCollection(options *metav1.DeleteOptions, listOpt VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, sub SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/storage/v1/volumeattachment.go b/kubernetes/typed/storage/v1/volumeattachment.go index 0f45097b..706caa28 100644 --- a/kubernetes/typed/storage/v1/volumeattachment.go +++ b/kubernetes/typed/storage/v1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" "time" v1 "k8s.io/api/storage/v1" @@ -68,7 +69,7 @@ func (c *volumeAttachments) Get(name string, options metav1.GetOptions) (result Resource("volumeattachments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -84,7 +85,7 @@ func (c *volumeAttachments) List(opts metav1.ListOptions) (result *v1.VolumeAtta Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -100,7 +101,7 @@ func (c *volumeAttachments) Watch(opts metav1.ListOptions) (watch.Interface, err Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. @@ -109,7 +110,7 @@ func (c *volumeAttachments) Create(volumeAttachment *v1.VolumeAttachment) (resul err = c.client.Post(). Resource("volumeattachments"). Body(volumeAttachment). - Do(). + Do(context.TODO()). Into(result) return } @@ -121,7 +122,7 @@ func (c *volumeAttachments) Update(volumeAttachment *v1.VolumeAttachment) (resul Resource("volumeattachments"). Name(volumeAttachment.Name). Body(volumeAttachment). - Do(). + Do(context.TODO()). Into(result) return } @@ -136,7 +137,7 @@ func (c *volumeAttachments) UpdateStatus(volumeAttachment *v1.VolumeAttachment) Name(volumeAttachment.Name). SubResource("status"). Body(volumeAttachment). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *volumeAttachments) Delete(name string, options *metav1.DeleteOptions) e Resource("volumeattachments"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -162,7 +163,7 @@ func (c *volumeAttachments) DeleteCollection(options *metav1.DeleteOptions, list VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -174,7 +175,7 @@ func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/storage/v1alpha1/volumeattachment.go b/kubernetes/typed/storage/v1alpha1/volumeattachment.go index 7fef94e8..c3d28925 100644 --- a/kubernetes/typed/storage/v1alpha1/volumeattachment.go +++ b/kubernetes/typed/storage/v1alpha1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" "time" v1alpha1 "k8s.io/api/storage/v1alpha1" @@ -68,7 +69,7 @@ func (c *volumeAttachments) Get(name string, options v1.GetOptions) (result *v1a Resource("volumeattachments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -84,7 +85,7 @@ func (c *volumeAttachments) List(opts v1.ListOptions) (result *v1alpha1.VolumeAt Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -100,7 +101,7 @@ func (c *volumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. @@ -109,7 +110,7 @@ func (c *volumeAttachments) Create(volumeAttachment *v1alpha1.VolumeAttachment) err = c.client.Post(). Resource("volumeattachments"). Body(volumeAttachment). - Do(). + Do(context.TODO()). Into(result) return } @@ -121,7 +122,7 @@ func (c *volumeAttachments) Update(volumeAttachment *v1alpha1.VolumeAttachment) Resource("volumeattachments"). Name(volumeAttachment.Name). Body(volumeAttachment). - Do(). + Do(context.TODO()). Into(result) return } @@ -136,7 +137,7 @@ func (c *volumeAttachments) UpdateStatus(volumeAttachment *v1alpha1.VolumeAttach Name(volumeAttachment.Name). SubResource("status"). Body(volumeAttachment). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *volumeAttachments) Delete(name string, options *v1.DeleteOptions) error Resource("volumeattachments"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -162,7 +163,7 @@ func (c *volumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOpti VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -174,7 +175,7 @@ func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/storage/v1beta1/csidriver.go b/kubernetes/typed/storage/v1beta1/csidriver.go index 86cf9bf1..97ff0a80 100644 --- a/kubernetes/typed/storage/v1beta1/csidriver.go +++ b/kubernetes/typed/storage/v1beta1/csidriver.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/storage/v1beta1" @@ -67,7 +68,7 @@ func (c *cSIDrivers) Get(name string, options v1.GetOptions) (result *v1beta1.CS Resource("csidrivers"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *cSIDrivers) List(opts v1.ListOptions) (result *v1beta1.CSIDriverList, e Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *cSIDrivers) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("csidrivers"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a cSIDriver and creates it. Returns the server's representation of the cSIDriver, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *cSIDrivers) Create(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDr err = c.client.Post(). Resource("csidrivers"). Body(cSIDriver). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *cSIDrivers) Update(cSIDriver *v1beta1.CSIDriver) (result *v1beta1.CSIDr Resource("csidrivers"). Name(cSIDriver.Name). Body(cSIDriver). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *cSIDrivers) Delete(name string, options *v1.DeleteOptions) error { Resource("csidrivers"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *cSIDrivers) DeleteCollection(options *v1.DeleteOptions, listOptions v1. VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *cSIDrivers) Patch(name string, pt types.PatchType, data []byte, subreso SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/storage/v1beta1/csinode.go b/kubernetes/typed/storage/v1beta1/csinode.go index e5540c12..25312b95 100644 --- a/kubernetes/typed/storage/v1beta1/csinode.go +++ b/kubernetes/typed/storage/v1beta1/csinode.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/storage/v1beta1" @@ -67,7 +68,7 @@ func (c *cSINodes) Get(name string, options v1.GetOptions) (result *v1beta1.CSIN Resource("csinodes"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *cSINodes) List(opts v1.ListOptions) (result *v1beta1.CSINodeList, err e Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *cSINodes) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("csinodes"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *cSINodes) Create(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, er err = c.client.Post(). Resource("csinodes"). Body(cSINode). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *cSINodes) Update(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, er Resource("csinodes"). Name(cSINode.Name). Body(cSINode). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *cSINodes) Delete(name string, options *v1.DeleteOptions) error { Resource("csinodes"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *cSINodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *cSINodes) Patch(name string, pt types.PatchType, data []byte, subresour SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/storage/v1beta1/storageclass.go b/kubernetes/typed/storage/v1beta1/storageclass.go index 8a8f3891..0cd92d8e 100644 --- a/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/kubernetes/typed/storage/v1beta1/storageclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/storage/v1beta1" @@ -67,7 +68,7 @@ func (c *storageClasses) Get(name string, options v1.GetOptions) (result *v1beta Resource("storageclasses"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -83,7 +84,7 @@ func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClass Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -99,7 +100,7 @@ func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("storageclasses"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. @@ -108,7 +109,7 @@ func (c *storageClasses) Create(storageClass *v1beta1.StorageClass) (result *v1b err = c.client.Post(). Resource("storageclasses"). Body(storageClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -120,7 +121,7 @@ func (c *storageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1b Resource("storageclasses"). Name(storageClass.Name). Body(storageClass). - Do(). + Do(context.TODO()). Into(result) return } @@ -131,7 +132,7 @@ func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error { Resource("storageclasses"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -146,7 +147,7 @@ func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -158,7 +159,7 @@ func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, sub SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/kubernetes/typed/storage/v1beta1/volumeattachment.go b/kubernetes/typed/storage/v1beta1/volumeattachment.go index d319407f..b3681262 100644 --- a/kubernetes/typed/storage/v1beta1/volumeattachment.go +++ b/kubernetes/typed/storage/v1beta1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" "time" v1beta1 "k8s.io/api/storage/v1beta1" @@ -68,7 +69,7 @@ func (c *volumeAttachments) Get(name string, options v1.GetOptions) (result *v1b Resource("volumeattachments"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(context.TODO()). Into(result) return } @@ -84,7 +85,7 @@ func (c *volumeAttachments) List(opts v1.ListOptions) (result *v1beta1.VolumeAtt Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(context.TODO()). Into(result) return } @@ -100,7 +101,7 @@ func (c *volumeAttachments) Watch(opts v1.ListOptions) (watch.Interface, error) Resource("volumeattachments"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Create takes the representation of a volumeAttachment and creates it. Returns the server's representation of the volumeAttachment, and an error, if there is any. @@ -109,7 +110,7 @@ func (c *volumeAttachments) Create(volumeAttachment *v1beta1.VolumeAttachment) ( err = c.client.Post(). Resource("volumeattachments"). Body(volumeAttachment). - Do(). + Do(context.TODO()). Into(result) return } @@ -121,7 +122,7 @@ func (c *volumeAttachments) Update(volumeAttachment *v1beta1.VolumeAttachment) ( Resource("volumeattachments"). Name(volumeAttachment.Name). Body(volumeAttachment). - Do(). + Do(context.TODO()). Into(result) return } @@ -136,7 +137,7 @@ func (c *volumeAttachments) UpdateStatus(volumeAttachment *v1beta1.VolumeAttachm Name(volumeAttachment.Name). SubResource("status"). Body(volumeAttachment). - Do(). + Do(context.TODO()). Into(result) return } @@ -147,7 +148,7 @@ func (c *volumeAttachments) Delete(name string, options *v1.DeleteOptions) error Resource("volumeattachments"). Name(name). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -162,7 +163,7 @@ func (c *volumeAttachments) DeleteCollection(options *v1.DeleteOptions, listOpti VersionedParams(&listOptions, scheme.ParameterCodec). Timeout(timeout). Body(options). - Do(). + Do(context.TODO()). Error() } @@ -174,7 +175,7 @@ func (c *volumeAttachments) Patch(name string, pt types.PatchType, data []byte, SubResource(subresources...). Name(name). Body(data). - Do(). + Do(context.TODO()). Into(result) return } diff --git a/metadata/metadata.go b/metadata/metadata.go index a94fe7a4..55cce295 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -17,6 +17,7 @@ limitations under the License. package metadata import ( + "context" "encoding/json" "fmt" "time" @@ -135,7 +136,7 @@ func (c *client) Delete(name string, opts *metav1.DeleteOptions, subresources .. Delete(). AbsPath(append(c.makeURLSegments(name), subresources...)...). Body(deleteOptionsByte). - Do() + Do(context.TODO()) return result.Error() } @@ -154,7 +155,7 @@ func (c *client) DeleteCollection(opts *metav1.DeleteOptions, listOptions metav1 AbsPath(c.makeURLSegments("")...). Body(deleteOptionsByte). SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1). - Do() + Do(context.TODO()) return result.Error() } @@ -166,7 +167,7 @@ func (c *client) Get(name string, opts metav1.GetOptions, subresources ...string result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...). SetHeader("Accept", "application/vnd.kubernetes.protobuf;as=PartialObjectMetadata;g=meta.k8s.io;v=v1,application/json;as=PartialObjectMetadata;g=meta.k8s.io;v=v1,application/json"). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } @@ -202,7 +203,7 @@ func (c *client) List(opts metav1.ListOptions) (*metav1.PartialObjectMetadataLis result := c.client.client.Get().AbsPath(c.makeURLSegments("")...). SetHeader("Accept", "application/vnd.kubernetes.protobuf;as=PartialObjectMetadataList;g=meta.k8s.io;v=v1,application/json;as=PartialObjectMetadataList;g=meta.k8s.io;v=v1,application/json"). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } @@ -242,7 +243,7 @@ func (c *client) Watch(opts metav1.ListOptions) (watch.Interface, error) { SetHeader("Accept", "application/vnd.kubernetes.protobuf;as=PartialObjectMetadata;g=meta.k8s.io;v=v1,application/json;as=PartialObjectMetadata;g=meta.k8s.io;v=v1,application/json"). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). Timeout(timeout). - Watch() + Watch(context.TODO()) } // Patch modifies the named resource in the specified scope (namespace or cluster). @@ -256,7 +257,7 @@ func (c *client) Patch(name string, pt types.PatchType, data []byte, opts metav1 Body(data). SetHeader("Accept", "application/vnd.kubernetes.protobuf;as=PartialObjectMetadata;g=meta.k8s.io;v=v1,application/json;as=PartialObjectMetadata;g=meta.k8s.io;v=v1,application/json"). SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } diff --git a/rest/client_test.go b/rest/client_test.go index 997c8d45..a30e79e1 100644 --- a/rest/client_test.go +++ b/rest/client_test.go @@ -17,6 +17,7 @@ limitations under the License. package rest import ( + "context" "net/http" "net/http/httptest" "net/url" @@ -79,7 +80,7 @@ func TestDoRequestSuccess(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - body, err := c.Get().Prefix("test").Do().Raw() + body, err := c.Get().Prefix("test").Do(context.Background()).Raw() testParam := TestParam{actualError: err, expectingError: false, expCreated: true, expStatus: status, testBody: true, testBodyErrorIsNotNil: false} @@ -107,7 +108,7 @@ func TestDoRequestFailed(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - err = c.Get().Do().Error() + err = c.Get().Do(context.Background()).Error() if err == nil { t.Errorf("unexpected non-error") } @@ -146,7 +147,7 @@ func TestDoRawRequestFailed(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - body, err := c.Get().Do().Raw() + body, err := c.Get().Do(context.Background()).Raw() if err == nil || body == nil { t.Errorf("unexpected non-error: %#v", body) @@ -170,7 +171,7 @@ func TestDoRequestCreated(t *testing.T) { t.Fatalf("unexpected error: %v", err) } created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + body, err := c.Get().Prefix("test").Do(context.Background()).WasCreated(&created).Raw() testParam := TestParam{actualError: err, expectingError: false, expCreated: true, expStatus: status, testBody: false} @@ -185,7 +186,7 @@ func TestDoRequestNotCreated(t *testing.T) { t.Fatalf("unexpected error: %v", err) } created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + body, err := c.Get().Prefix("test").Do(context.Background()).WasCreated(&created).Raw() testParam := TestParam{actualError: err, expectingError: false, expCreated: false, expStatus: expectedStatus, testBody: false} validate(testParam, t, body, fakeHandler) @@ -200,7 +201,7 @@ func TestDoRequestAcceptedNoContentReturned(t *testing.T) { t.Fatalf("unexpected error: %v", err) } created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + body, err := c.Get().Prefix("test").Do(context.Background()).WasCreated(&created).Raw() testParam := TestParam{actualError: err, expectingError: false, expCreated: false, testBody: false} validate(testParam, t, body, fakeHandler) @@ -214,7 +215,7 @@ func TestBadRequest(t *testing.T) { t.Fatalf("unexpected error: %v", err) } created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + body, err := c.Get().Prefix("test").Do(context.Background()).WasCreated(&created).Raw() testParam := TestParam{actualError: err, expectingError: true, expCreated: false, testBody: true} validate(testParam, t, body, fakeHandler) diff --git a/rest/request.go b/rest/request.go index 948d3d9c..545f15db 100644 --- a/rest/request.go +++ b/rest/request.go @@ -61,8 +61,8 @@ type HTTPClient interface { // ResponseWrapper is an interface for getting a response. // The response may be either accessed as a raw data (the whole output is put into memory) or as a stream. type ResponseWrapper interface { - DoRaw() ([]byte, error) - Stream() (io.ReadCloser, error) + DoRaw(context.Context) ([]byte, error) + Stream(context.Context) (io.ReadCloser, error) } // RequestConstructionError is returned when there's an error assembling a request. @@ -104,9 +104,6 @@ type Request struct { // output err error body io.Reader - - // This is only used for per-request timeouts, deadlines, and cancellations. - ctx context.Context } // NewRequest creates a new request helper object for accessing runtime.Objects on a server. @@ -438,13 +435,6 @@ func (r *Request) Body(obj interface{}) *Request { return r } -// Context adds a context to the request. Contexts are only used for -// timeouts, deadlines, and cancellations. -func (r *Request) Context(ctx context.Context) *Request { - r.ctx = ctx - return r -} - // URL returns the current working URL. func (r *Request) URL() *url.URL { p := r.pathPrefix @@ -566,12 +556,7 @@ func (r *Request) tryThrottle(ctx context.Context) error { // Watch attempts to begin watching the requested location. // Returns a watch.Interface, or an error. -func (r *Request) Watch() (watch.Interface, error) { - ctx := context.Background() - if r.ctx != nil { - ctx = r.ctx - } - +func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { // We specifically don't want to rate limit watches, so we // don't use r.rateLimiter here. if r.err != nil { @@ -658,12 +643,7 @@ func updateURLMetrics(req *Request, resp *http.Response, err error) { // Returns io.ReadCloser which could be used for streaming of the response, or an error // Any non-2xx http status code causes an error. If we get a non-2xx code, we try to convert the body into an APIStatus object. // If we can, we return that as an error. Otherwise, we create an error that lists the http status and the content of the response. -func (r *Request) Stream() (io.ReadCloser, error) { - ctx := context.Background() - if r.ctx != nil { - ctx = r.ctx - } - +func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { if r.err != nil { return nil, r.err } @@ -786,6 +766,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp maxRetries := 10 retries := 0 for { + url := r.URL().String() req, err := http.NewRequest(r.verb, url, r.body) if err != nil { @@ -874,12 +855,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp // Error type: // * If the server responds with a status: *errors.StatusError or *errors.UnexpectedObjectError // * http.Client.Do errors are returned directly. -func (r *Request) Do() Result { - ctx := context.Background() - if r.ctx != nil { - ctx = r.ctx - } - +func (r *Request) Do(ctx context.Context) Result { var result Result err := r.request(ctx, func(req *http.Request, resp *http.Response) { result = r.transformResponse(resp, req) @@ -891,12 +867,7 @@ func (r *Request) Do() Result { } // DoRaw executes the request but does not process the response body. -func (r *Request) DoRaw() ([]byte, error) { - ctx := context.Background() - if r.ctx != nil { - ctx = r.ctx - } - +func (r *Request) DoRaw(ctx context.Context) ([]byte, error) { var result Result err := r.request(ctx, func(req *http.Request, resp *http.Response) { result.body, result.err = ioutil.ReadAll(resp.Body) diff --git a/rest/request_test.go b/rest/request_test.go index 0c8efe66..5d9fbc4a 100644 --- a/rest/request_test.go +++ b/rest/request_test.go @@ -94,9 +94,9 @@ func TestRequestSetsHeaders(t *testing.T) { r.c.Client = server // Check if all "issue" methods are setting headers. - _ = r.Do() - _, _ = r.Watch() - _, _ = r.Stream() + _ = r.Do(context.Background()) + _, _ = r.Watch(context.Background()) + _, _ = r.Stream(context.Background()) } func TestRequestWithErrorWontChange(t *testing.T) { @@ -1059,7 +1059,7 @@ func TestRequestWatch(t *testing.T) { for _, testCase := range testCases { t.Run("", func(t *testing.T) { testCase.Request.backoff = &NoBackoff{} - watch, err := testCase.Request.Watch() + watch, err := testCase.Request.Watch(context.Background()) hasErr := err != nil if hasErr != testCase.Err { t.Fatalf("expected %t, got %t: %v", testCase.Err, hasErr, err) @@ -1162,7 +1162,7 @@ func TestRequestStream(t *testing.T) { } for i, testCase := range testCases { testCase.Request.backoff = &NoBackoff{} - body, err := testCase.Request.Stream() + body, err := testCase.Request.Stream(context.Background()) hasErr := err != nil if hasErr != testCase.Err { t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) @@ -1240,7 +1240,7 @@ func TestRequestDo(t *testing.T) { } for i, testCase := range testCases { testCase.Request.backoff = &NoBackoff{} - body, err := testCase.Request.Do().Raw() + body, err := testCase.Request.Do(context.Background()).Raw() hasErr := err != nil if hasErr != testCase.Err { t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) @@ -1272,7 +1272,7 @@ func TestDoRequestNewWay(t *testing.T) { Suffix("baz"). Timeout(time.Second). Body([]byte(reqBody)). - Do().Get() + Do(context.Background()).Get() if err != nil { t.Errorf("Unexpected error: %v %#v", err, err) return @@ -1323,7 +1323,7 @@ func TestBackoffLifecycle(t *testing.T) { t.Errorf("Backoff is %v instead of %v", thisBackoff, sec) } now := clock.Now() - request.DoRaw() + request.DoRaw(context.Background()) elapsed := clock.Since(now) if clock.Since(now) != thisBackoff { t.Errorf("CalculatedBackoff not honored by clock: Expected time of %v, but got %v ", thisBackoff, elapsed) @@ -1372,7 +1372,7 @@ func TestCheckRetryClosesBody(t *testing.T) { Suffix("baz"). Timeout(time.Second). Body([]byte(strings.Repeat("abcd", 1000))). - DoRaw() + DoRaw(context.Background()) if err != nil { t.Fatalf("Unexpected error: %v %#v", err, err) } @@ -1405,7 +1405,7 @@ func TestConnectionResetByPeerIsRetried(t *testing.T) { backoff: backoff, } // We expect two retries of "connection reset by peer" and the success. - _, err := req.Do().Raw() + _, err := req.Do(context.Background()).Raw() if err != nil { t.Errorf("Unexpected error: %v", err) } @@ -1445,7 +1445,7 @@ func TestCheckRetryHandles429And5xx(t *testing.T) { Suffix("baz"). Timeout(time.Second). Body([]byte(strings.Repeat("abcd", 1000))). - DoRaw() + DoRaw(context.Background()) if err != nil { t.Fatalf("Unexpected error: %v %#v", err, err) } @@ -1481,7 +1481,7 @@ func BenchmarkCheckRetryClosesBody(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - if _, err := requests[i].DoRaw(); err != nil { + if _, err := requests[i].DoRaw(context.Background()); err != nil { b.Fatalf("Unexpected error (%d/%d): %v", i, b.N, err) } } @@ -1510,7 +1510,7 @@ func TestDoRequestNewWayReader(t *testing.T) { Prefix("foo"). Timeout(time.Second). Body(bytes.NewBuffer(reqBodyExpected)). - Do().Get() + Do(context.Background()).Get() if err != nil { t.Errorf("Unexpected error: %v %#v", err, err) return @@ -1549,7 +1549,7 @@ func TestDoRequestNewWayObj(t *testing.T) { Resource("foo"). Timeout(time.Second). Body(reqObj). - Do().Get() + Do(context.Background()).Get() if err != nil { t.Errorf("Unexpected error: %v %#v", err, err) return @@ -1603,7 +1603,7 @@ func TestDoRequestNewWayFile(t *testing.T) { Prefix("foo/bar", "baz"). Timeout(time.Second). Body(file.Name()). - Do().WasCreated(&wasCreated).Get() + Do(context.Background()).WasCreated(&wasCreated).Get() if err != nil { t.Errorf("Unexpected error: %v %#v", err, err) return @@ -1648,7 +1648,7 @@ func TestWasCreated(t *testing.T) { Prefix("foo/bar", "baz"). Timeout(time.Second). Body(reqBodyExpected). - Do().WasCreated(&wasCreated).Get() + Do(context.Background()).WasCreated(&wasCreated).Get() if err != nil { t.Errorf("Unexpected error: %v %#v", err, err) return @@ -1831,7 +1831,7 @@ func TestWatch(t *testing.T) { defer testServer.Close() s := testRESTClient(t, testServer) - watching, err := s.Get().Prefix("path/to/watch/thing").Watch() + watching, err := s.Get().Prefix("path/to/watch/thing").Watch(context.Background()) if err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -1891,7 +1891,7 @@ func TestWatchNonDefaultContentType(t *testing.T) { contentConfig := defaultContentConfig() contentConfig.ContentType = "application/vnd.kubernetes.protobuf" s := testRESTClientWithConfig(t, testServer, contentConfig) - watching, err := s.Get().Prefix("path/to/watch/thing").Watch() + watching, err := s.Get().Prefix("path/to/watch/thing").Watch(context.Background()) if err != nil { t.Fatalf("Unexpected error") } @@ -1948,7 +1948,7 @@ func TestWatchUnknownContentType(t *testing.T) { defer testServer.Close() s := testRESTClient(t, testServer) - _, err := s.Get().Prefix("path/to/watch/thing").Watch() + _, err := s.Get().Prefix("path/to/watch/thing").Watch(context.Background()) if err == nil { t.Fatalf("Expected to fail due to lack of known stream serialization for content type") } @@ -1970,7 +1970,7 @@ func TestStream(t *testing.T) { defer testServer.Close() s := testRESTClient(t, testServer) - readCloser, err := s.Get().Prefix("path/to/stream/thing").Stream() + readCloser, err := s.Get().Prefix("path/to/stream/thing").Stream(context.Background()) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -2028,9 +2028,8 @@ func TestDoContext(t *testing.T) { c := testRESTClient(t, testServer) _, err := c.Verb("GET"). - Context(ctx). Prefix("foo"). - DoRaw() + DoRaw(ctx) if err == nil { t.Fatal("Expected context cancellation error") } diff --git a/scale/client.go b/scale/client.go index 17519345..26febcb8 100644 --- a/scale/client.go +++ b/scale/client.go @@ -17,6 +17,7 @@ limitations under the License. package scale import ( + "context" "fmt" autoscaling "k8s.io/api/autoscaling/v1" @@ -154,7 +155,7 @@ func (c *namespacedScaleClient) Get(resource schema.GroupResource, name string) Resource(gvr.Resource). Name(name). SubResource("scale"). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } @@ -196,7 +197,7 @@ func (c *namespacedScaleClient) Update(resource schema.GroupResource, scale *aut Name(scale.Name). SubResource("scale"). Body(scaleUpdateBytes). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { // propagate "raw" error from the API // this allows callers to interpret underlying Reason field @@ -216,7 +217,7 @@ func (c *namespacedScaleClient) Patch(gvr schema.GroupVersionResource, name stri Name(name). SubResource("scale"). Body(data). - Do() + Do(context.TODO()) if err := result.Error(); err != nil { return nil, err } diff --git a/tools/cache/listwatch.go b/tools/cache/listwatch.go index 10a15203..10b7e651 100644 --- a/tools/cache/listwatch.go +++ b/tools/cache/listwatch.go @@ -17,6 +17,8 @@ limitations under the License. package cache import ( + "context" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" @@ -82,7 +84,7 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string, Namespace(namespace). Resource(resource). VersionedParams(&options, metav1.ParameterCodec). - Do(). + Do(context.TODO()). Get() } watchFunc := func(options metav1.ListOptions) (watch.Interface, error) { @@ -92,7 +94,7 @@ func NewFilteredListWatchFromClient(c Getter, resource string, namespace string, Namespace(namespace). Resource(resource). VersionedParams(&options, metav1.ParameterCodec). - Watch() + Watch(context.TODO()) } return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} }