generated: update clients

This commit is contained in:
Mike Danese
2020-02-04 10:13:30 -08:00
parent 3aa59f7f30
commit 9443a38144
240 changed files with 4028 additions and 3788 deletions

View File

@@ -38,14 +38,14 @@ type ExamplesGetter interface {
// ExampleInterface has methods to work with Example resources.
type ExampleInterface interface {
Create(*v1.Example) (*v1.Example, error)
Update(*v1.Example) (*v1.Example, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Example, error)
List(opts metav1.ListOptions) (*v1.ExampleList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Example, err error)
Create(context.Context, *v1.Example) (*v1.Example, error)
Update(context.Context, *v1.Example) (*v1.Example, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Example, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ExampleList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Example, err error)
ExampleExpansion
}
@@ -64,20 +64,20 @@ func newExamples(c *CrV1Client, namespace string) *examples {
}
// Get takes name of the example, and returns the corresponding example object, and an error if there is any.
func (c *examples) Get(name string, options metav1.GetOptions) (result *v1.Example, err error) {
func (c *examples) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Example, err error) {
result = &v1.Example{}
err = c.client.Get().
Namespace(c.ns).
Resource("examples").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Examples that match those selectors.
func (c *examples) List(opts metav1.ListOptions) (result *v1.ExampleList, err error) {
func (c *examples) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ExampleList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -88,13 +88,13 @@ func (c *examples) List(opts metav1.ListOptions) (result *v1.ExampleList, err er
Resource("examples").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested examples.
func (c *examples) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *examples) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -105,47 +105,47 @@ func (c *examples) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("examples").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// Create takes the representation of a example and creates it. Returns the server's representation of the example, and an error, if there is any.
func (c *examples) Create(example *v1.Example) (result *v1.Example, err error) {
func (c *examples) Create(ctx context.Context, example *v1.Example) (result *v1.Example, err error) {
result = &v1.Example{}
err = c.client.Post().
Namespace(c.ns).
Resource("examples").
Body(example).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a example and updates it. Returns the server's representation of the example, and an error, if there is any.
func (c *examples) Update(example *v1.Example) (result *v1.Example, err error) {
func (c *examples) Update(ctx context.Context, example *v1.Example) (result *v1.Example, err error) {
result = &v1.Example{}
err = c.client.Put().
Namespace(c.ns).
Resource("examples").
Name(example.Name).
Body(example).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the example and deletes it. Returns an error if one occurs.
func (c *examples) Delete(name string, options *metav1.DeleteOptions) error {
func (c *examples) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("examples").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *examples) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *examples) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -156,12 +156,12 @@ func (c *examples) DeleteCollection(options *metav1.DeleteOptions, listOptions m
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched example.
func (c *examples) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Example, err error) {
func (c *examples) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Example, err error) {
result = &v1.Example{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -169,7 +169,7 @@ func (c *examples) Patch(name string, pt types.PatchType, data []byte, subresour
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
crv1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var examplesResource = schema.GroupVersionResource{Group: "cr.example.apiextensi
var examplesKind = schema.GroupVersionKind{Group: "cr.example.apiextensions.k8s.io", Version: "v1", Kind: "Example"}
// Get takes name of the example, and returns the corresponding example object, and an error if there is any.
func (c *FakeExamples) Get(name string, options v1.GetOptions) (result *crv1.Example, err error) {
func (c *FakeExamples) Get(ctx context.Context, name string, options v1.GetOptions) (result *crv1.Example, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(examplesResource, c.ns, name), &crv1.Example{})
@@ -50,7 +52,7 @@ func (c *FakeExamples) Get(name string, options v1.GetOptions) (result *crv1.Exa
}
// List takes label and field selectors, and returns the list of Examples that match those selectors.
func (c *FakeExamples) List(opts v1.ListOptions) (result *crv1.ExampleList, err error) {
func (c *FakeExamples) List(ctx context.Context, opts v1.ListOptions) (result *crv1.ExampleList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(examplesResource, examplesKind, c.ns, opts), &crv1.ExampleList{})
@@ -72,14 +74,14 @@ func (c *FakeExamples) List(opts v1.ListOptions) (result *crv1.ExampleList, err
}
// Watch returns a watch.Interface that watches the requested examples.
func (c *FakeExamples) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeExamples) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(examplesResource, c.ns, opts))
}
// Create takes the representation of a example and creates it. Returns the server's representation of the example, and an error, if there is any.
func (c *FakeExamples) Create(example *crv1.Example) (result *crv1.Example, err error) {
func (c *FakeExamples) Create(ctx context.Context, example *crv1.Example) (result *crv1.Example, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(examplesResource, c.ns, example), &crv1.Example{})
@@ -90,7 +92,7 @@ func (c *FakeExamples) Create(example *crv1.Example) (result *crv1.Example, err
}
// Update takes the representation of a example and updates it. Returns the server's representation of the example, and an error, if there is any.
func (c *FakeExamples) Update(example *crv1.Example) (result *crv1.Example, err error) {
func (c *FakeExamples) Update(ctx context.Context, example *crv1.Example) (result *crv1.Example, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(examplesResource, c.ns, example), &crv1.Example{})
@@ -101,7 +103,7 @@ func (c *FakeExamples) Update(example *crv1.Example) (result *crv1.Example, err
}
// Delete takes name of the example and deletes it. Returns an error if one occurs.
func (c *FakeExamples) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeExamples) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(examplesResource, c.ns, name), &crv1.Example{})
@@ -109,7 +111,7 @@ func (c *FakeExamples) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeExamples) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeExamples) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(examplesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &crv1.ExampleList{})
@@ -117,7 +119,7 @@ func (c *FakeExamples) DeleteCollection(options *v1.DeleteOptions, listOptions v
}
// Patch applies the patch and returns the patched example.
func (c *FakeExamples) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *crv1.Example, err error) {
func (c *FakeExamples) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *crv1.Example, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(examplesResource, c.ns, name, pt, data, subresources...), &crv1.Example{})

View File

@@ -38,15 +38,15 @@ type CustomResourceDefinitionsGetter interface {
// CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources.
type CustomResourceDefinitionInterface interface {
Create(*v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error)
Update(*v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error)
UpdateStatus(*v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.CustomResourceDefinition, error)
List(opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error)
Create(context.Context, *v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error)
Update(context.Context, *v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error)
UpdateStatus(context.Context, *v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.CustomResourceDefinition, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error)
CustomResourceDefinitionExpansion
}
@@ -63,19 +63,19 @@ func newCustomResourceDefinitions(c *ApiextensionsV1Client) *customResourceDefin
}
// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any.
func (c *customResourceDefinitions) Get(name string, options metav1.GetOptions) (result *v1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CustomResourceDefinition, err error) {
result = &v1.CustomResourceDefinition{}
err = c.client.Get().
Resource("customresourcedefinitions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors.
func (c *customResourceDefinitions) List(opts metav1.ListOptions) (result *v1.CustomResourceDefinitionList, err error) {
func (c *customResourceDefinitions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CustomResourceDefinitionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -85,13 +85,13 @@ func (c *customResourceDefinitions) List(opts metav1.ListOptions) (result *v1.Cu
Resource("customresourcedefinitions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested customResourceDefinitions.
func (c *customResourceDefinitions) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *customResourceDefinitions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -101,28 +101,28 @@ func (c *customResourceDefinitions) Watch(opts metav1.ListOptions) (watch.Interf
Resource("customresourcedefinitions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any.
func (c *customResourceDefinitions) Create(customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) {
result = &v1.CustomResourceDefinition{}
err = c.client.Post().
Resource("customresourcedefinitions").
Body(customResourceDefinition).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any.
func (c *customResourceDefinitions) Update(customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) {
result = &v1.CustomResourceDefinition{}
err = c.client.Put().
Resource("customresourcedefinitions").
Name(customResourceDefinition.Name).
Body(customResourceDefinition).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -130,30 +130,30 @@ func (c *customResourceDefinitions) Update(customResourceDefinition *v1.CustomRe
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *customResourceDefinitions) UpdateStatus(customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition) (result *v1.CustomResourceDefinition, err error) {
result = &v1.CustomResourceDefinition{}
err = c.client.Put().
Resource("customresourcedefinitions").
Name(customResourceDefinition.Name).
SubResource("status").
Body(customResourceDefinition).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs.
func (c *customResourceDefinitions) Delete(name string, options *metav1.DeleteOptions) error {
func (c *customResourceDefinitions) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("customresourcedefinitions").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *customResourceDefinitions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -163,19 +163,19 @@ func (c *customResourceDefinitions) DeleteCollection(options *metav1.DeleteOptio
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched customResourceDefinition.
func (c *customResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CustomResourceDefinition, err error) {
result = &v1.CustomResourceDefinition{}
err = c.client.Patch(pt).
Resource("customresourcedefinitions").
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var customresourcedefinitionsResource = schema.GroupVersionResource{Group: "apie
var customresourcedefinitionsKind = schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinition"}
// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any.
func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) {
func (c *FakeCustomResourceDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &apiextensionsv1.CustomResourceDefinition{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions)
}
// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors.
func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *apiextensionsv1.CustomResourceDefinitionList, err error) {
func (c *FakeCustomResourceDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *apiextensionsv1.CustomResourceDefinitionList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(customresourcedefinitionsResource, customresourcedefinitionsKind, opts), &apiextensionsv1.CustomResourceDefinitionList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *apiex
}
// Watch returns a watch.Interface that watches the requested customResourceDefinitions.
func (c *FakeCustomResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeCustomResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(customresourcedefinitionsResource, opts))
}
// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any.
func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) {
func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *apiexte
}
// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any.
func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) {
func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (result *apiextensionsv1.CustomResourceDefinition, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{})
if obj == nil {
@@ -96,7 +98,7 @@ func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *apiexte
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, error) {
func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &apiextensionsv1.CustomResourceDefinition{})
if obj == nil {
@@ -106,14 +108,14 @@ func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *a
}
// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs.
func (c *FakeCustomResourceDefinitions) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &apiextensionsv1.CustomResourceDefinition{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCustomResourceDefinitions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOptions)
_, err := c.Fake.Invokes(action, &apiextensionsv1.CustomResourceDefinitionList{})
@@ -121,7 +123,7 @@ func (c *FakeCustomResourceDefinitions) DeleteCollection(options *v1.DeleteOptio
}
// Patch applies the patch and returns the patched customResourceDefinition.
func (c *FakeCustomResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiextensionsv1.CustomResourceDefinition, err error) {
func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *apiextensionsv1.CustomResourceDefinition, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &apiextensionsv1.CustomResourceDefinition{})
if obj == nil {

View File

@@ -38,15 +38,15 @@ type CustomResourceDefinitionsGetter interface {
// CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources.
type CustomResourceDefinitionInterface interface {
Create(*v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error)
Update(*v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error)
UpdateStatus(*v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.CustomResourceDefinition, error)
List(opts v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error)
Create(context.Context, *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error)
Update(context.Context, *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error)
UpdateStatus(context.Context, *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.CustomResourceDefinition, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CustomResourceDefinitionList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error)
CustomResourceDefinitionExpansion
}
@@ -63,19 +63,19 @@ func newCustomResourceDefinitions(c *ApiextensionsV1beta1Client) *customResource
}
// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any.
func (c *customResourceDefinitions) Get(name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) {
result = &v1beta1.CustomResourceDefinition{}
err = c.client.Get().
Resource("customresourcedefinitions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors.
func (c *customResourceDefinitions) List(opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) {
func (c *customResourceDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -85,13 +85,13 @@ func (c *customResourceDefinitions) List(opts v1.ListOptions) (result *v1beta1.C
Resource("customresourcedefinitions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested customResourceDefinitions.
func (c *customResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *customResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -101,28 +101,28 @@ func (c *customResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface,
Resource("customresourcedefinitions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any.
func (c *customResourceDefinitions) Create(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
result = &v1beta1.CustomResourceDefinition{}
err = c.client.Post().
Resource("customresourcedefinitions").
Body(customResourceDefinition).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any.
func (c *customResourceDefinitions) Update(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
result = &v1beta1.CustomResourceDefinition{}
err = c.client.Put().
Resource("customresourcedefinitions").
Name(customResourceDefinition.Name).
Body(customResourceDefinition).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -130,30 +130,30 @@ func (c *customResourceDefinitions) Update(customResourceDefinition *v1beta1.Cus
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *customResourceDefinitions) UpdateStatus(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
result = &v1beta1.CustomResourceDefinition{}
err = c.client.Put().
Resource("customresourcedefinitions").
Name(customResourceDefinition.Name).
SubResource("status").
Body(customResourceDefinition).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs.
func (c *customResourceDefinitions) Delete(name string, options *v1.DeleteOptions) error {
func (c *customResourceDefinitions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("customresourcedefinitions").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *customResourceDefinitions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *customResourceDefinitions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -163,19 +163,19 @@ func (c *customResourceDefinitions) DeleteCollection(options *v1.DeleteOptions,
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched customResourceDefinition.
func (c *customResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) {
func (c *customResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) {
result = &v1beta1.CustomResourceDefinition{}
err = c.client.Patch(pt).
Resource("customresourcedefinitions").
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var customresourcedefinitionsResource = schema.GroupVersionResource{Group: "apie
var customresourcedefinitionsKind = schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1beta1", Kind: "CustomResourceDefinition"}
// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any.
func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) {
func (c *FakeCustomResourceDefinitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CustomResourceDefinition, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &v1beta1.CustomResourceDefinition{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions)
}
// List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors.
func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) {
func (c *FakeCustomResourceDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(customresourcedefinitionsResource, customresourcedefinitionsKind, opts), &v1beta1.CustomResourceDefinitionList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *v1bet
}
// Watch returns a watch.Interface that watches the requested customResourceDefinitions.
func (c *FakeCustomResourceDefinitions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeCustomResourceDefinitions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(customresourcedefinitionsResource, opts))
}
// Create takes the representation of a customResourceDefinition and creates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any.
func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
func (c *FakeCustomResourceDefinitions) Create(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeCustomResourceDefinitions) Create(customResourceDefinition *v1beta1
}
// Update takes the representation of a customResourceDefinition and updates it. Returns the server's representation of the customResourceDefinition, and an error, if there is any.
func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
func (c *FakeCustomResourceDefinitions) Update(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (result *v1beta1.CustomResourceDefinition, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(customresourcedefinitionsResource, customResourceDefinition), &v1beta1.CustomResourceDefinition{})
if obj == nil {
@@ -96,7 +98,7 @@ func (c *FakeCustomResourceDefinitions) Update(customResourceDefinition *v1beta1
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) {
func (c *FakeCustomResourceDefinitions) UpdateStatus(ctx context.Context, customResourceDefinition *v1beta1.CustomResourceDefinition) (*v1beta1.CustomResourceDefinition, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(customresourcedefinitionsResource, "status", customResourceDefinition), &v1beta1.CustomResourceDefinition{})
if obj == nil {
@@ -106,14 +108,14 @@ func (c *FakeCustomResourceDefinitions) UpdateStatus(customResourceDefinition *v
}
// Delete takes name of the customResourceDefinition and deletes it. Returns an error if one occurs.
func (c *FakeCustomResourceDefinitions) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeCustomResourceDefinitions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(customresourcedefinitionsResource, name), &v1beta1.CustomResourceDefinition{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCustomResourceDefinitions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeCustomResourceDefinitions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(customresourcedefinitionsResource, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.CustomResourceDefinitionList{})
@@ -121,7 +123,7 @@ func (c *FakeCustomResourceDefinitions) DeleteCollection(options *v1.DeleteOptio
}
// Patch applies the patch and returns the patched customResourceDefinition.
func (c *FakeCustomResourceDefinitions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) {
func (c *FakeCustomResourceDefinitions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CustomResourceDefinition, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(customresourcedefinitionsResource, name, pt, data, subresources...), &v1beta1.CustomResourceDefinition{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "
var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "MutatingWebhookConfiguration"}
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) {
func (c *FakeMutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &admissionregistrationv1.MutatingWebhookConfiguration{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptio
}
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistrationv1.MutatingWebhookConfigurationList, err error) {
func (c *FakeMutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *admissionregistrationv1.MutatingWebhookConfigurationList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &admissionregistrationv1.MutatingWebhookConfigurationList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *a
}
// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
func (c *FakeMutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts))
}
// 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.
func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) {
func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistrationv1.MutatingWebhookConfiguration{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration
}
// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) {
func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *admissionregistrationv1.MutatingWebhookConfiguration) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &admissionregistrationv1.MutatingWebhookConfiguration{})
if obj == nil {
@@ -95,14 +97,14 @@ func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration
}
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *FakeMutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &admissionregistrationv1.MutatingWebhookConfiguration{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions)
_, err := c.Fake.Invokes(action, &admissionregistrationv1.MutatingWebhookConfigurationList{})
@@ -110,7 +112,7 @@ func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteO
}
// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
func (c *FakeMutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) {
func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistrationv1.MutatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistrationv1.MutatingWebhookConfiguration{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group:
var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingWebhookConfiguration"}
// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any.
func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) {
func (c *FakeValidatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &admissionregistrationv1.ValidatingWebhookConfiguration{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOpt
}
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result *admissionregistrationv1.ValidatingWebhookConfigurationList, err error) {
func (c *FakeValidatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *admissionregistrationv1.ValidatingWebhookConfigurationList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &admissionregistrationv1.ValidatingWebhookConfigurationList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result
}
// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations.
func (c *FakeValidatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts))
}
// 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.
func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) {
func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistrationv1.ValidatingWebhookConfiguration{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfigurat
}
// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) {
func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *admissionregistrationv1.ValidatingWebhookConfiguration) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &admissionregistrationv1.ValidatingWebhookConfiguration{})
if obj == nil {
@@ -95,14 +97,14 @@ func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfigurat
}
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *FakeValidatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &admissionregistrationv1.ValidatingWebhookConfiguration{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions)
_, err := c.Fake.Invokes(action, &admissionregistrationv1.ValidatingWebhookConfigurationList{})
@@ -110,7 +112,7 @@ func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.Delet
}
// Patch applies the patch and returns the patched validatingWebhookConfiguration.
func (c *FakeValidatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) {
func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *admissionregistrationv1.ValidatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &admissionregistrationv1.ValidatingWebhookConfiguration{})
if obj == nil {

View File

@@ -38,14 +38,14 @@ type MutatingWebhookConfigurationsGetter interface {
// MutatingWebhookConfigurationInterface has methods to work with MutatingWebhookConfiguration resources.
type MutatingWebhookConfigurationInterface interface {
Create(*v1.MutatingWebhookConfiguration) (*v1.MutatingWebhookConfiguration, error)
Update(*v1.MutatingWebhookConfiguration) (*v1.MutatingWebhookConfiguration, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.MutatingWebhookConfiguration, error)
List(opts metav1.ListOptions) (*v1.MutatingWebhookConfigurationList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error)
Create(context.Context, *v1.MutatingWebhookConfiguration) (*v1.MutatingWebhookConfiguration, error)
Update(context.Context, *v1.MutatingWebhookConfiguration) (*v1.MutatingWebhookConfiguration, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.MutatingWebhookConfiguration, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.MutatingWebhookConfigurationList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error)
MutatingWebhookConfigurationExpansion
}
@@ -62,19 +62,19 @@ func newMutatingWebhookConfigurations(c *AdmissionregistrationV1Client) *mutatin
}
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
func (c *mutatingWebhookConfigurations) Get(name string, options metav1.GetOptions) (result *v1.MutatingWebhookConfiguration, err error) {
func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MutatingWebhookConfiguration, err error) {
result = &v1.MutatingWebhookConfiguration{}
err = c.client.Get().
Resource("mutatingwebhookconfigurations").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
func (c *mutatingWebhookConfigurations) List(opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) {
func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -84,13 +84,13 @@ func (c *mutatingWebhookConfigurations) List(opts metav1.ListOptions) (result *v
Resource("mutatingwebhookconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
func (c *mutatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -100,44 +100,44 @@ func (c *mutatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch.In
Resource("mutatingwebhookconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *mutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration) (result *v1.MutatingWebhookConfiguration, err error) {
func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration) (result *v1.MutatingWebhookConfiguration, err error) {
result = &v1.MutatingWebhookConfiguration{}
err = c.client.Post().
Resource("mutatingwebhookconfigurations").
Body(mutatingWebhookConfiguration).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
func (c *mutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration) (result *v1.MutatingWebhookConfiguration, err error) {
func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration) (result *v1.MutatingWebhookConfiguration, err error) {
result = &v1.MutatingWebhookConfiguration{}
err = c.client.Put().
Resource("mutatingwebhookconfigurations").
Name(mutatingWebhookConfiguration.Name).
Body(mutatingWebhookConfiguration).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *mutatingWebhookConfigurations) Delete(name string, options *metav1.DeleteOptions) error {
func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("mutatingwebhookconfigurations").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *mutatingWebhookConfigurations) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -147,19 +147,19 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(options *metav1.DeleteO
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
func (c *mutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) {
func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) {
result = &v1.MutatingWebhookConfiguration{}
err = c.client.Patch(pt).
Resource("mutatingwebhookconfigurations").
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type ValidatingWebhookConfigurationsGetter interface {
// ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources.
type ValidatingWebhookConfigurationInterface interface {
Create(*v1.ValidatingWebhookConfiguration) (*v1.ValidatingWebhookConfiguration, error)
Update(*v1.ValidatingWebhookConfiguration) (*v1.ValidatingWebhookConfiguration, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ValidatingWebhookConfiguration, error)
List(opts metav1.ListOptions) (*v1.ValidatingWebhookConfigurationList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error)
Create(context.Context, *v1.ValidatingWebhookConfiguration) (*v1.ValidatingWebhookConfiguration, error)
Update(context.Context, *v1.ValidatingWebhookConfiguration) (*v1.ValidatingWebhookConfiguration, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ValidatingWebhookConfiguration, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingWebhookConfigurationList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error)
ValidatingWebhookConfigurationExpansion
}
@@ -62,19 +62,19 @@ func newValidatingWebhookConfigurations(c *AdmissionregistrationV1Client) *valid
}
// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any.
func (c *validatingWebhookConfigurations) Get(name string, options metav1.GetOptions) (result *v1.ValidatingWebhookConfiguration, err error) {
func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingWebhookConfiguration, err error) {
result = &v1.ValidatingWebhookConfiguration{}
err = c.client.Get().
Resource("validatingwebhookconfigurations").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
func (c *validatingWebhookConfigurations) List(opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) {
func (c *validatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -84,13 +84,13 @@ func (c *validatingWebhookConfigurations) List(opts metav1.ListOptions) (result
Resource("validatingwebhookconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations.
func (c *validatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -100,44 +100,44 @@ func (c *validatingWebhookConfigurations) Watch(opts metav1.ListOptions) (watch.
Resource("validatingwebhookconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration) (result *v1.ValidatingWebhookConfiguration, err error) {
func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration) (result *v1.ValidatingWebhookConfiguration, err error) {
result = &v1.ValidatingWebhookConfiguration{}
err = c.client.Post().
Resource("validatingwebhookconfigurations").
Body(validatingWebhookConfiguration).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration) (result *v1.ValidatingWebhookConfiguration, err error) {
func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration) (result *v1.ValidatingWebhookConfiguration, err error) {
result = &v1.ValidatingWebhookConfiguration{}
err = c.client.Put().
Resource("validatingwebhookconfigurations").
Name(validatingWebhookConfiguration.Name).
Body(validatingWebhookConfiguration).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *validatingWebhookConfigurations) Delete(name string, options *metav1.DeleteOptions) error {
func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("validatingwebhookconfigurations").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *validatingWebhookConfigurations) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -147,19 +147,19 @@ func (c *validatingWebhookConfigurations) DeleteCollection(options *metav1.Delet
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched validatingWebhookConfiguration.
func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) {
func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) {
result = &v1.ValidatingWebhookConfiguration{}
err = c.client.Patch(pt).
Resource("validatingwebhookconfigurations").
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/admissionregistration/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "
var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1beta1", Kind: "MutatingWebhookConfiguration"}
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) {
func (c *FakeMutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptio
}
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
func (c *FakeMutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1beta1.MutatingWebhookConfigurationList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v
}
// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
func (c *FakeMutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts))
}
// 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.
func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration
}
// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{})
if obj == nil {
@@ -95,14 +97,14 @@ func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration
}
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *FakeMutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeMutatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.MutatingWebhookConfigurationList{})
@@ -110,7 +112,7 @@ func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteO
}
// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
func (c *FakeMutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) {
func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.MutatingWebhookConfiguration{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/admissionregistration/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group:
var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1beta1", Kind: "ValidatingWebhookConfiguration"}
// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any.
func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
func (c *FakeValidatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &v1beta1.ValidatingWebhookConfiguration{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOpt
}
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) {
func (c *FakeValidatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &v1beta1.ValidatingWebhookConfigurationList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result
}
// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations.
func (c *FakeValidatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts))
}
// 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.
func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfigurat
}
// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{})
if obj == nil {
@@ -95,14 +97,14 @@ func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfigurat
}
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *FakeValidatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeValidatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &v1beta1.ValidatingWebhookConfiguration{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.ValidatingWebhookConfigurationList{})
@@ -110,7 +112,7 @@ func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.Delet
}
// Patch applies the patch and returns the patched validatingWebhookConfiguration.
func (c *FakeValidatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.ValidatingWebhookConfiguration{})
if obj == nil {

View File

@@ -38,14 +38,14 @@ type MutatingWebhookConfigurationsGetter interface {
// MutatingWebhookConfigurationInterface has methods to work with MutatingWebhookConfiguration resources.
type MutatingWebhookConfigurationInterface interface {
Create(*v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error)
Update(*v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error)
List(opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error)
Create(context.Context, *v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error)
Update(context.Context, *v1beta1.MutatingWebhookConfiguration) (*v1beta1.MutatingWebhookConfiguration, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.MutatingWebhookConfiguration, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error)
MutatingWebhookConfigurationExpansion
}
@@ -62,19 +62,19 @@ func newMutatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) *mu
}
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
func (c *mutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) {
func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) {
result = &v1beta1.MutatingWebhookConfiguration{}
err = c.client.Get().
Resource("mutatingwebhookconfigurations").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
func (c *mutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -84,13 +84,13 @@ func (c *mutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1bet
Resource("mutatingwebhookconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
func (c *mutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -100,44 +100,44 @@ func (c *mutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interf
Resource("mutatingwebhookconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *mutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
func (c *mutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
result = &v1beta1.MutatingWebhookConfiguration{}
err = c.client.Post().
Resource("mutatingwebhookconfigurations").
Body(mutatingWebhookConfiguration).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
func (c *mutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
func (c *mutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) {
result = &v1beta1.MutatingWebhookConfiguration{}
err = c.client.Put().
Resource("mutatingwebhookconfigurations").
Name(mutatingWebhookConfiguration.Name).
Body(mutatingWebhookConfiguration).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *mutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
func (c *mutatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("mutatingwebhookconfigurations").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *mutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *mutatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -147,19 +147,19 @@ func (c *mutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptio
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
func (c *mutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) {
func (c *mutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) {
result = &v1beta1.MutatingWebhookConfiguration{}
err = c.client.Patch(pt).
Resource("mutatingwebhookconfigurations").
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type ValidatingWebhookConfigurationsGetter interface {
// ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources.
type ValidatingWebhookConfigurationInterface interface {
Create(*v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error)
Update(*v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error)
List(opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error)
Create(context.Context, *v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error)
Update(context.Context, *v1beta1.ValidatingWebhookConfiguration) (*v1beta1.ValidatingWebhookConfiguration, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.ValidatingWebhookConfiguration, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error)
ValidatingWebhookConfigurationExpansion
}
@@ -62,19 +62,19 @@ func newValidatingWebhookConfigurations(c *AdmissionregistrationV1beta1Client) *
}
// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any.
func (c *validatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
result = &v1beta1.ValidatingWebhookConfiguration{}
err = c.client.Get().
Resource("validatingwebhookconfigurations").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) {
func (c *validatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -84,13 +84,13 @@ func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1b
Resource("validatingwebhookconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations.
func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -100,44 +100,44 @@ func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Inte
Resource("validatingwebhookconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
func (c *validatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
result = &v1beta1.ValidatingWebhookConfiguration{}
err = c.client.Post().
Resource("validatingwebhookconfigurations").
Body(validatingWebhookConfiguration).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
func (c *validatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
result = &v1beta1.ValidatingWebhookConfiguration{}
err = c.client.Put().
Resource("validatingwebhookconfigurations").
Name(validatingWebhookConfiguration.Name).
Body(validatingWebhookConfiguration).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
func (c *validatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
func (c *validatingWebhookConfigurations) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("validatingwebhookconfigurations").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *validatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *validatingWebhookConfigurations) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -147,19 +147,19 @@ func (c *validatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOpt
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched validatingWebhookConfiguration.
func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
func (c *validatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
result = &v1beta1.ValidatingWebhookConfiguration{}
err = c.client.Patch(pt).
Resource("validatingwebhookconfigurations").
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type ControllerRevisionsGetter interface {
// ControllerRevisionInterface has methods to work with ControllerRevision resources.
type ControllerRevisionInterface interface {
Create(*v1.ControllerRevision) (*v1.ControllerRevision, error)
Update(*v1.ControllerRevision) (*v1.ControllerRevision, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ControllerRevision, error)
List(opts metav1.ListOptions) (*v1.ControllerRevisionList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error)
Create(context.Context, *v1.ControllerRevision) (*v1.ControllerRevision, error)
Update(context.Context, *v1.ControllerRevision) (*v1.ControllerRevision, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ControllerRevision, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ControllerRevisionList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error)
ControllerRevisionExpansion
}
@@ -64,20 +64,20 @@ func newControllerRevisions(c *AppsV1Client, namespace string) *controllerRevisi
}
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
func (c *controllerRevisions) Get(name string, options metav1.GetOptions) (result *v1.ControllerRevision, err error) {
func (c *controllerRevisions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ControllerRevision, err error) {
result = &v1.ControllerRevision{}
err = c.client.Get().
Namespace(c.ns).
Resource("controllerrevisions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
func (c *controllerRevisions) List(opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) {
func (c *controllerRevisions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -88,13 +88,13 @@ func (c *controllerRevisions) List(opts metav1.ListOptions) (result *v1.Controll
Resource("controllerrevisions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested controllerRevisions.
func (c *controllerRevisions) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *controllerRevisions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -105,47 +105,47 @@ func (c *controllerRevisions) Watch(opts metav1.ListOptions) (watch.Interface, e
Resource("controllerrevisions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *controllerRevisions) Create(controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) {
func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) {
result = &v1.ControllerRevision{}
err = c.client.Post().
Namespace(c.ns).
Resource("controllerrevisions").
Body(controllerRevision).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
func (c *controllerRevisions) Update(controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) {
func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1.ControllerRevision) (result *v1.ControllerRevision, err error) {
result = &v1.ControllerRevision{}
err = c.client.Put().
Namespace(c.ns).
Resource("controllerrevisions").
Name(controllerRevision.Name).
Body(controllerRevision).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *controllerRevisions) Delete(name string, options *metav1.DeleteOptions) error {
func (c *controllerRevisions) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("controllerrevisions").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *controllerRevisions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *controllerRevisions) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -156,12 +156,12 @@ func (c *controllerRevisions) DeleteCollection(options *metav1.DeleteOptions, li
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched controllerRevision.
func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error) {
func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error) {
result = &v1.ControllerRevision{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -169,7 +169,7 @@ func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,15 +38,15 @@ type DaemonSetsGetter interface {
// DaemonSetInterface has methods to work with DaemonSet resources.
type DaemonSetInterface interface {
Create(*v1.DaemonSet) (*v1.DaemonSet, error)
Update(*v1.DaemonSet) (*v1.DaemonSet, error)
UpdateStatus(*v1.DaemonSet) (*v1.DaemonSet, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.DaemonSet, error)
List(opts metav1.ListOptions) (*v1.DaemonSetList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error)
Create(context.Context, *v1.DaemonSet) (*v1.DaemonSet, error)
Update(context.Context, *v1.DaemonSet) (*v1.DaemonSet, error)
UpdateStatus(context.Context, *v1.DaemonSet) (*v1.DaemonSet, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.DaemonSet, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.DaemonSetList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error)
DaemonSetExpansion
}
@@ -65,20 +65,20 @@ func newDaemonSets(c *AppsV1Client, namespace string) *daemonSets {
}
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
func (c *daemonSets) Get(name string, options metav1.GetOptions) (result *v1.DaemonSet, err error) {
func (c *daemonSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DaemonSet, err error) {
result = &v1.DaemonSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("daemonsets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *daemonSets) List(opts metav1.ListOptions) (result *v1.DaemonSetList, err error) {
func (c *daemonSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DaemonSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *daemonSets) List(opts metav1.ListOptions) (result *v1.DaemonSetList, er
Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *daemonSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *daemonSets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *daemonSets) Create(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) {
func (c *daemonSets) Create(ctx context.Context, daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) {
result = &v1.DaemonSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("daemonsets").
Body(daemonSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *daemonSets) Update(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) {
func (c *daemonSets) Update(ctx context.Context, daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) {
result = &v1.DaemonSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("daemonsets").
Name(daemonSet.Name).
Body(daemonSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *daemonSets) Update(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *daemonSets) UpdateStatus(daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) {
func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet) (result *v1.DaemonSet, err error) {
result = &v1.DaemonSet{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *daemonSets) UpdateStatus(daemonSet *v1.DaemonSet) (result *v1.DaemonSet
Name(daemonSet.Name).
SubResource("status").
Body(daemonSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *daemonSets) Delete(name string, options *metav1.DeleteOptions) error {
func (c *daemonSets) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("daemonsets").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *daemonSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *daemonSets) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *daemonSets) DeleteCollection(options *metav1.DeleteOptions, listOptions
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched daemonSet.
func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) {
func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) {
result = &v1.DaemonSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subreso
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -39,17 +39,17 @@ type DeploymentsGetter interface {
// DeploymentInterface has methods to work with Deployment resources.
type DeploymentInterface interface {
Create(*v1.Deployment) (*v1.Deployment, error)
Update(*v1.Deployment) (*v1.Deployment, error)
UpdateStatus(*v1.Deployment) (*v1.Deployment, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Deployment, error)
List(opts metav1.ListOptions) (*v1.DeploymentList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error)
GetScale(deploymentName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
UpdateScale(deploymentName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error)
Create(context.Context, *v1.Deployment) (*v1.Deployment, error)
Update(context.Context, *v1.Deployment) (*v1.Deployment, error)
UpdateStatus(context.Context, *v1.Deployment) (*v1.Deployment, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Deployment, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.DeploymentList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error)
GetScale(ctx context.Context, deploymentName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error)
DeploymentExpansion
}
@@ -69,20 +69,20 @@ func newDeployments(c *AppsV1Client, namespace string) *deployments {
}
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
func (c *deployments) Get(name string, options metav1.GetOptions) (result *v1.Deployment, err error) {
func (c *deployments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Deployment, err error) {
result = &v1.Deployment{}
err = c.client.Get().
Namespace(c.ns).
Resource("deployments").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *deployments) List(opts metav1.ListOptions) (result *v1.DeploymentList, err error) {
func (c *deployments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DeploymentList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -93,13 +93,13 @@ func (c *deployments) List(opts metav1.ListOptions) (result *v1.DeploymentList,
Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *deployments) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -110,30 +110,30 @@ func (c *deployments) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *deployments) Create(deployment *v1.Deployment) (result *v1.Deployment, err error) {
func (c *deployments) Create(ctx context.Context, deployment *v1.Deployment) (result *v1.Deployment, err error) {
result = &v1.Deployment{}
err = c.client.Post().
Namespace(c.ns).
Resource("deployments").
Body(deployment).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
func (c *deployments) Update(deployment *v1.Deployment) (result *v1.Deployment, err error) {
func (c *deployments) Update(ctx context.Context, deployment *v1.Deployment) (result *v1.Deployment, err error) {
result = &v1.Deployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("deployments").
Name(deployment.Name).
Body(deployment).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -141,7 +141,7 @@ func (c *deployments) Update(deployment *v1.Deployment) (result *v1.Deployment,
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *deployments) UpdateStatus(deployment *v1.Deployment) (result *v1.Deployment, err error) {
func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1.Deployment) (result *v1.Deployment, err error) {
result = &v1.Deployment{}
err = c.client.Put().
Namespace(c.ns).
@@ -149,24 +149,24 @@ func (c *deployments) UpdateStatus(deployment *v1.Deployment) (result *v1.Deploy
Name(deployment.Name).
SubResource("status").
Body(deployment).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *deployments) Delete(name string, options *metav1.DeleteOptions) error {
func (c *deployments) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("deployments").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *deployments) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *deployments) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -177,12 +177,12 @@ func (c *deployments) DeleteCollection(options *metav1.DeleteOptions, listOption
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched deployment.
func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error) {
func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error) {
result = &v1.Deployment{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -190,13 +190,13 @@ func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subres
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// GetScale takes name of the deployment, and returns the corresponding autoscalingv1.Scale object, and an error if there is any.
func (c *deployments) GetScale(deploymentName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) {
func (c *deployments) GetScale(ctx context.Context, deploymentName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{}
err = c.client.Get().
Namespace(c.ns).
@@ -204,13 +204,13 @@ func (c *deployments) GetScale(deploymentName string, options metav1.GetOptions)
Name(deploymentName).
SubResource("scale").
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *deployments) UpdateScale(deploymentName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
func (c *deployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{}
err = c.client.Put().
Namespace(c.ns).
@@ -218,7 +218,7 @@ func (c *deployments) UpdateScale(deploymentName string, scale *autoscalingv1.Sc
Name(deploymentName).
SubResource("scale").
Body(scale).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Ver
var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevision"}
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *appsv1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{})
@@ -50,7 +52,7 @@ func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (resul
}
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *appsv1.ControllerRevisionList, err error) {
func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.ControllerRevisionList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &appsv1.ControllerRevisionList{})
@@ -72,14 +74,14 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *appsv1.Cont
}
// Watch returns a watch.Interface that watches the requested controllerRevisions.
func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts))
}
// 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.
func (c *FakeControllerRevisions) Create(controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{})
@@ -90,7 +92,7 @@ func (c *FakeControllerRevisions) Create(controllerRevision *appsv1.ControllerRe
}
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
func (c *FakeControllerRevisions) Update(controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{})
@@ -101,7 +103,7 @@ func (c *FakeControllerRevisions) Update(controllerRevision *appsv1.ControllerRe
}
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{})
@@ -109,7 +111,7 @@ func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions)
}
// DeleteCollection deletes a collection of objects.
func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &appsv1.ControllerRevisionList{})
@@ -117,7 +119,7 @@ func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, li
}
// Patch applies the patch and returns the patched controllerRevision.
func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &appsv1.ControllerRevision{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1
var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"}
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *appsv1.DaemonSet, err error) {
func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{})
@@ -50,7 +52,7 @@ func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *appsv1
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *appsv1.DaemonSetList, err error) {
func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.DaemonSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &appsv1.DaemonSetList{})
@@ -72,14 +74,14 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *appsv1.DaemonSetList
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts))
}
// 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.
func (c *FakeDaemonSets) Create(daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) {
func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{})
@@ -90,7 +92,7 @@ func (c *FakeDaemonSets) Create(daemonSet *appsv1.DaemonSet) (result *appsv1.Dae
}
// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *FakeDaemonSets) Update(daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) {
func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{})
@@ -102,7 +104,7 @@ func (c *FakeDaemonSets) Update(daemonSet *appsv1.DaemonSet) (result *appsv1.Dae
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeDaemonSets) UpdateStatus(daemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error) {
func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &appsv1.DaemonSet{})
@@ -113,7 +115,7 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *appsv1.DaemonSet) (*appsv1.Daem
}
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeDaemonSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{})
@@ -121,7 +123,7 @@ func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &appsv1.DaemonSetList{})
@@ -129,7 +131,7 @@ func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions
}
// Patch applies the patch and returns the patched daemonSet.
func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.DaemonSet, err error) {
func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &appsv1.DaemonSet{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -40,7 +42,7 @@ var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v
var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"}
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *appsv1.Deployment, err error) {
func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &appsv1.Deployment{})
@@ -51,7 +53,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *appsv
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *FakeDeployments) List(opts v1.ListOptions) (result *appsv1.DeploymentList, err error) {
func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.DeploymentList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &appsv1.DeploymentList{})
@@ -73,14 +75,14 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *appsv1.DeploymentLi
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts))
}
// 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.
func (c *FakeDeployments) Create(deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) {
func (c *FakeDeployments) Create(ctx context.Context, deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{})
@@ -91,7 +93,7 @@ func (c *FakeDeployments) Create(deployment *appsv1.Deployment) (result *appsv1.
}
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
func (c *FakeDeployments) Update(deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) {
func (c *FakeDeployments) Update(ctx context.Context, deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{})
@@ -103,7 +105,7 @@ func (c *FakeDeployments) Update(deployment *appsv1.Deployment) (result *appsv1.
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeDeployments) UpdateStatus(deployment *appsv1.Deployment) (*appsv1.Deployment, error) {
func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *appsv1.Deployment) (*appsv1.Deployment, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &appsv1.Deployment{})
@@ -114,7 +116,7 @@ func (c *FakeDeployments) UpdateStatus(deployment *appsv1.Deployment) (*appsv1.D
}
// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeDeployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &appsv1.Deployment{})
@@ -122,7 +124,7 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &appsv1.DeploymentList{})
@@ -130,7 +132,7 @@ func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOption
}
// Patch applies the patch and returns the patched deployment.
func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.Deployment, err error) {
func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &appsv1.Deployment{})
@@ -141,7 +143,7 @@ func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, su
}
// GetScale takes name of the deployment, and returns the corresponding scale object, and an error if there is any.
func (c *FakeDeployments) GetScale(deploymentName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
func (c *FakeDeployments) GetScale(ctx context.Context, deploymentName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetSubresourceAction(deploymentsResource, c.ns, "scale", deploymentName), &autoscalingv1.Scale{})
@@ -152,7 +154,7 @@ func (c *FakeDeployments) GetScale(deploymentName string, options v1.GetOptions)
}
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *FakeDeployments) UpdateScale(deploymentName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
func (c *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &autoscalingv1.Scale{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -40,7 +42,7 @@ var replicasetsResource = schema.GroupVersionResource{Group: "apps", Version: "v
var replicasetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"}
// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *appsv1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{})
@@ -51,7 +53,7 @@ func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *appsv
}
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *appsv1.ReplicaSetList, err error) {
func (c *FakeReplicaSets) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.ReplicaSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &appsv1.ReplicaSetList{})
@@ -73,14 +75,14 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *appsv1.ReplicaSetLi
}
// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts))
}
// 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.
func (c *FakeReplicaSets) Create(replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{})
@@ -91,7 +93,7 @@ func (c *FakeReplicaSets) Create(replicaSet *appsv1.ReplicaSet) (result *appsv1.
}
// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
func (c *FakeReplicaSets) Update(replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{})
@@ -103,7 +105,7 @@ func (c *FakeReplicaSets) Update(replicaSet *appsv1.ReplicaSet) (result *appsv1.
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeReplicaSets) UpdateStatus(replicaSet *appsv1.ReplicaSet) (*appsv1.ReplicaSet, error) {
func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *appsv1.ReplicaSet) (*appsv1.ReplicaSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &appsv1.ReplicaSet{})
@@ -114,7 +116,7 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *appsv1.ReplicaSet) (*appsv1.R
}
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeReplicaSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{})
@@ -122,7 +124,7 @@ func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &appsv1.ReplicaSetList{})
@@ -130,7 +132,7 @@ func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOption
}
// Patch applies the patch and returns the patched replicaSet.
func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &appsv1.ReplicaSet{})
@@ -141,7 +143,7 @@ func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, su
}
// GetScale takes name of the replicaSet, and returns the corresponding scale object, and an error if there is any.
func (c *FakeReplicaSets) GetScale(replicaSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
func (c *FakeReplicaSets) GetScale(ctx context.Context, replicaSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetSubresourceAction(replicasetsResource, c.ns, "scale", replicaSetName), &autoscalingv1.Scale{})
@@ -152,7 +154,7 @@ func (c *FakeReplicaSets) GetScale(replicaSetName string, options v1.GetOptions)
}
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *FakeReplicaSets) UpdateScale(replicaSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
func (c *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
appsv1 "k8s.io/api/apps/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -40,7 +42,7 @@ var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: "
var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"}
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *appsv1.StatefulSet, err error) {
func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *appsv1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{})
@@ -51,7 +53,7 @@ func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *apps
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *appsv1.StatefulSetList, err error) {
func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *appsv1.StatefulSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &appsv1.StatefulSetList{})
@@ -73,14 +75,14 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *appsv1.StatefulSet
}
// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts))
}
// 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.
func (c *FakeStatefulSets) Create(statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) {
func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{})
@@ -91,7 +93,7 @@ func (c *FakeStatefulSets) Create(statefulSet *appsv1.StatefulSet) (result *apps
}
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *FakeStatefulSets) Update(statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) {
func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{})
@@ -103,7 +105,7 @@ func (c *FakeStatefulSets) Update(statefulSet *appsv1.StatefulSet) (result *apps
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeStatefulSets) UpdateStatus(statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error) {
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &appsv1.StatefulSet{})
@@ -114,7 +116,7 @@ func (c *FakeStatefulSets) UpdateStatus(statefulSet *appsv1.StatefulSet) (*appsv
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeStatefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{})
@@ -122,7 +124,7 @@ func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &appsv1.StatefulSetList{})
@@ -130,7 +132,7 @@ func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptio
}
// Patch applies the patch and returns the patched statefulSet.
func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.StatefulSet, err error) {
func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &appsv1.StatefulSet{})
@@ -141,7 +143,7 @@ func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, s
}
// GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any.
func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &autoscalingv1.Scale{})
@@ -152,7 +154,7 @@ func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOption
}
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *FakeStatefulSets) UpdateScale(statefulSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{})

View File

@@ -39,17 +39,17 @@ type ReplicaSetsGetter interface {
// ReplicaSetInterface has methods to work with ReplicaSet resources.
type ReplicaSetInterface interface {
Create(*v1.ReplicaSet) (*v1.ReplicaSet, error)
Update(*v1.ReplicaSet) (*v1.ReplicaSet, error)
UpdateStatus(*v1.ReplicaSet) (*v1.ReplicaSet, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ReplicaSet, error)
List(opts metav1.ListOptions) (*v1.ReplicaSetList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error)
GetScale(replicaSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
UpdateScale(replicaSetName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error)
Create(context.Context, *v1.ReplicaSet) (*v1.ReplicaSet, error)
Update(context.Context, *v1.ReplicaSet) (*v1.ReplicaSet, error)
UpdateStatus(context.Context, *v1.ReplicaSet) (*v1.ReplicaSet, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ReplicaSet, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ReplicaSetList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error)
GetScale(ctx context.Context, replicaSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error)
ReplicaSetExpansion
}
@@ -69,20 +69,20 @@ func newReplicaSets(c *AppsV1Client, namespace string) *replicaSets {
}
// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
func (c *replicaSets) Get(name string, options metav1.GetOptions) (result *v1.ReplicaSet, err error) {
func (c *replicaSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ReplicaSet, err error) {
result = &v1.ReplicaSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("replicasets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
func (c *replicaSets) List(opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) {
func (c *replicaSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -93,13 +93,13 @@ func (c *replicaSets) List(opts metav1.ListOptions) (result *v1.ReplicaSetList,
Resource("replicasets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *replicaSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -110,30 +110,30 @@ func (c *replicaSets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("replicasets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *replicaSets) Create(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) {
func (c *replicaSets) Create(ctx context.Context, replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) {
result = &v1.ReplicaSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("replicasets").
Body(replicaSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
func (c *replicaSets) Update(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) {
func (c *replicaSets) Update(ctx context.Context, replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) {
result = &v1.ReplicaSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("replicasets").
Name(replicaSet.Name).
Body(replicaSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -141,7 +141,7 @@ func (c *replicaSets) Update(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet,
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *replicaSets) UpdateStatus(replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) {
func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet) (result *v1.ReplicaSet, err error) {
result = &v1.ReplicaSet{}
err = c.client.Put().
Namespace(c.ns).
@@ -149,24 +149,24 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1.ReplicaSet) (result *v1.Replic
Name(replicaSet.Name).
SubResource("status").
Body(replicaSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *replicaSets) Delete(name string, options *metav1.DeleteOptions) error {
func (c *replicaSets) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("replicasets").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *replicaSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *replicaSets) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -177,12 +177,12 @@ func (c *replicaSets) DeleteCollection(options *metav1.DeleteOptions, listOption
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched replicaSet.
func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error) {
func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error) {
result = &v1.ReplicaSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -190,13 +190,13 @@ func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subres
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// GetScale takes name of the replicaSet, and returns the corresponding autoscalingv1.Scale object, and an error if there is any.
func (c *replicaSets) GetScale(replicaSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) {
func (c *replicaSets) GetScale(ctx context.Context, replicaSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{}
err = c.client.Get().
Namespace(c.ns).
@@ -204,13 +204,13 @@ func (c *replicaSets) GetScale(replicaSetName string, options metav1.GetOptions)
Name(replicaSetName).
SubResource("scale").
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *replicaSets) UpdateScale(replicaSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
func (c *replicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{}
err = c.client.Put().
Namespace(c.ns).
@@ -218,7 +218,7 @@ func (c *replicaSets) UpdateScale(replicaSetName string, scale *autoscalingv1.Sc
Name(replicaSetName).
SubResource("scale").
Body(scale).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -39,17 +39,17 @@ type StatefulSetsGetter interface {
// StatefulSetInterface has methods to work with StatefulSet resources.
type StatefulSetInterface interface {
Create(*v1.StatefulSet) (*v1.StatefulSet, error)
Update(*v1.StatefulSet) (*v1.StatefulSet, error)
UpdateStatus(*v1.StatefulSet) (*v1.StatefulSet, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.StatefulSet, error)
List(opts metav1.ListOptions) (*v1.StatefulSetList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error)
GetScale(statefulSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
UpdateScale(statefulSetName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error)
Create(context.Context, *v1.StatefulSet) (*v1.StatefulSet, error)
Update(context.Context, *v1.StatefulSet) (*v1.StatefulSet, error)
UpdateStatus(context.Context, *v1.StatefulSet) (*v1.StatefulSet, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.StatefulSet, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.StatefulSetList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error)
GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale) (*autoscalingv1.Scale, error)
StatefulSetExpansion
}
@@ -69,20 +69,20 @@ func newStatefulSets(c *AppsV1Client, namespace string) *statefulSets {
}
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
func (c *statefulSets) Get(name string, options metav1.GetOptions) (result *v1.StatefulSet, err error) {
func (c *statefulSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.StatefulSet, err error) {
result = &v1.StatefulSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("statefulsets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *statefulSets) List(opts metav1.ListOptions) (result *v1.StatefulSetList, err error) {
func (c *statefulSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StatefulSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -93,13 +93,13 @@ func (c *statefulSets) List(opts metav1.ListOptions) (result *v1.StatefulSetList
Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *statefulSets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *statefulSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -110,30 +110,30 @@ func (c *statefulSets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *statefulSets) Create(statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) {
func (c *statefulSets) Create(ctx context.Context, statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) {
result = &v1.StatefulSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("statefulsets").
Body(statefulSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *statefulSets) Update(statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) {
func (c *statefulSets) Update(ctx context.Context, statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) {
result = &v1.StatefulSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("statefulsets").
Name(statefulSet.Name).
Body(statefulSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -141,7 +141,7 @@ func (c *statefulSets) Update(statefulSet *v1.StatefulSet) (result *v1.StatefulS
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *statefulSets) UpdateStatus(statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) {
func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet) (result *v1.StatefulSet, err error) {
result = &v1.StatefulSet{}
err = c.client.Put().
Namespace(c.ns).
@@ -149,24 +149,24 @@ func (c *statefulSets) UpdateStatus(statefulSet *v1.StatefulSet) (result *v1.Sta
Name(statefulSet.Name).
SubResource("status").
Body(statefulSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *statefulSets) Delete(name string, options *metav1.DeleteOptions) error {
func (c *statefulSets) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("statefulsets").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *statefulSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *statefulSets) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -177,12 +177,12 @@ func (c *statefulSets) DeleteCollection(options *metav1.DeleteOptions, listOptio
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched statefulSet.
func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error) {
func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error) {
result = &v1.StatefulSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -190,13 +190,13 @@ func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subre
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// GetScale takes name of the statefulSet, and returns the corresponding autoscalingv1.Scale object, and an error if there is any.
func (c *statefulSets) GetScale(statefulSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) {
func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{}
err = c.client.Get().
Namespace(c.ns).
@@ -204,13 +204,13 @@ func (c *statefulSets) GetScale(statefulSetName string, options metav1.GetOption
Name(statefulSetName).
SubResource("scale").
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *statefulSets) UpdateScale(statefulSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{}
err = c.client.Put().
Namespace(c.ns).
@@ -218,7 +218,7 @@ func (c *statefulSets) UpdateScale(statefulSetName string, scale *autoscalingv1.
Name(statefulSetName).
SubResource("scale").
Body(scale).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type ControllerRevisionsGetter interface {
// ControllerRevisionInterface has methods to work with ControllerRevision resources.
type ControllerRevisionInterface interface {
Create(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
Update(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.ControllerRevision, error)
List(opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error)
Create(context.Context, *v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
Update(context.Context, *v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.ControllerRevision, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error)
ControllerRevisionExpansion
}
@@ -64,20 +64,20 @@ func newControllerRevisions(c *AppsV1beta1Client, namespace string) *controllerR
}
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) {
func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) {
result = &v1beta1.ControllerRevision{}
err = c.client.Get().
Namespace(c.ns).
Resource("controllerrevisions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -88,13 +88,13 @@ func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta1.Control
Resource("controllerrevisions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested controllerRevisions.
func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -105,47 +105,47 @@ func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error
Resource("controllerrevisions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *controllerRevisions) Create(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
result = &v1beta1.ControllerRevision{}
err = c.client.Post().
Namespace(c.ns).
Resource("controllerrevisions").
Body(controllerRevision).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
func (c *controllerRevisions) Update(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
result = &v1beta1.ControllerRevision{}
err = c.client.Put().
Namespace(c.ns).
Resource("controllerrevisions").
Name(controllerRevision.Name).
Body(controllerRevision).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
func (c *controllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("controllerrevisions").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *controllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -156,12 +156,12 @@ func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOp
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched controllerRevision.
func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) {
func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) {
result = &v1beta1.ControllerRevision{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -169,7 +169,7 @@ func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,15 +38,15 @@ type DeploymentsGetter interface {
// DeploymentInterface has methods to work with Deployment resources.
type DeploymentInterface interface {
Create(*v1beta1.Deployment) (*v1beta1.Deployment, error)
Update(*v1beta1.Deployment) (*v1beta1.Deployment, error)
UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error)
List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
Create(context.Context, *v1beta1.Deployment) (*v1beta1.Deployment, error)
Update(context.Context, *v1beta1.Deployment) (*v1beta1.Deployment, error)
UpdateStatus(context.Context, *v1beta1.Deployment) (*v1beta1.Deployment, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Deployment, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DeploymentList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
DeploymentExpansion
}
@@ -65,20 +65,20 @@ func newDeployments(c *AppsV1beta1Client, namespace string) *deployments {
}
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
func (c *deployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
result = &v1beta1.Deployment{}
err = c.client.Get().
Namespace(c.ns).
Resource("deployments").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList,
Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
func (c *deployments) Create(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
result = &v1beta1.Deployment{}
err = c.client.Post().
Namespace(c.ns).
Resource("deployments").
Body(deployment).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
func (c *deployments) Update(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
result = &v1beta1.Deployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("deployments").
Name(deployment.Name).
Body(deployment).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.De
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
result = &v1beta1.Deployment{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1be
Name(deployment.Name).
SubResource("status").
Body(deployment).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
func (c *deployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("deployments").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *deployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched deployment.
func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
result = &v1beta1.Deployment{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subres
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/apps/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Ver
var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta1", Kind: "ControllerRevision"}
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1beta1.ControllerRevision{})
@@ -50,7 +52,7 @@ func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (resul
}
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1beta1.ControllerRevisionList{})
@@ -72,14 +74,14 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta1.Con
}
// Watch returns a watch.Interface that watches the requested controllerRevisions.
func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts))
}
// 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.
func (c *FakeControllerRevisions) Create(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{})
@@ -90,7 +92,7 @@ func (c *FakeControllerRevisions) Create(controllerRevision *v1beta1.ControllerR
}
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
func (c *FakeControllerRevisions) Update(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{})
@@ -101,7 +103,7 @@ func (c *FakeControllerRevisions) Update(controllerRevision *v1beta1.ControllerR
}
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &v1beta1.ControllerRevision{})
@@ -109,7 +111,7 @@ func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions)
}
// DeleteCollection deletes a collection of objects.
func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.ControllerRevisionList{})
@@ -117,7 +119,7 @@ func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, li
}
// Patch applies the patch and returns the patched controllerRevision.
func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta1.ControllerRevision{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/apps/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v
var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta1", Kind: "Deployment"}
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
@@ -50,7 +52,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1bet
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta1.DeploymentList{})
@@ -72,14 +74,14 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentL
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts))
}
// 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.
func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
@@ -90,7 +92,7 @@ func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta
}
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
@@ -102,7 +104,7 @@ func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) {
func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{})
@@ -113,7 +115,7 @@ func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1
}
// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeDeployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
@@ -121,7 +123,7 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{})
@@ -129,7 +131,7 @@ func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOption
}
// Patch applies the patch and returns the patched deployment.
func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta1.Deployment{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/apps/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: "
var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta1", Kind: "StatefulSet"}
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{})
@@ -50,7 +52,7 @@ func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1be
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1beta1.StatefulSetList{})
@@ -72,14 +74,14 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSe
}
// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts))
}
// 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.
func (c *FakeStatefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{})
@@ -90,7 +92,7 @@ func (c *FakeStatefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1b
}
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *FakeStatefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{})
@@ -102,7 +104,7 @@ func (c *FakeStatefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1b
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) {
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta1.StatefulSet{})
@@ -113,7 +115,7 @@ func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (*v1be
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeStatefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{})
@@ -121,7 +123,7 @@ func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.StatefulSetList{})
@@ -129,7 +131,7 @@ func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptio
}
// Patch applies the patch and returns the patched statefulSet.
func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta1.StatefulSet{})

View File

@@ -38,15 +38,15 @@ type StatefulSetsGetter interface {
// StatefulSetInterface has methods to work with StatefulSet resources.
type StatefulSetInterface interface {
Create(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
Update(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
UpdateStatus(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.StatefulSet, error)
List(opts v1.ListOptions) (*v1beta1.StatefulSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error)
Create(context.Context, *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
Update(context.Context, *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
UpdateStatus(context.Context, *v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.StatefulSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StatefulSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error)
StatefulSetExpansion
}
@@ -65,20 +65,20 @@ func newStatefulSets(c *AppsV1beta1Client, namespace string) *statefulSets {
}
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
result = &v1beta1.StatefulSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("statefulsets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetLis
Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *statefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
result = &v1beta1.StatefulSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("statefulsets").
Body(statefulSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
result = &v1beta1.StatefulSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("statefulsets").
Name(statefulSet.Name).
Body(statefulSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *statefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
result = &v1beta1.StatefulSet{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *statefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (result *v
Name(statefulSet.Name).
SubResource("status").
Body(statefulSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *statefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("statefulsets").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *statefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched statefulSet.
func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
result = &v1beta1.StatefulSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subre
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type ControllerRevisionsGetter interface {
// ControllerRevisionInterface has methods to work with ControllerRevision resources.
type ControllerRevisionInterface interface {
Create(*v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error)
Update(*v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta2.ControllerRevision, error)
List(opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error)
Create(context.Context, *v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error)
Update(context.Context, *v1beta2.ControllerRevision) (*v1beta2.ControllerRevision, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.ControllerRevision, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error)
ControllerRevisionExpansion
}
@@ -64,20 +64,20 @@ func newControllerRevisions(c *AppsV1beta2Client, namespace string) *controllerR
}
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) {
func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) {
result = &v1beta2.ControllerRevision{}
err = c.client.Get().
Namespace(c.ns).
Resource("controllerrevisions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -88,13 +88,13 @@ func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta2.Control
Resource("controllerrevisions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested controllerRevisions.
func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -105,47 +105,47 @@ func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error
Resource("controllerrevisions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *controllerRevisions) Create(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
func (c *controllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
result = &v1beta2.ControllerRevision{}
err = c.client.Post().
Namespace(c.ns).
Resource("controllerrevisions").
Body(controllerRevision).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
func (c *controllerRevisions) Update(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
func (c *controllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
result = &v1beta2.ControllerRevision{}
err = c.client.Put().
Namespace(c.ns).
Resource("controllerrevisions").
Name(controllerRevision.Name).
Body(controllerRevision).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
func (c *controllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("controllerrevisions").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *controllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -156,12 +156,12 @@ func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOp
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched controllerRevision.
func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) {
func (c *controllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) {
result = &v1beta2.ControllerRevision{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -169,7 +169,7 @@ func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,15 +38,15 @@ type DaemonSetsGetter interface {
// DaemonSetInterface has methods to work with DaemonSet resources.
type DaemonSetInterface interface {
Create(*v1beta2.DaemonSet) (*v1beta2.DaemonSet, error)
Update(*v1beta2.DaemonSet) (*v1beta2.DaemonSet, error)
UpdateStatus(*v1beta2.DaemonSet) (*v1beta2.DaemonSet, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta2.DaemonSet, error)
List(opts v1.ListOptions) (*v1beta2.DaemonSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error)
Create(context.Context, *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error)
Update(context.Context, *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error)
UpdateStatus(context.Context, *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.DaemonSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DaemonSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error)
DaemonSetExpansion
}
@@ -65,20 +65,20 @@ func newDaemonSets(c *AppsV1beta2Client, namespace string) *daemonSets {
}
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) {
func (c *daemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) {
result = &v1beta2.DaemonSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("daemonsets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) {
func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetList, e
Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *daemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
func (c *daemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
result = &v1beta2.DaemonSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("daemonsets").
Body(daemonSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *daemonSets) Update(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
func (c *daemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
result = &v1beta2.DaemonSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("daemonsets").
Name(daemonSet.Name).
Body(daemonSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *daemonSets) Update(daemonSet *v1beta2.DaemonSet) (result *v1beta2.Daemo
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *daemonSets) UpdateStatus(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
result = &v1beta2.DaemonSet{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *daemonSets) UpdateStatus(daemonSet *v1beta2.DaemonSet) (result *v1beta2
Name(daemonSet.Name).
SubResource("status").
Body(daemonSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *daemonSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("daemonsets").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *daemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched daemonSet.
func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) {
func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) {
result = &v1beta2.DaemonSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subreso
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,15 +38,15 @@ type DeploymentsGetter interface {
// DeploymentInterface has methods to work with Deployment resources.
type DeploymentInterface interface {
Create(*v1beta2.Deployment) (*v1beta2.Deployment, error)
Update(*v1beta2.Deployment) (*v1beta2.Deployment, error)
UpdateStatus(*v1beta2.Deployment) (*v1beta2.Deployment, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta2.Deployment, error)
List(opts v1.ListOptions) (*v1beta2.DeploymentList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error)
Create(context.Context, *v1beta2.Deployment) (*v1beta2.Deployment, error)
Update(context.Context, *v1beta2.Deployment) (*v1beta2.Deployment, error)
UpdateStatus(context.Context, *v1beta2.Deployment) (*v1beta2.Deployment, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.Deployment, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DeploymentList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error)
DeploymentExpansion
}
@@ -65,20 +65,20 @@ func newDeployments(c *AppsV1beta2Client, namespace string) *deployments {
}
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) {
func (c *deployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) {
result = &v1beta2.Deployment{}
err = c.client.Get().
Namespace(c.ns).
Resource("deployments").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *deployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) {
func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentList,
Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("deployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *deployments) Create(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
func (c *deployments) Create(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
result = &v1beta2.Deployment{}
err = c.client.Post().
Namespace(c.ns).
Resource("deployments").
Body(deployment).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
func (c *deployments) Update(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
func (c *deployments) Update(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
result = &v1beta2.Deployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("deployments").
Name(deployment.Name).
Body(deployment).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *deployments) Update(deployment *v1beta2.Deployment) (result *v1beta2.De
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *deployments) UpdateStatus(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
func (c *deployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
result = &v1beta2.Deployment{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *deployments) UpdateStatus(deployment *v1beta2.Deployment) (result *v1be
Name(deployment.Name).
SubResource("status").
Body(deployment).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
func (c *deployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("deployments").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *deployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched deployment.
func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) {
func (c *deployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) {
result = &v1beta2.Deployment{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subres
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Ver
var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "ControllerRevision"}
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{})
@@ -50,7 +52,7 @@ func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (resul
}
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1beta2.ControllerRevisionList{})
@@ -72,14 +74,14 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta2.Con
}
// Watch returns a watch.Interface that watches the requested controllerRevisions.
func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(controllerrevisionsResource, c.ns, opts))
}
// 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.
func (c *FakeControllerRevisions) Create(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{})
@@ -90,7 +92,7 @@ func (c *FakeControllerRevisions) Create(controllerRevision *v1beta2.ControllerR
}
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
func (c *FakeControllerRevisions) Update(controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision) (result *v1beta2.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{})
@@ -101,7 +103,7 @@ func (c *FakeControllerRevisions) Update(controllerRevision *v1beta2.ControllerR
}
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeControllerRevisions) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{})
@@ -109,7 +111,7 @@ func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions)
}
// DeleteCollection deletes a collection of objects.
func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta2.ControllerRevisionList{})
@@ -117,7 +119,7 @@ func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, li
}
// Patch applies the patch and returns the patched controllerRevision.
func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta2.ControllerRevision{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1
var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "DaemonSet"}
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) {
func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &v1beta2.DaemonSet{})
@@ -50,7 +52,7 @@ func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *v1beta
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) {
func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &v1beta2.DaemonSetList{})
@@ -72,14 +74,14 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetLis
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts))
}
// 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.
func (c *FakeDaemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{})
@@ -90,7 +92,7 @@ func (c *FakeDaemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.D
}
// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *FakeDaemonSets) Update(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{})
@@ -102,7 +104,7 @@ func (c *FakeDaemonSets) Update(daemonSet *v1beta2.DaemonSet) (result *v1beta2.D
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) {
func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta2.DaemonSet{})
@@ -113,7 +115,7 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta2.DaemonSet) (*v1beta2.Da
}
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeDaemonSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &v1beta2.DaemonSet{})
@@ -121,7 +123,7 @@ func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta2.DaemonSetList{})
@@ -129,7 +131,7 @@ func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions
}
// Patch applies the patch and returns the patched daemonSet.
func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) {
func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.DaemonSet{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v
var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "Deployment"}
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) {
func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta2.Deployment{})
@@ -50,7 +52,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1bet
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) {
func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta2.DeploymentList{})
@@ -72,14 +74,14 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentL
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts))
}
// 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.
func (c *FakeDeployments) Create(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{})
@@ -90,7 +92,7 @@ func (c *FakeDeployments) Create(deployment *v1beta2.Deployment) (result *v1beta
}
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
func (c *FakeDeployments) Update(deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta2.Deployment) (result *v1beta2.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{})
@@ -102,7 +104,7 @@ func (c *FakeDeployments) Update(deployment *v1beta2.Deployment) (result *v1beta
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeDeployments) UpdateStatus(deployment *v1beta2.Deployment) (*v1beta2.Deployment, error) {
func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment) (*v1beta2.Deployment, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta2.Deployment{})
@@ -113,7 +115,7 @@ func (c *FakeDeployments) UpdateStatus(deployment *v1beta2.Deployment) (*v1beta2
}
// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeDeployments) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta2.Deployment{})
@@ -121,7 +123,7 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeDeployments) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta2.DeploymentList{})
@@ -129,7 +131,7 @@ func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOption
}
// Patch applies the patch and returns the patched deployment.
func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) {
func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta2.Deployment{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var replicasetsResource = schema.GroupVersionResource{Group: "apps", Version: "v
var replicasetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "ReplicaSet"}
// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) {
func (c *FakeReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &v1beta2.ReplicaSet{})
@@ -50,7 +52,7 @@ func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *v1bet
}
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) {
func (c *FakeReplicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &v1beta2.ReplicaSetList{})
@@ -72,14 +74,14 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetL
}
// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts))
}
// 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.
func (c *FakeReplicaSets) Create(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{})
@@ -90,7 +92,7 @@ func (c *FakeReplicaSets) Create(replicaSet *v1beta2.ReplicaSet) (result *v1beta
}
// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
func (c *FakeReplicaSets) Update(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{})
@@ -102,7 +104,7 @@ func (c *FakeReplicaSets) Update(replicaSet *v1beta2.ReplicaSet) (result *v1beta
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) {
func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta2.ReplicaSet{})
@@ -113,7 +115,7 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta2.ReplicaSet) (*v1beta2
}
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeReplicaSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta2.ReplicaSet{})
@@ -121,7 +123,7 @@ func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta2.ReplicaSetList{})
@@ -129,7 +131,7 @@ func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOption
}
// Patch applies the patch and returns the patched replicaSet.
func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) {
func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &v1beta2.ReplicaSet{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: "
var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "StatefulSet"}
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) {
func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1beta2.StatefulSet{})
@@ -50,7 +52,7 @@ func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1be
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) {
func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1beta2.StatefulSetList{})
@@ -72,14 +74,14 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSe
}
// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts))
}
// 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.
func (c *FakeStatefulSets) Create(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{})
@@ -90,7 +92,7 @@ func (c *FakeStatefulSets) Create(statefulSet *v1beta2.StatefulSet) (result *v1b
}
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *FakeStatefulSets) Update(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{})
@@ -102,7 +104,7 @@ func (c *FakeStatefulSets) Update(statefulSet *v1beta2.StatefulSet) (result *v1b
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) {
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta2.StatefulSet{})
@@ -113,7 +115,7 @@ func (c *FakeStatefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (*v1be
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeStatefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &v1beta2.StatefulSet{})
@@ -121,7 +123,7 @@ func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta2.StatefulSetList{})
@@ -129,7 +131,7 @@ func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptio
}
// Patch applies the patch and returns the patched statefulSet.
func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) {
func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.StatefulSet{})
@@ -140,7 +142,7 @@ func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, s
}
// GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any.
func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) {
func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &v1beta2.Scale{})
@@ -151,7 +153,7 @@ func (c *FakeStatefulSets) GetScale(statefulSetName string, options v1.GetOption
}
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *FakeStatefulSets) UpdateScale(statefulSetName string, scale *v1beta2.Scale) (result *v1beta2.Scale, err error) {
func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale) (result *v1beta2.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &v1beta2.Scale{})

View File

@@ -38,15 +38,15 @@ type ReplicaSetsGetter interface {
// ReplicaSetInterface has methods to work with ReplicaSet resources.
type ReplicaSetInterface interface {
Create(*v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error)
Update(*v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error)
UpdateStatus(*v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta2.ReplicaSet, error)
List(opts v1.ListOptions) (*v1beta2.ReplicaSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error)
Create(context.Context, *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error)
Update(context.Context, *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error)
UpdateStatus(context.Context, *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.ReplicaSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ReplicaSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error)
ReplicaSetExpansion
}
@@ -65,20 +65,20 @@ func newReplicaSets(c *AppsV1beta2Client, namespace string) *replicaSets {
}
// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) {
func (c *replicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) {
result = &v1beta2.ReplicaSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("replicasets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) {
func (c *replicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetList,
Resource("replicasets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("replicasets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *replicaSets) Create(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
func (c *replicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
result = &v1beta2.ReplicaSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("replicasets").
Body(replicaSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
func (c *replicaSets) Update(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
func (c *replicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
result = &v1beta2.ReplicaSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("replicasets").
Name(replicaSet.Name).
Body(replicaSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *replicaSets) Update(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.Re
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *replicaSets) UpdateStatus(replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
func (c *replicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet) (result *v1beta2.ReplicaSet, err error) {
result = &v1beta2.ReplicaSet{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1beta2.ReplicaSet) (result *v1be
Name(replicaSet.Name).
SubResource("status").
Body(replicaSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *replicaSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("replicasets").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *replicaSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched replicaSet.
func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) {
func (c *replicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.ReplicaSet, err error) {
result = &v1beta2.ReplicaSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subres
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,17 +38,17 @@ type StatefulSetsGetter interface {
// StatefulSetInterface has methods to work with StatefulSet resources.
type StatefulSetInterface interface {
Create(*v1beta2.StatefulSet) (*v1beta2.StatefulSet, error)
Update(*v1beta2.StatefulSet) (*v1beta2.StatefulSet, error)
UpdateStatus(*v1beta2.StatefulSet) (*v1beta2.StatefulSet, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta2.StatefulSet, error)
List(opts v1.ListOptions) (*v1beta2.StatefulSetList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error)
GetScale(statefulSetName string, options v1.GetOptions) (*v1beta2.Scale, error)
UpdateScale(statefulSetName string, scale *v1beta2.Scale) (*v1beta2.Scale, error)
Create(context.Context, *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error)
Update(context.Context, *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error)
UpdateStatus(context.Context, *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta2.StatefulSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.StatefulSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error)
GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (*v1beta2.Scale, error)
UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale) (*v1beta2.Scale, error)
StatefulSetExpansion
}
@@ -68,20 +68,20 @@ func newStatefulSets(c *AppsV1beta2Client, namespace string) *statefulSets {
}
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) {
func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) {
result = &v1beta2.StatefulSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("statefulsets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) {
func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -92,13 +92,13 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSetLis
Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -109,30 +109,30 @@ func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *statefulSets) Create(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
func (c *statefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
result = &v1beta2.StatefulSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("statefulsets").
Body(statefulSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *statefulSets) Update(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
func (c *statefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
result = &v1beta2.StatefulSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("statefulsets").
Name(statefulSet.Name).
Body(statefulSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -140,7 +140,7 @@ func (c *statefulSets) Update(statefulSet *v1beta2.StatefulSet) (result *v1beta2
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *statefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet) (result *v1beta2.StatefulSet, err error) {
result = &v1beta2.StatefulSet{}
err = c.client.Put().
Namespace(c.ns).
@@ -148,24 +148,24 @@ func (c *statefulSets) UpdateStatus(statefulSet *v1beta2.StatefulSet) (result *v
Name(statefulSet.Name).
SubResource("status").
Body(statefulSet).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *statefulSets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("statefulsets").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *statefulSets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -176,12 +176,12 @@ func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched statefulSet.
func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) {
func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.StatefulSet, err error) {
result = &v1beta2.StatefulSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -189,13 +189,13 @@ func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subre
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// GetScale takes name of the statefulSet, and returns the corresponding v1beta2.Scale object, and an error if there is any.
func (c *statefulSets) GetScale(statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) {
func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) {
result = &v1beta2.Scale{}
err = c.client.Get().
Namespace(c.ns).
@@ -203,13 +203,13 @@ func (c *statefulSets) GetScale(statefulSetName string, options v1.GetOptions) (
Name(statefulSetName).
SubResource("scale").
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *statefulSets) UpdateScale(statefulSetName string, scale *v1beta2.Scale) (result *v1beta2.Scale, err error) {
func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale) (result *v1beta2.Scale, err error) {
result = &v1beta2.Scale{}
err = c.client.Put().
Namespace(c.ns).
@@ -217,7 +217,7 @@ func (c *statefulSets) UpdateScale(statefulSetName string, scale *v1beta2.Scale)
Name(statefulSetName).
SubResource("scale").
Body(scale).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type AuditSinksGetter interface {
// AuditSinkInterface has methods to work with AuditSink resources.
type AuditSinkInterface interface {
Create(*v1alpha1.AuditSink) (*v1alpha1.AuditSink, error)
Update(*v1alpha1.AuditSink) (*v1alpha1.AuditSink, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.AuditSink, error)
List(opts v1.ListOptions) (*v1alpha1.AuditSinkList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error)
Create(context.Context, *v1alpha1.AuditSink) (*v1alpha1.AuditSink, error)
Update(context.Context, *v1alpha1.AuditSink) (*v1alpha1.AuditSink, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.AuditSink, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AuditSinkList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error)
AuditSinkExpansion
}
@@ -62,19 +62,19 @@ func newAuditSinks(c *AuditregistrationV1alpha1Client) *auditSinks {
}
// Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any.
func (c *auditSinks) Get(name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) {
func (c *auditSinks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) {
result = &v1alpha1.AuditSink{}
err = c.client.Get().
Resource("auditsinks").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of AuditSinks that match those selectors.
func (c *auditSinks) List(opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) {
func (c *auditSinks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -84,13 +84,13 @@ func (c *auditSinks) List(opts v1.ListOptions) (result *v1alpha1.AuditSinkList,
Resource("auditsinks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested auditSinks.
func (c *auditSinks) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *auditSinks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -100,44 +100,44 @@ func (c *auditSinks) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("auditsinks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *auditSinks) Create(auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) {
func (c *auditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) {
result = &v1alpha1.AuditSink{}
err = c.client.Post().
Resource("auditsinks").
Body(auditSink).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any.
func (c *auditSinks) Update(auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) {
func (c *auditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) {
result = &v1alpha1.AuditSink{}
err = c.client.Put().
Resource("auditsinks").
Name(auditSink.Name).
Body(auditSink).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the auditSink and deletes it. Returns an error if one occurs.
func (c *auditSinks) Delete(name string, options *v1.DeleteOptions) error {
func (c *auditSinks) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("auditsinks").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *auditSinks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *auditSinks) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -147,19 +147,19 @@ func (c *auditSinks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched auditSink.
func (c *auditSinks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) {
func (c *auditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) {
result = &v1alpha1.AuditSink{}
err = c.client.Patch(pt).
Resource("auditsinks").
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1alpha1 "k8s.io/api/auditregistration/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var auditsinksResource = schema.GroupVersionResource{Group: "auditregistration.k
var auditsinksKind = schema.GroupVersionKind{Group: "auditregistration.k8s.io", Version: "v1alpha1", Kind: "AuditSink"}
// Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any.
func (c *FakeAuditSinks) Get(name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) {
func (c *FakeAuditSinks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(auditsinksResource, name), &v1alpha1.AuditSink{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeAuditSinks) Get(name string, options v1.GetOptions) (result *v1alph
}
// List takes label and field selectors, and returns the list of AuditSinks that match those selectors.
func (c *FakeAuditSinks) List(opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) {
func (c *FakeAuditSinks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(auditsinksResource, auditsinksKind, opts), &v1alpha1.AuditSinkList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeAuditSinks) List(opts v1.ListOptions) (result *v1alpha1.AuditSinkLi
}
// Watch returns a watch.Interface that watches the requested auditSinks.
func (c *FakeAuditSinks) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeAuditSinks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(auditsinksResource, opts))
}
// 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.
func (c *FakeAuditSinks) Create(auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) {
func (c *FakeAuditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeAuditSinks) Create(auditSink *v1alpha1.AuditSink) (result *v1alpha1
}
// Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any.
func (c *FakeAuditSinks) Update(auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) {
func (c *FakeAuditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink) (result *v1alpha1.AuditSink, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{})
if obj == nil {
@@ -95,14 +97,14 @@ func (c *FakeAuditSinks) Update(auditSink *v1alpha1.AuditSink) (result *v1alpha1
}
// Delete takes name of the auditSink and deletes it. Returns an error if one occurs.
func (c *FakeAuditSinks) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeAuditSinks) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(auditsinksResource, name), &v1alpha1.AuditSink{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeAuditSinks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeAuditSinks) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.AuditSinkList{})
@@ -110,7 +112,7 @@ func (c *FakeAuditSinks) DeleteCollection(options *v1.DeleteOptions, listOptions
}
// Patch applies the patch and returns the patched auditSink.
func (c *FakeAuditSinks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) {
func (c *FakeAuditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.AuditSink, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(auditsinksResource, name, pt, data, subresources...), &v1alpha1.AuditSink{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1 "k8s.io/api/authentication/v1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -34,7 +36,7 @@ var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8
var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1", Kind: "TokenReview"}
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
func (c *FakeTokenReviews) Create(tokenReview *v1.TokenReview) (result *v1.TokenReview, err error) {
func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview) (result *v1.TokenReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1.TokenReview{})
if obj == nil {

View File

@@ -33,7 +33,7 @@ type TokenReviewsGetter interface {
// TokenReviewInterface has methods to work with TokenReview resources.
type TokenReviewInterface interface {
Create(*v1.TokenReview) (*v1.TokenReview, error)
Create(context.Context, *v1.TokenReview) (*v1.TokenReview, error)
TokenReviewExpansion
}
@@ -50,12 +50,12 @@ func newTokenReviews(c *AuthenticationV1Client) *tokenReviews {
}
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
func (c *tokenReviews) Create(tokenReview *v1.TokenReview) (result *v1.TokenReview, err error) {
func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview) (result *v1.TokenReview, err error) {
result = &v1.TokenReview{}
err = c.client.Post().
Resource("tokenreviews").
Body(tokenReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/authentication/v1beta1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -34,7 +36,7 @@ var tokenreviewsResource = schema.GroupVersionResource{Group: "authentication.k8
var tokenreviewsKind = schema.GroupVersionKind{Group: "authentication.k8s.io", Version: "v1beta1", Kind: "TokenReview"}
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
func (c *FakeTokenReviews) Create(tokenReview *v1beta1.TokenReview) (result *v1beta1.TokenReview, err error) {
func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview) (result *v1beta1.TokenReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1beta1.TokenReview{})
if obj == nil {

View File

@@ -33,7 +33,7 @@ type TokenReviewsGetter interface {
// TokenReviewInterface has methods to work with TokenReview resources.
type TokenReviewInterface interface {
Create(*v1beta1.TokenReview) (*v1beta1.TokenReview, error)
Create(context.Context, *v1beta1.TokenReview) (*v1beta1.TokenReview, error)
TokenReviewExpansion
}
@@ -50,12 +50,12 @@ func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews {
}
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
func (c *tokenReviews) Create(tokenReview *v1beta1.TokenReview) (result *v1beta1.TokenReview, err error) {
func (c *tokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview) (result *v1beta1.TokenReview, err error) {
result = &v1beta1.TokenReview{}
err = c.client.Post().
Resource("tokenreviews").
Body(tokenReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1 "k8s.io/api/authorization/v1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -35,7 +37,7 @@ var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "auth
var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "LocalSubjectAccessReview"}
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
func (c *FakeLocalSubjectAccessReviews) Create(localSubjectAccessReview *v1.LocalSubjectAccessReview) (result *v1.LocalSubjectAccessReview, err error) {
func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview) (result *v1.LocalSubjectAccessReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1.LocalSubjectAccessReview{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1 "k8s.io/api/authorization/v1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -34,7 +36,7 @@ var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "autho
var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectAccessReview"}
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
func (c *FakeSelfSubjectAccessReviews) Create(selfSubjectAccessReview *v1.SelfSubjectAccessReview) (result *v1.SelfSubjectAccessReview, err error) {
func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview) (result *v1.SelfSubjectAccessReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1.SelfSubjectAccessReview{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1 "k8s.io/api/authorization/v1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -34,7 +36,7 @@ var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "author
var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SelfSubjectRulesReview"}
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
func (c *FakeSelfSubjectRulesReviews) Create(selfSubjectRulesReview *v1.SelfSubjectRulesReview) (result *v1.SelfSubjectRulesReview, err error) {
func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview) (result *v1.SelfSubjectRulesReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1.SelfSubjectRulesReview{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1 "k8s.io/api/authorization/v1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -34,7 +36,7 @@ var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authoriza
var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "SubjectAccessReview"}
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
func (c *FakeSubjectAccessReviews) Create(subjectAccessReview *v1.SubjectAccessReview) (result *v1.SubjectAccessReview, err error) {
func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview) (result *v1.SubjectAccessReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1.SubjectAccessReview{})
if obj == nil {

View File

@@ -33,7 +33,7 @@ type LocalSubjectAccessReviewsGetter interface {
// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
type LocalSubjectAccessReviewInterface interface {
Create(*v1.LocalSubjectAccessReview) (*v1.LocalSubjectAccessReview, error)
Create(context.Context, *v1.LocalSubjectAccessReview) (*v1.LocalSubjectAccessReview, error)
LocalSubjectAccessReviewExpansion
}
@@ -52,13 +52,13 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *l
}
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
func (c *localSubjectAccessReviews) Create(localSubjectAccessReview *v1.LocalSubjectAccessReview) (result *v1.LocalSubjectAccessReview, err error) {
func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview) (result *v1.LocalSubjectAccessReview, err error) {
result = &v1.LocalSubjectAccessReview{}
err = c.client.Post().
Namespace(c.ns).
Resource("localsubjectaccessreviews").
Body(localSubjectAccessReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -33,7 +33,7 @@ type SelfSubjectAccessReviewsGetter interface {
// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
type SelfSubjectAccessReviewInterface interface {
Create(*v1.SelfSubjectAccessReview) (*v1.SelfSubjectAccessReview, error)
Create(context.Context, *v1.SelfSubjectAccessReview) (*v1.SelfSubjectAccessReview, error)
SelfSubjectAccessReviewExpansion
}
@@ -50,12 +50,12 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessRev
}
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
func (c *selfSubjectAccessReviews) Create(selfSubjectAccessReview *v1.SelfSubjectAccessReview) (result *v1.SelfSubjectAccessReview, err error) {
func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview) (result *v1.SelfSubjectAccessReview, err error) {
result = &v1.SelfSubjectAccessReview{}
err = c.client.Post().
Resource("selfsubjectaccessreviews").
Body(selfSubjectAccessReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -33,7 +33,7 @@ type SelfSubjectRulesReviewsGetter interface {
// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
type SelfSubjectRulesReviewInterface interface {
Create(*v1.SelfSubjectRulesReview) (*v1.SelfSubjectRulesReview, error)
Create(context.Context, *v1.SelfSubjectRulesReview) (*v1.SelfSubjectRulesReview, error)
SelfSubjectRulesReviewExpansion
}
@@ -50,12 +50,12 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1Client) *selfSubjectRulesRevie
}
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
func (c *selfSubjectRulesReviews) Create(selfSubjectRulesReview *v1.SelfSubjectRulesReview) (result *v1.SelfSubjectRulesReview, err error) {
func (c *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview) (result *v1.SelfSubjectRulesReview, err error) {
result = &v1.SelfSubjectRulesReview{}
err = c.client.Post().
Resource("selfsubjectrulesreviews").
Body(selfSubjectRulesReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -33,7 +33,7 @@ type SubjectAccessReviewsGetter interface {
// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
type SubjectAccessReviewInterface interface {
Create(*v1.SubjectAccessReview) (*v1.SubjectAccessReview, error)
Create(context.Context, *v1.SubjectAccessReview) (*v1.SubjectAccessReview, error)
SubjectAccessReviewExpansion
}
@@ -50,12 +50,12 @@ func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews {
}
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
func (c *subjectAccessReviews) Create(subjectAccessReview *v1.SubjectAccessReview) (result *v1.SubjectAccessReview, err error) {
func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview) (result *v1.SubjectAccessReview, err error) {
result = &v1.SubjectAccessReview{}
err = c.client.Post().
Resource("subjectaccessreviews").
Body(subjectAccessReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/authorization/v1beta1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -35,7 +37,7 @@ var localsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "auth
var localsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "LocalSubjectAccessReview"}
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
func (c *FakeLocalSubjectAccessReviews) Create(localSubjectAccessReview *v1beta1.LocalSubjectAccessReview) (result *v1beta1.LocalSubjectAccessReview, err error) {
func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview) (result *v1beta1.LocalSubjectAccessReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1beta1.LocalSubjectAccessReview{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/authorization/v1beta1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -34,7 +36,7 @@ var selfsubjectaccessreviewsResource = schema.GroupVersionResource{Group: "autho
var selfsubjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SelfSubjectAccessReview"}
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
func (c *FakeSelfSubjectAccessReviews) Create(selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview) (result *v1beta1.SelfSubjectAccessReview, err error) {
func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview) (result *v1beta1.SelfSubjectAccessReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1beta1.SelfSubjectAccessReview{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/authorization/v1beta1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -34,7 +36,7 @@ var selfsubjectrulesreviewsResource = schema.GroupVersionResource{Group: "author
var selfsubjectrulesreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SelfSubjectRulesReview"}
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
func (c *FakeSelfSubjectRulesReviews) Create(selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview) (result *v1beta1.SelfSubjectRulesReview, err error) {
func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview) (result *v1beta1.SelfSubjectRulesReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1beta1.SelfSubjectRulesReview{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/authorization/v1beta1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
testing "k8s.io/client-go/testing"
@@ -34,7 +36,7 @@ var subjectaccessreviewsResource = schema.GroupVersionResource{Group: "authoriza
var subjectaccessreviewsKind = schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1beta1", Kind: "SubjectAccessReview"}
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
func (c *FakeSubjectAccessReviews) Create(subjectAccessReview *v1beta1.SubjectAccessReview) (result *v1beta1.SubjectAccessReview, err error) {
func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview) (result *v1beta1.SubjectAccessReview, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1beta1.SubjectAccessReview{})
if obj == nil {

View File

@@ -33,7 +33,7 @@ type LocalSubjectAccessReviewsGetter interface {
// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
type LocalSubjectAccessReviewInterface interface {
Create(*v1beta1.LocalSubjectAccessReview) (*v1beta1.LocalSubjectAccessReview, error)
Create(context.Context, *v1beta1.LocalSubjectAccessReview) (*v1beta1.LocalSubjectAccessReview, error)
LocalSubjectAccessReviewExpansion
}
@@ -52,13 +52,13 @@ func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace strin
}
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
func (c *localSubjectAccessReviews) Create(localSubjectAccessReview *v1beta1.LocalSubjectAccessReview) (result *v1beta1.LocalSubjectAccessReview, err error) {
func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview) (result *v1beta1.LocalSubjectAccessReview, err error) {
result = &v1beta1.LocalSubjectAccessReview{}
err = c.client.Post().
Namespace(c.ns).
Resource("localsubjectaccessreviews").
Body(localSubjectAccessReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -33,7 +33,7 @@ type SelfSubjectAccessReviewsGetter interface {
// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
type SelfSubjectAccessReviewInterface interface {
Create(*v1beta1.SelfSubjectAccessReview) (*v1beta1.SelfSubjectAccessReview, error)
Create(context.Context, *v1beta1.SelfSubjectAccessReview) (*v1beta1.SelfSubjectAccessReview, error)
SelfSubjectAccessReviewExpansion
}
@@ -50,12 +50,12 @@ func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAcce
}
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
func (c *selfSubjectAccessReviews) Create(selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview) (result *v1beta1.SelfSubjectAccessReview, err error) {
func (c *selfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview) (result *v1beta1.SelfSubjectAccessReview, err error) {
result = &v1beta1.SelfSubjectAccessReview{}
err = c.client.Post().
Resource("selfsubjectaccessreviews").
Body(selfSubjectAccessReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -33,7 +33,7 @@ type SelfSubjectRulesReviewsGetter interface {
// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
type SelfSubjectRulesReviewInterface interface {
Create(*v1beta1.SelfSubjectRulesReview) (*v1beta1.SelfSubjectRulesReview, error)
Create(context.Context, *v1beta1.SelfSubjectRulesReview) (*v1beta1.SelfSubjectRulesReview, error)
SelfSubjectRulesReviewExpansion
}
@@ -50,12 +50,12 @@ func newSelfSubjectRulesReviews(c *AuthorizationV1beta1Client) *selfSubjectRules
}
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
func (c *selfSubjectRulesReviews) Create(selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview) (result *v1beta1.SelfSubjectRulesReview, err error) {
func (c *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview) (result *v1beta1.SelfSubjectRulesReview, err error) {
result = &v1beta1.SelfSubjectRulesReview{}
err = c.client.Post().
Resource("selfsubjectrulesreviews").
Body(selfSubjectRulesReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -33,7 +33,7 @@ type SubjectAccessReviewsGetter interface {
// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
type SubjectAccessReviewInterface interface {
Create(*v1beta1.SubjectAccessReview) (*v1beta1.SubjectAccessReview, error)
Create(context.Context, *v1beta1.SubjectAccessReview) (*v1beta1.SubjectAccessReview, error)
SubjectAccessReviewExpansion
}
@@ -50,12 +50,12 @@ func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReview
}
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
func (c *subjectAccessReviews) Create(subjectAccessReview *v1beta1.SubjectAccessReview) (result *v1beta1.SubjectAccessReview, err error) {
func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview) (result *v1beta1.SubjectAccessReview, err error) {
result = &v1beta1.SubjectAccessReview{}
err = c.client.Post().
Resource("subjectaccessreviews").
Body(subjectAccessReview).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autos
var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{})
@@ -50,7 +52,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscalingv1.HorizontalPodAutoscalerList, err error) {
func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *autoscalingv1.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &autoscalingv1.HorizontalPodAutoscalerList{})
@@ -72,14 +74,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autosc
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
}
// 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.
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{})
@@ -90,7 +92,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscali
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{})
@@ -102,7 +104,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscali
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (*autoscalingv1.HorizontalPodAutoscaler, error) {
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (*autoscalingv1.HorizontalPodAutoscaler, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{})
@@ -113,7 +115,7 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *aut
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{})
@@ -121,7 +123,7 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt
}
// DeleteCollection deletes a collection of objects.
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &autoscalingv1.HorizontalPodAutoscalerList{})
@@ -129,7 +131,7 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOption
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &autoscalingv1.HorizontalPodAutoscaler{})

View File

@@ -38,15 +38,15 @@ type HorizontalPodAutoscalersGetter interface {
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
type HorizontalPodAutoscalerInterface interface {
Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
List(opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
Create(context.Context, *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
Update(context.Context, *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
UpdateStatus(context.Context, *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion
}
@@ -65,20 +65,20 @@ func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *hori
}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *horizontalPodAutoscalers) Get(name string, options metav1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *horizontalPodAutoscalers) List(opts metav1.ListOptions) (result *v1.Hor
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *horizontalPodAutoscalers) Watch(opts metav1.ListOptions) (watch.Interfa
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Post().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Body(horizontalPodAutoscaler).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(horizontalPodAutoscaler.Name).
Body(horizontalPodAutoscaler).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.Horizontal
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.Hori
Name(horizontalPodAutoscaler.Name).
SubResource("status").
Body(horizontalPodAutoscaler).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(name string, options *metav1.DeleteOptions) error {
func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *metav1.DeleteOption
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data [
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v2beta1 "k8s.io/api/autoscaling/v2beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autos
var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscaler"}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{})
@@ -50,7 +52,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta1.HorizontalPodAutoscalerList{})
@@ -72,14 +74,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
}
// 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.
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{})
@@ -90,7 +92,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.H
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{})
@@ -102,7 +104,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.H
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) {
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{})
@@ -113,7 +115,7 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2b
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{})
@@ -121,7 +123,7 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt
}
// DeleteCollection deletes a collection of objects.
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v2beta1.HorizontalPodAutoscalerList{})
@@ -129,7 +131,7 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOption
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta1.HorizontalPodAutoscaler{})

View File

@@ -38,15 +38,15 @@ type HorizontalPodAutoscalersGetter interface {
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
type HorizontalPodAutoscalerInterface interface {
Create(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
Update(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
UpdateStatus(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error)
List(opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error)
Create(context.Context, *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
Update(context.Context, *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
UpdateStatus(context.Context, *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error)
List(ctx context.Context, opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion
}
@@ -65,20 +65,20 @@ func newHorizontalPodAutoscalers(c *AutoscalingV2beta1Client, namespace string)
}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.Ho
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface,
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Post().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Body(horizontalPodAutoscaler).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(horizontalPodAutoscaler.Name).
Body(horizontalPodAutoscaler).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.Horiz
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta1
Name(horizontalPodAutoscaler.Name).
SubResource("status").
Body(horizontalPodAutoscaler).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, l
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data [
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v2beta2 "k8s.io/api/autoscaling/v2beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autos
var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta2", Kind: "HorizontalPodAutoscaler"}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{})
@@ -50,7 +52,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta2.HorizontalPodAutoscalerList{})
@@ -72,14 +74,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
}
// 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.
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
@@ -90,7 +92,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.H
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
@@ -102,7 +104,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.H
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) {
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
@@ -113,7 +115,7 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2b
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{})
@@ -121,7 +123,7 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt
}
// DeleteCollection deletes a collection of objects.
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v2beta2.HorizontalPodAutoscalerList{})
@@ -129,7 +131,7 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOption
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta2.HorizontalPodAutoscaler{})

View File

@@ -38,15 +38,15 @@ type HorizontalPodAutoscalersGetter interface {
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
type HorizontalPodAutoscalerInterface interface {
Create(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
Update(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
UpdateStatus(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error)
List(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error)
Create(context.Context, *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
Update(context.Context, *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
UpdateStatus(context.Context, *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error)
List(ctx context.Context, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion
}
@@ -65,20 +65,20 @@ func newHorizontalPodAutoscalers(c *AutoscalingV2beta2Client, namespace string)
}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.Ho
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface,
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Post().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Body(horizontalPodAutoscaler).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(horizontalPodAutoscaler.Name).
Body(horizontalPodAutoscaler).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.Horiz
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2
Name(horizontalPodAutoscaler.Name).
SubResource("status").
Body(horizontalPodAutoscaler).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, l
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data [
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
batchv1 "k8s.io/api/batch/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var jobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1", Re
var jobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1", Kind: "Job"}
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batchv1.Job, err error) {
func (c *FakeJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *batchv1.Job, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(jobsResource, c.ns, name), &batchv1.Job{})
@@ -50,7 +52,7 @@ func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batchv1.Job,
}
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
func (c *FakeJobs) List(opts v1.ListOptions) (result *batchv1.JobList, err error) {
func (c *FakeJobs) List(ctx context.Context, opts v1.ListOptions) (result *batchv1.JobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), &batchv1.JobList{})
@@ -72,14 +74,14 @@ func (c *FakeJobs) List(opts v1.ListOptions) (result *batchv1.JobList, err error
}
// Watch returns a watch.Interface that watches the requested jobs.
func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts))
}
// 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.
func (c *FakeJobs) Create(job *batchv1.Job) (result *batchv1.Job, err error) {
func (c *FakeJobs) Create(ctx context.Context, job *batchv1.Job) (result *batchv1.Job, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &batchv1.Job{})
@@ -90,7 +92,7 @@ func (c *FakeJobs) Create(job *batchv1.Job) (result *batchv1.Job, err error) {
}
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
func (c *FakeJobs) Update(job *batchv1.Job) (result *batchv1.Job, err error) {
func (c *FakeJobs) Update(ctx context.Context, job *batchv1.Job) (result *batchv1.Job, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &batchv1.Job{})
@@ -102,7 +104,7 @@ func (c *FakeJobs) Update(job *batchv1.Job) (result *batchv1.Job, err error) {
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeJobs) UpdateStatus(job *batchv1.Job) (*batchv1.Job, error) {
func (c *FakeJobs) UpdateStatus(ctx context.Context, job *batchv1.Job) (*batchv1.Job, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batchv1.Job{})
@@ -113,7 +115,7 @@ func (c *FakeJobs) UpdateStatus(job *batchv1.Job) (*batchv1.Job, error) {
}
// Delete takes name of the job and deletes it. Returns an error if one occurs.
func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &batchv1.Job{})
@@ -121,7 +123,7 @@ func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &batchv1.JobList{})
@@ -129,7 +131,7 @@ func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
}
// Patch applies the patch and returns the patched job.
func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batchv1.Job, err error) {
func (c *FakeJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *batchv1.Job, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, pt, data, subresources...), &batchv1.Job{})

View File

@@ -38,15 +38,15 @@ type JobsGetter interface {
// JobInterface has methods to work with Job resources.
type JobInterface interface {
Create(*v1.Job) (*v1.Job, error)
Update(*v1.Job) (*v1.Job, error)
UpdateStatus(*v1.Job) (*v1.Job, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Job, error)
List(opts metav1.ListOptions) (*v1.JobList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
Create(context.Context, *v1.Job) (*v1.Job, error)
Update(context.Context, *v1.Job) (*v1.Job, error)
UpdateStatus(context.Context, *v1.Job) (*v1.Job, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Job, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.JobList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
JobExpansion
}
@@ -65,20 +65,20 @@ func newJobs(c *BatchV1Client, namespace string) *jobs {
}
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
func (c *jobs) Get(name string, options metav1.GetOptions) (result *v1.Job, err error) {
func (c *jobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Job, err error) {
result = &v1.Job{}
err = c.client.Get().
Namespace(c.ns).
Resource("jobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
func (c *jobs) List(opts metav1.ListOptions) (result *v1.JobList, err error) {
func (c *jobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.JobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *jobs) List(opts metav1.ListOptions) (result *v1.JobList, err error) {
Resource("jobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested jobs.
func (c *jobs) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *jobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *jobs) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("jobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *jobs) Create(job *v1.Job) (result *v1.Job, err error) {
func (c *jobs) Create(ctx context.Context, job *v1.Job) (result *v1.Job, err error) {
result = &v1.Job{}
err = c.client.Post().
Namespace(c.ns).
Resource("jobs").
Body(job).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
func (c *jobs) Update(job *v1.Job) (result *v1.Job, err error) {
func (c *jobs) Update(ctx context.Context, job *v1.Job) (result *v1.Job, err error) {
result = &v1.Job{}
err = c.client.Put().
Namespace(c.ns).
Resource("jobs").
Name(job.Name).
Body(job).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *jobs) Update(job *v1.Job) (result *v1.Job, err error) {
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) {
func (c *jobs) UpdateStatus(ctx context.Context, job *v1.Job) (result *v1.Job, err error) {
result = &v1.Job{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) {
Name(job.Name).
SubResource("status").
Body(job).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the job and deletes it. Returns an error if one occurs.
func (c *jobs) Delete(name string, options *metav1.DeleteOptions) error {
func (c *jobs) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("jobs").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *jobs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *jobs) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *jobs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched job.
func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
func (c *jobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
result = &v1.Job{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,15 +38,15 @@ type CronJobsGetter interface {
// CronJobInterface has methods to work with CronJob resources.
type CronJobInterface interface {
Create(*v1beta1.CronJob) (*v1beta1.CronJob, error)
Update(*v1beta1.CronJob) (*v1beta1.CronJob, error)
UpdateStatus(*v1beta1.CronJob) (*v1beta1.CronJob, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.CronJob, error)
List(opts v1.ListOptions) (*v1beta1.CronJobList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error)
Create(context.Context, *v1beta1.CronJob) (*v1beta1.CronJob, error)
Update(context.Context, *v1beta1.CronJob) (*v1beta1.CronJob, error)
UpdateStatus(context.Context, *v1beta1.CronJob) (*v1beta1.CronJob, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.CronJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CronJobList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error)
CronJobExpansion
}
@@ -65,20 +65,20 @@ func newCronJobs(c *BatchV1beta1Client, namespace string) *cronJobs {
}
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) {
func (c *cronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) {
result = &v1beta1.CronJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("cronjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
func (c *cronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err error) {
func (c *cronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CronJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err e
Resource("cronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested cronJobs.
func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *cronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("cronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *cronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
func (c *cronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
result = &v1beta1.CronJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("cronjobs").
Body(cronJob).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
func (c *cronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
func (c *cronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
result = &v1beta1.CronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("cronjobs").
Name(cronJob.Name).
Body(cronJob).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *cronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, er
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *cronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
result = &v1beta1.CronJob{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *cronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (result *v1beta1.CronJ
Name(cronJob.Name).
SubResource("status").
Body(cronJob).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error {
func (c *cronJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("cronjobs").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *cronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched cronJob.
func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) {
func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) {
result = &v1beta1.CronJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresour
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/batch/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var cronjobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1b
var cronjobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1beta1", Kind: "CronJob"}
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) {
func (c *FakeCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v1beta1.CronJob{})
@@ -50,7 +52,7 @@ func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v1beta1.
}
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err error) {
func (c *FakeCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CronJobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &v1beta1.CronJobList{})
@@ -72,14 +74,14 @@ func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, e
}
// Watch returns a watch.Interface that watches the requested cronJobs.
func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts))
}
// 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.
func (c *FakeCronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{})
@@ -90,7 +92,7 @@ func (c *FakeCronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob
}
// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
func (c *FakeCronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{})
@@ -102,7 +104,7 @@ func (c *FakeCronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (*v1beta1.CronJob, error) {
func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v1beta1.CronJob) (*v1beta1.CronJob, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v1beta1.CronJob{})
@@ -113,7 +115,7 @@ func (c *FakeCronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (*v1beta1.CronJob,
}
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeCronJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v1beta1.CronJob{})
@@ -121,7 +123,7 @@ func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeCronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.CronJobList{})
@@ -129,7 +131,7 @@ func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v
}
// Patch applies the patch and returns the patched cronJob.
func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) {
func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &v1beta1.CronJob{})

View File

@@ -38,15 +38,15 @@ type CronJobsGetter interface {
// CronJobInterface has methods to work with CronJob resources.
type CronJobInterface interface {
Create(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
Update(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v2alpha1.CronJob, error)
List(opts v1.ListOptions) (*v2alpha1.CronJobList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error)
Create(context.Context, *v2alpha1.CronJob) (*v2alpha1.CronJob, error)
Update(context.Context, *v2alpha1.CronJob) (*v2alpha1.CronJob, error)
UpdateStatus(context.Context, *v2alpha1.CronJob) (*v2alpha1.CronJob, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v2alpha1.CronJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CronJobList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error)
CronJobExpansion
}
@@ -65,20 +65,20 @@ func newCronJobs(c *BatchV2alpha1Client, namespace string) *cronJobs {
}
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
func (c *cronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
result = &v2alpha1.CronJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("cronjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
func (c *cronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -89,13 +89,13 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err
Resource("cronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested cronJobs.
func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *cronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -106,30 +106,30 @@ func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("cronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *cronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
func (c *cronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
result = &v2alpha1.CronJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("cronjobs").
Body(cronJob).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
func (c *cronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
func (c *cronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
result = &v2alpha1.CronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("cronjobs").
Name(cronJob.Name).
Body(cronJob).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -137,7 +137,7 @@ func (c *cronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob,
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *cronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
func (c *cronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
result = &v2alpha1.CronJob{}
err = c.client.Put().
Namespace(c.ns).
@@ -145,24 +145,24 @@ func (c *cronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (result *v2alpha1.Cro
Name(cronJob.Name).
SubResource("status").
Body(cronJob).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error {
func (c *cronJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("cronjobs").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *cronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -173,12 +173,12 @@ func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched cronJob.
func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
result = &v2alpha1.CronJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -186,7 +186,7 @@ func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresour
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v2alpha1 "k8s.io/api/batch/v2alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var cronjobsResource = schema.GroupVersionResource{Group: "batch", Version: "v2a
var cronjobsKind = schema.GroupVersionKind{Group: "batch", Version: "v2alpha1", Kind: "CronJob"}
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
func (c *FakeCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{})
@@ -50,7 +52,7 @@ func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1
}
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
func (c *FakeCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &v2alpha1.CronJobList{})
@@ -72,14 +74,14 @@ func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList,
}
// Watch returns a watch.Interface that watches the requested cronJobs.
func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts))
}
// 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.
func (c *FakeCronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v2alpha1.CronJob{})
@@ -90,7 +92,7 @@ func (c *FakeCronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJ
}
// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
func (c *FakeCronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v2alpha1.CronJob{})
@@ -102,7 +104,7 @@ func (c *FakeCronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJ
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (*v2alpha1.CronJob, error) {
func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob) (*v2alpha1.CronJob, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v2alpha1.CronJob{})
@@ -113,7 +115,7 @@ func (c *FakeCronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (*v2alpha1.CronJo
}
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeCronJobs) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{})
@@ -121,7 +123,7 @@ func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeCronJobs) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v2alpha1.CronJobList{})
@@ -129,7 +131,7 @@ func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v
}
// Patch applies the patch and returns the patched cronJob.
func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &v2alpha1.CronJob{})

View File

@@ -38,15 +38,15 @@ type CertificateSigningRequestsGetter interface {
// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources.
type CertificateSigningRequestInterface interface {
Create(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
Update(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
UpdateStatus(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error)
List(opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error)
Create(context.Context, *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
Update(context.Context, *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
UpdateStatus(context.Context, *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error)
CertificateSigningRequestExpansion
}
@@ -63,19 +63,19 @@ func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSig
}
// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any.
func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) {
func (c *certificateSigningRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) {
result = &v1beta1.CertificateSigningRequest{}
err = c.client.Get().
Resource("certificatesigningrequests").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors.
func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) {
func (c *certificateSigningRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -85,13 +85,13 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.
Resource("certificatesigningrequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *certificateSigningRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -101,28 +101,28 @@ func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface
Resource("certificatesigningrequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
func (c *certificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
result = &v1beta1.CertificateSigningRequest{}
err = c.client.Post().
Resource("certificatesigningrequests").
Body(certificateSigningRequest).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
func (c *certificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
result = &v1beta1.CertificateSigningRequest{}
err = c.client.Put().
Resource("certificatesigningrequests").
Name(certificateSigningRequest.Name).
Body(certificateSigningRequest).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
@@ -130,30 +130,30 @@ func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.C
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
func (c *certificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
result = &v1beta1.CertificateSigningRequest{}
err = c.client.Put().
Resource("certificatesigningrequests").
Name(certificateSigningRequest.Name).
SubResource("status").
Body(certificateSigningRequest).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error {
func (c *certificateSigningRequests) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("certificatesigningrequests").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -163,19 +163,19 @@ func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions,
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched certificateSigningRequest.
func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) {
func (c *certificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) {
result = &v1beta1.CertificateSigningRequest{}
err = c.client.Patch(pt).
Resource("certificatesigningrequests").
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/certificates/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "cer
var certificatesigningrequestsKind = schema.GroupVersionKind{Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequest"}
// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any.
func (c *FakeCertificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) {
func (c *FakeCertificateSigningRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeCertificateSigningRequests) Get(name string, options v1.GetOptions)
}
// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors.
func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) {
func (c *FakeCertificateSigningRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(certificatesigningrequestsResource, certificatesigningrequestsKind, opts), &v1beta1.CertificateSigningRequestList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1be
}
// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
func (c *FakeCertificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeCertificateSigningRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(certificatesigningrequestsResource, opts))
}
// 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.
func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
func (c *FakeCertificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1bet
}
// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
func (c *FakeCertificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{})
if obj == nil {
@@ -96,7 +98,7 @@ func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1bet
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) {
func (c *FakeCertificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1beta1.CertificateSigningRequest{})
if obj == nil {
@@ -106,14 +108,14 @@ func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest
}
// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
func (c *FakeCertificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeCertificateSigningRequests) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.CertificateSigningRequestList{})
@@ -121,7 +123,7 @@ func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOpti
}
// Patch applies the patch and returns the patched certificateSigningRequest.
func (c *FakeCertificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) {
func (c *FakeCertificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, pt, data, subresources...), &v1beta1.CertificateSigningRequest{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
coordinationv1 "k8s.io/api/coordination/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var leasesResource = schema.GroupVersionResource{Group: "coordination.k8s.io", V
var leasesKind = schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1", Kind: "Lease"}
// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any.
func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *coordinationv1.Lease, err error) {
func (c *FakeLeases) Get(ctx context.Context, name string, options v1.GetOptions) (result *coordinationv1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(leasesResource, c.ns, name), &coordinationv1.Lease{})
@@ -50,7 +52,7 @@ func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *coordinati
}
// List takes label and field selectors, and returns the list of Leases that match those selectors.
func (c *FakeLeases) List(opts v1.ListOptions) (result *coordinationv1.LeaseList, err error) {
func (c *FakeLeases) List(ctx context.Context, opts v1.ListOptions) (result *coordinationv1.LeaseList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(leasesResource, leasesKind, c.ns, opts), &coordinationv1.LeaseList{})
@@ -72,14 +74,14 @@ func (c *FakeLeases) List(opts v1.ListOptions) (result *coordinationv1.LeaseList
}
// Watch returns a watch.Interface that watches the requested leases.
func (c *FakeLeases) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeLeases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(leasesResource, c.ns, opts))
}
// 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.
func (c *FakeLeases) Create(lease *coordinationv1.Lease) (result *coordinationv1.Lease, err error) {
func (c *FakeLeases) Create(ctx context.Context, lease *coordinationv1.Lease) (result *coordinationv1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &coordinationv1.Lease{})
@@ -90,7 +92,7 @@ func (c *FakeLeases) Create(lease *coordinationv1.Lease) (result *coordinationv1
}
// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any.
func (c *FakeLeases) Update(lease *coordinationv1.Lease) (result *coordinationv1.Lease, err error) {
func (c *FakeLeases) Update(ctx context.Context, lease *coordinationv1.Lease) (result *coordinationv1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &coordinationv1.Lease{})
@@ -101,7 +103,7 @@ func (c *FakeLeases) Update(lease *coordinationv1.Lease) (result *coordinationv1
}
// Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeLeases) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &coordinationv1.Lease{})
@@ -109,7 +111,7 @@ func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeLeases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeLeases) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &coordinationv1.LeaseList{})
@@ -117,7 +119,7 @@ func (c *FakeLeases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
}
// Patch applies the patch and returns the patched lease.
func (c *FakeLeases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *coordinationv1.Lease, err error) {
func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *coordinationv1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, pt, data, subresources...), &coordinationv1.Lease{})

View File

@@ -38,14 +38,14 @@ type LeasesGetter interface {
// LeaseInterface has methods to work with Lease resources.
type LeaseInterface interface {
Create(*v1.Lease) (*v1.Lease, error)
Update(*v1.Lease) (*v1.Lease, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Lease, error)
List(opts metav1.ListOptions) (*v1.LeaseList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Lease, err error)
Create(context.Context, *v1.Lease) (*v1.Lease, error)
Update(context.Context, *v1.Lease) (*v1.Lease, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Lease, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.LeaseList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Lease, err error)
LeaseExpansion
}
@@ -64,20 +64,20 @@ func newLeases(c *CoordinationV1Client, namespace string) *leases {
}
// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any.
func (c *leases) Get(name string, options metav1.GetOptions) (result *v1.Lease, err error) {
func (c *leases) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Lease, err error) {
result = &v1.Lease{}
err = c.client.Get().
Namespace(c.ns).
Resource("leases").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Leases that match those selectors.
func (c *leases) List(opts metav1.ListOptions) (result *v1.LeaseList, err error) {
func (c *leases) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LeaseList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -88,13 +88,13 @@ func (c *leases) List(opts metav1.ListOptions) (result *v1.LeaseList, err error)
Resource("leases").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested leases.
func (c *leases) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *leases) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -105,47 +105,47 @@ func (c *leases) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("leases").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *leases) Create(lease *v1.Lease) (result *v1.Lease, err error) {
func (c *leases) Create(ctx context.Context, lease *v1.Lease) (result *v1.Lease, err error) {
result = &v1.Lease{}
err = c.client.Post().
Namespace(c.ns).
Resource("leases").
Body(lease).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any.
func (c *leases) Update(lease *v1.Lease) (result *v1.Lease, err error) {
func (c *leases) Update(ctx context.Context, lease *v1.Lease) (result *v1.Lease, err error) {
result = &v1.Lease{}
err = c.client.Put().
Namespace(c.ns).
Resource("leases").
Name(lease.Name).
Body(lease).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *leases) Delete(name string, options *metav1.DeleteOptions) error {
func (c *leases) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("leases").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *leases) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *leases) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -156,12 +156,12 @@ func (c *leases) DeleteCollection(options *metav1.DeleteOptions, listOptions met
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched lease.
func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Lease, err error) {
func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Lease, err error) {
result = &v1.Lease{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -169,7 +169,7 @@ func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresource
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1beta1 "k8s.io/api/coordination/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var leasesResource = schema.GroupVersionResource{Group: "coordination.k8s.io", V
var leasesKind = schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1beta1", Kind: "Lease"}
// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any.
func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *v1beta1.Lease, err error) {
func (c *FakeLeases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(leasesResource, c.ns, name), &v1beta1.Lease{})
@@ -50,7 +52,7 @@ func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *v1beta1.Le
}
// List takes label and field selectors, and returns the list of Leases that match those selectors.
func (c *FakeLeases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error) {
func (c *FakeLeases) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.LeaseList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(leasesResource, leasesKind, c.ns, opts), &v1beta1.LeaseList{})
@@ -72,14 +74,14 @@ func (c *FakeLeases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err e
}
// Watch returns a watch.Interface that watches the requested leases.
func (c *FakeLeases) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeLeases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(leasesResource, c.ns, opts))
}
// 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.
func (c *FakeLeases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
func (c *FakeLeases) Create(ctx context.Context, lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &v1beta1.Lease{})
@@ -90,7 +92,7 @@ func (c *FakeLeases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err er
}
// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any.
func (c *FakeLeases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
func (c *FakeLeases) Update(ctx context.Context, lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &v1beta1.Lease{})
@@ -101,7 +103,7 @@ func (c *FakeLeases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err er
}
// Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeLeases) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &v1beta1.Lease{})
@@ -109,7 +111,7 @@ func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeLeases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeLeases) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.LeaseList{})
@@ -117,7 +119,7 @@ func (c *FakeLeases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
}
// Patch applies the patch and returns the patched lease.
func (c *FakeLeases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) {
func (c *FakeLeases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, pt, data, subresources...), &v1beta1.Lease{})

View File

@@ -38,14 +38,14 @@ type LeasesGetter interface {
// LeaseInterface has methods to work with Lease resources.
type LeaseInterface interface {
Create(*v1beta1.Lease) (*v1beta1.Lease, error)
Update(*v1beta1.Lease) (*v1beta1.Lease, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.Lease, error)
List(opts v1.ListOptions) (*v1beta1.LeaseList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error)
Create(context.Context, *v1beta1.Lease) (*v1beta1.Lease, error)
Update(context.Context, *v1beta1.Lease) (*v1beta1.Lease, error)
Delete(ctx context.Context, name string, options *v1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(ctx context.Context, name string, options v1.GetOptions) (*v1beta1.Lease, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.LeaseList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error)
LeaseExpansion
}
@@ -64,20 +64,20 @@ func newLeases(c *CoordinationV1beta1Client, namespace string) *leases {
}
// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any.
func (c *leases) Get(name string, options v1.GetOptions) (result *v1beta1.Lease, err error) {
func (c *leases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Lease, err error) {
result = &v1beta1.Lease{}
err = c.client.Get().
Namespace(c.ns).
Resource("leases").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Leases that match those selectors.
func (c *leases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error) {
func (c *leases) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.LeaseList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -88,13 +88,13 @@ func (c *leases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error
Resource("leases").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested leases.
func (c *leases) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *leases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -105,47 +105,47 @@ func (c *leases) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("leases").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *leases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
func (c *leases) Create(ctx context.Context, lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
result = &v1beta1.Lease{}
err = c.client.Post().
Namespace(c.ns).
Resource("leases").
Body(lease).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any.
func (c *leases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
func (c *leases) Update(ctx context.Context, lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
result = &v1beta1.Lease{}
err = c.client.Put().
Namespace(c.ns).
Resource("leases").
Name(lease.Name).
Body(lease).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *leases) Delete(name string, options *v1.DeleteOptions) error {
func (c *leases) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("leases").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *leases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *leases) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -156,12 +156,12 @@ func (c *leases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.List
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched lease.
func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) {
func (c *leases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) {
result = &v1beta1.Lease{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -169,7 +169,7 @@ func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresource
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type ComponentStatusesGetter interface {
// ComponentStatusInterface has methods to work with ComponentStatus resources.
type ComponentStatusInterface interface {
Create(*v1.ComponentStatus) (*v1.ComponentStatus, error)
Update(*v1.ComponentStatus) (*v1.ComponentStatus, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ComponentStatus, error)
List(opts metav1.ListOptions) (*v1.ComponentStatusList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error)
Create(context.Context, *v1.ComponentStatus) (*v1.ComponentStatus, error)
Update(context.Context, *v1.ComponentStatus) (*v1.ComponentStatus, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ComponentStatus, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ComponentStatusList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error)
ComponentStatusExpansion
}
@@ -62,19 +62,19 @@ func newComponentStatuses(c *CoreV1Client) *componentStatuses {
}
// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any.
func (c *componentStatuses) Get(name string, options metav1.GetOptions) (result *v1.ComponentStatus, err error) {
func (c *componentStatuses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ComponentStatus, err error) {
result = &v1.ComponentStatus{}
err = c.client.Get().
Resource("componentstatuses").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
func (c *componentStatuses) List(opts metav1.ListOptions) (result *v1.ComponentStatusList, err error) {
func (c *componentStatuses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ComponentStatusList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -84,13 +84,13 @@ func (c *componentStatuses) List(opts metav1.ListOptions) (result *v1.ComponentS
Resource("componentstatuses").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested componentStatuses.
func (c *componentStatuses) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *componentStatuses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -100,44 +100,44 @@ func (c *componentStatuses) Watch(opts metav1.ListOptions) (watch.Interface, err
Resource("componentstatuses").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *componentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
func (c *componentStatuses) Create(ctx context.Context, componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
result = &v1.ComponentStatus{}
err = c.client.Post().
Resource("componentstatuses").
Body(componentStatus).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any.
func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
func (c *componentStatuses) Update(ctx context.Context, componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
result = &v1.ComponentStatus{}
err = c.client.Put().
Resource("componentstatuses").
Name(componentStatus.Name).
Body(componentStatus).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
func (c *componentStatuses) Delete(name string, options *metav1.DeleteOptions) error {
func (c *componentStatuses) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("componentstatuses").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *componentStatuses) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *componentStatuses) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -147,19 +147,19 @@ func (c *componentStatuses) DeleteCollection(options *metav1.DeleteOptions, list
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched componentStatus.
func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
func (c *componentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
result = &v1.ComponentStatus{}
err = c.client.Patch(pt).
Resource("componentstatuses").
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type ConfigMapsGetter interface {
// ConfigMapInterface has methods to work with ConfigMap resources.
type ConfigMapInterface interface {
Create(*v1.ConfigMap) (*v1.ConfigMap, error)
Update(*v1.ConfigMap) (*v1.ConfigMap, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ConfigMap, error)
List(opts metav1.ListOptions) (*v1.ConfigMapList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
Create(context.Context, *v1.ConfigMap) (*v1.ConfigMap, error)
Update(context.Context, *v1.ConfigMap) (*v1.ConfigMap, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.ConfigMap, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigMapList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
ConfigMapExpansion
}
@@ -64,20 +64,20 @@ func newConfigMaps(c *CoreV1Client, namespace string) *configMaps {
}
// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any.
func (c *configMaps) Get(name string, options metav1.GetOptions) (result *v1.ConfigMap, err error) {
func (c *configMaps) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConfigMap, err error) {
result = &v1.ConfigMap{}
err = c.client.Get().
Namespace(c.ns).
Resource("configmaps").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
func (c *configMaps) List(opts metav1.ListOptions) (result *v1.ConfigMapList, err error) {
func (c *configMaps) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigMapList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -88,13 +88,13 @@ func (c *configMaps) List(opts metav1.ListOptions) (result *v1.ConfigMapList, er
Resource("configmaps").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *configMaps) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -105,47 +105,47 @@ func (c *configMaps) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("configmaps").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *configMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
func (c *configMaps) Create(ctx context.Context, configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
result = &v1.ConfigMap{}
err = c.client.Post().
Namespace(c.ns).
Resource("configmaps").
Body(configMap).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any.
func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
func (c *configMaps) Update(ctx context.Context, configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
result = &v1.ConfigMap{}
err = c.client.Put().
Namespace(c.ns).
Resource("configmaps").
Name(configMap.Name).
Body(configMap).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
func (c *configMaps) Delete(name string, options *metav1.DeleteOptions) error {
func (c *configMaps) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("configmaps").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *configMaps) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *configMaps) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -156,12 +156,12 @@ func (c *configMaps) DeleteCollection(options *metav1.DeleteOptions, listOptions
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched configMap.
func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
func (c *configMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
result = &v1.ConfigMap{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -169,7 +169,7 @@ func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subreso
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type EndpointsGetter interface {
// EndpointsInterface has methods to work with Endpoints resources.
type EndpointsInterface interface {
Create(*v1.Endpoints) (*v1.Endpoints, error)
Update(*v1.Endpoints) (*v1.Endpoints, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Endpoints, error)
List(opts metav1.ListOptions) (*v1.EndpointsList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
Create(context.Context, *v1.Endpoints) (*v1.Endpoints, error)
Update(context.Context, *v1.Endpoints) (*v1.Endpoints, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Endpoints, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.EndpointsList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
EndpointsExpansion
}
@@ -64,20 +64,20 @@ func newEndpoints(c *CoreV1Client, namespace string) *endpoints {
}
// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any.
func (c *endpoints) Get(name string, options metav1.GetOptions) (result *v1.Endpoints, err error) {
func (c *endpoints) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Endpoints, err error) {
result = &v1.Endpoints{}
err = c.client.Get().
Namespace(c.ns).
Resource("endpoints").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Endpoints that match those selectors.
func (c *endpoints) List(opts metav1.ListOptions) (result *v1.EndpointsList, err error) {
func (c *endpoints) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointsList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -88,13 +88,13 @@ func (c *endpoints) List(opts metav1.ListOptions) (result *v1.EndpointsList, err
Resource("endpoints").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested endpoints.
func (c *endpoints) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *endpoints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -105,47 +105,47 @@ func (c *endpoints) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("endpoints").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *endpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
func (c *endpoints) Create(ctx context.Context, endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
result = &v1.Endpoints{}
err = c.client.Post().
Namespace(c.ns).
Resource("endpoints").
Body(endpoints).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any.
func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
func (c *endpoints) Update(ctx context.Context, endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
result = &v1.Endpoints{}
err = c.client.Put().
Namespace(c.ns).
Resource("endpoints").
Name(endpoints.Name).
Body(endpoints).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
func (c *endpoints) Delete(name string, options *metav1.DeleteOptions) error {
func (c *endpoints) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("endpoints").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *endpoints) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *endpoints) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -156,12 +156,12 @@ func (c *endpoints) DeleteCollection(options *metav1.DeleteOptions, listOptions
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched endpoints.
func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
func (c *endpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
result = &v1.Endpoints{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -169,7 +169,7 @@ func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresou
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -38,14 +38,14 @@ type EventsGetter interface {
// EventInterface has methods to work with Event resources.
type EventInterface interface {
Create(*v1.Event) (*v1.Event, error)
Update(*v1.Event) (*v1.Event, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Event, error)
List(opts metav1.ListOptions) (*v1.EventList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
Create(context.Context, *v1.Event) (*v1.Event, error)
Update(context.Context, *v1.Event) (*v1.Event, error)
Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(ctx context.Context, name string, options metav1.GetOptions) (*v1.Event, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.EventList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
EventExpansion
}
@@ -64,20 +64,20 @@ func newEvents(c *CoreV1Client, namespace string) *events {
}
// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
func (c *events) Get(name string, options metav1.GetOptions) (result *v1.Event, err error) {
func (c *events) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Get().
Namespace(c.ns).
Resource("events").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *events) List(opts metav1.ListOptions) (result *v1.EventList, err error) {
func (c *events) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EventList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -88,13 +88,13 @@ func (c *events) List(opts metav1.ListOptions) (result *v1.EventList, err error)
Resource("events").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts metav1.ListOptions) (watch.Interface, error) {
func (c *events) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -105,47 +105,47 @@ func (c *events) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("events").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(context.TODO())
Watch(ctx)
}
// 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.
func (c *events) Create(event *v1.Event) (result *v1.Event, err error) {
func (c *events) Create(ctx context.Context, event *v1.Event) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Post().
Namespace(c.ns).
Resource("events").
Body(event).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
func (c *events) Update(event *v1.Event) (result *v1.Event, err error) {
func (c *events) Update(ctx context.Context, event *v1.Event) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Put().
Namespace(c.ns).
Resource("events").
Name(event.Name).
Body(event).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}
// Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *events) Delete(name string, options *metav1.DeleteOptions) error {
func (c *events) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").
Name(name).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *events) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
func (c *events) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -156,12 +156,12 @@ func (c *events) DeleteCollection(options *metav1.DeleteOptions, listOptions met
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do(context.TODO()).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched event.
func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Patch(pt).
Namespace(c.ns).
@@ -169,7 +169,7 @@ func (c *events) Patch(name string, pt types.PatchType, data []byte, subresource
SubResource(subresources...).
Name(name).
Body(data).
Do(context.TODO()).
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var componentstatusesResource = schema.GroupVersionResource{Group: "", Version:
var componentstatusesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ComponentStatus"}
// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any.
func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result *corev1.ComponentStatus, err error) {
func (c *FakeComponentStatuses) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(componentstatusesResource, name), &corev1.ComponentStatus{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result
}
// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *corev1.ComponentStatusList, err error) {
func (c *FakeComponentStatuses) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ComponentStatusList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(componentstatusesResource, componentstatusesKind, opts), &corev1.ComponentStatusList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *corev1.Compon
}
// Watch returns a watch.Interface that watches the requested componentStatuses.
func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeComponentStatuses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(componentstatusesResource, opts))
}
// 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.
func (c *FakeComponentStatuses) Create(componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) {
func (c *FakeComponentStatuses) Create(ctx context.Context, componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeComponentStatuses) Create(componentStatus *corev1.ComponentStatus)
}
// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any.
func (c *FakeComponentStatuses) Update(componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) {
func (c *FakeComponentStatuses) Update(ctx context.Context, componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{})
if obj == nil {
@@ -95,14 +97,14 @@ func (c *FakeComponentStatuses) Update(componentStatus *corev1.ComponentStatus)
}
// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeComponentStatuses) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(componentstatusesResource, name), &corev1.ComponentStatus{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeComponentStatuses) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
_, err := c.Fake.Invokes(action, &corev1.ComponentStatusList{})
@@ -110,7 +112,7 @@ func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, list
}
// Patch applies the patch and returns the patched componentStatus.
func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ComponentStatus, err error) {
func (c *FakeComponentStatuses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, pt, data, subresources...), &corev1.ComponentStatus{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var configmapsResource = schema.GroupVersionResource{Group: "", Version: "v1", R
var configmapsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ConfigMap"}
// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any.
func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *corev1.ConfigMap, err error) {
func (c *FakeConfigMaps) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ConfigMap, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &corev1.ConfigMap{})
@@ -50,7 +52,7 @@ func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *corev1
}
// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *corev1.ConfigMapList, err error) {
func (c *FakeConfigMaps) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ConfigMapList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(configmapsResource, configmapsKind, c.ns, opts), &corev1.ConfigMapList{})
@@ -72,14 +74,14 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *corev1.ConfigMapList
}
// Watch returns a watch.Interface that watches the requested configMaps.
func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeConfigMaps) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(configmapsResource, c.ns, opts))
}
// 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.
func (c *FakeConfigMaps) Create(configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) {
func (c *FakeConfigMaps) Create(ctx context.Context, configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{})
@@ -90,7 +92,7 @@ func (c *FakeConfigMaps) Create(configMap *corev1.ConfigMap) (result *corev1.Con
}
// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any.
func (c *FakeConfigMaps) Update(configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) {
func (c *FakeConfigMaps) Update(ctx context.Context, configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{})
@@ -101,7 +103,7 @@ func (c *FakeConfigMaps) Update(configMap *corev1.ConfigMap) (result *corev1.Con
}
// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeConfigMaps) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(configmapsResource, c.ns, name), &corev1.ConfigMap{})
@@ -109,7 +111,7 @@ func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeConfigMaps) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.ConfigMapList{})
@@ -117,7 +119,7 @@ func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions
}
// Patch applies the patch and returns the patched configMap.
func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ConfigMap, err error) {
func (c *FakeConfigMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ConfigMap, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, pt, data, subresources...), &corev1.ConfigMap{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var endpointsResource = schema.GroupVersionResource{Group: "", Version: "v1", Re
var endpointsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Endpoints"}
// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any.
func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *corev1.Endpoints, err error) {
func (c *FakeEndpoints) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Endpoints, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &corev1.Endpoints{})
@@ -50,7 +52,7 @@ func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *corev1.
}
// List takes label and field selectors, and returns the list of Endpoints that match those selectors.
func (c *FakeEndpoints) List(opts v1.ListOptions) (result *corev1.EndpointsList, err error) {
func (c *FakeEndpoints) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EndpointsList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(endpointsResource, endpointsKind, c.ns, opts), &corev1.EndpointsList{})
@@ -72,14 +74,14 @@ func (c *FakeEndpoints) List(opts v1.ListOptions) (result *corev1.EndpointsList,
}
// Watch returns a watch.Interface that watches the requested endpoints.
func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeEndpoints) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(endpointsResource, c.ns, opts))
}
// 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.
func (c *FakeEndpoints) Create(endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) {
func (c *FakeEndpoints) Create(ctx context.Context, endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{})
@@ -90,7 +92,7 @@ func (c *FakeEndpoints) Create(endpoints *corev1.Endpoints) (result *corev1.Endp
}
// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any.
func (c *FakeEndpoints) Update(endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) {
func (c *FakeEndpoints) Update(ctx context.Context, endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{})
@@ -101,7 +103,7 @@ func (c *FakeEndpoints) Update(endpoints *corev1.Endpoints) (result *corev1.Endp
}
// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeEndpoints) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(endpointsResource, c.ns, name), &corev1.Endpoints{})
@@ -109,7 +111,7 @@ func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeEndpoints) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.EndpointsList{})
@@ -117,7 +119,7 @@ func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions
}
// Patch applies the patch and returns the patched endpoints.
func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Endpoints, err error) {
func (c *FakeEndpoints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Endpoints, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, pt, data, subresources...), &corev1.Endpoints{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var eventsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resou
var eventsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Event"}
// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *corev1.Event, err error) {
func (c *FakeEvents) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(eventsResource, c.ns, name), &corev1.Event{})
@@ -50,7 +52,7 @@ func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *corev1.Eve
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *FakeEvents) List(opts v1.ListOptions) (result *corev1.EventList, err error) {
func (c *FakeEvents) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EventList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &corev1.EventList{})
@@ -72,14 +74,14 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *corev1.EventList, err er
}
// Watch returns a watch.Interface that watches the requested events.
func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts))
}
// 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.
func (c *FakeEvents) Create(event *corev1.Event) (result *corev1.Event, err error) {
func (c *FakeEvents) Create(ctx context.Context, event *corev1.Event) (result *corev1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &corev1.Event{})
@@ -90,7 +92,7 @@ func (c *FakeEvents) Create(event *corev1.Event) (result *corev1.Event, err erro
}
// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
func (c *FakeEvents) Update(event *corev1.Event) (result *corev1.Event, err error) {
func (c *FakeEvents) Update(ctx context.Context, event *corev1.Event) (result *corev1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &corev1.Event{})
@@ -101,7 +103,7 @@ func (c *FakeEvents) Update(event *corev1.Event) (result *corev1.Event, err erro
}
// Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeEvents) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &corev1.Event{})
@@ -109,7 +111,7 @@ func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeEvents) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.EventList{})
@@ -117,7 +119,7 @@ func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
}
// Patch applies the patch and returns the patched event.
func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Event, err error) {
func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &corev1.Event{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var limitrangesResource = schema.GroupVersionResource{Group: "", Version: "v1",
var limitrangesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "LimitRange"}
// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any.
func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *corev1.LimitRange, err error) {
func (c *FakeLimitRanges) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.LimitRange, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &corev1.LimitRange{})
@@ -50,7 +52,7 @@ func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *corev
}
// List takes label and field selectors, and returns the list of LimitRanges that match those selectors.
func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *corev1.LimitRangeList, err error) {
func (c *FakeLimitRanges) List(ctx context.Context, opts v1.ListOptions) (result *corev1.LimitRangeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(limitrangesResource, limitrangesKind, c.ns, opts), &corev1.LimitRangeList{})
@@ -72,14 +74,14 @@ func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *corev1.LimitRangeLi
}
// Watch returns a watch.Interface that watches the requested limitRanges.
func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeLimitRanges) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(limitrangesResource, c.ns, opts))
}
// 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.
func (c *FakeLimitRanges) Create(limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) {
func (c *FakeLimitRanges) Create(ctx context.Context, limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{})
@@ -90,7 +92,7 @@ func (c *FakeLimitRanges) Create(limitRange *corev1.LimitRange) (result *corev1.
}
// Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any.
func (c *FakeLimitRanges) Update(limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) {
func (c *FakeLimitRanges) Update(ctx context.Context, limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{})
@@ -101,7 +103,7 @@ func (c *FakeLimitRanges) Update(limitRange *corev1.LimitRange) (result *corev1.
}
// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeLimitRanges) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(limitrangesResource, c.ns, name), &corev1.LimitRange{})
@@ -109,7 +111,7 @@ func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeLimitRanges) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.LimitRangeList{})
@@ -117,7 +119,7 @@ func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOption
}
// Patch applies the patch and returns the patched limitRange.
func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.LimitRange, err error) {
func (c *FakeLimitRanges) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.LimitRange, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, pt, data, subresources...), &corev1.LimitRange{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var namespacesResource = schema.GroupVersionResource{Group: "", Version: "v1", R
var namespacesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Namespace"}
// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any.
func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *corev1.Namespace, err error) {
func (c *FakeNamespaces) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Namespace, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(namespacesResource, name), &corev1.Namespace{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *corev1
}
// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
func (c *FakeNamespaces) List(opts v1.ListOptions) (result *corev1.NamespaceList, err error) {
func (c *FakeNamespaces) List(ctx context.Context, opts v1.ListOptions) (result *corev1.NamespaceList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(namespacesResource, namespacesKind, opts), &corev1.NamespaceList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *corev1.NamespaceList
}
// Watch returns a watch.Interface that watches the requested namespaces.
func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeNamespaces) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(namespacesResource, opts))
}
// 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.
func (c *FakeNamespaces) Create(namespace *corev1.Namespace) (result *corev1.Namespace, err error) {
func (c *FakeNamespaces) Create(ctx context.Context, namespace *corev1.Namespace) (result *corev1.Namespace, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &corev1.Namespace{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeNamespaces) Create(namespace *corev1.Namespace) (result *corev1.Nam
}
// Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any.
func (c *FakeNamespaces) Update(namespace *corev1.Namespace) (result *corev1.Namespace, err error) {
func (c *FakeNamespaces) Update(ctx context.Context, namespace *corev1.Namespace) (result *corev1.Namespace, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &corev1.Namespace{})
if obj == nil {
@@ -96,7 +98,7 @@ func (c *FakeNamespaces) Update(namespace *corev1.Namespace) (result *corev1.Nam
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeNamespaces) UpdateStatus(namespace *corev1.Namespace) (*corev1.Namespace, error) {
func (c *FakeNamespaces) UpdateStatus(ctx context.Context, namespace *corev1.Namespace) (*corev1.Namespace, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &corev1.Namespace{})
if obj == nil {
@@ -106,14 +108,14 @@ func (c *FakeNamespaces) UpdateStatus(namespace *corev1.Namespace) (*corev1.Name
}
// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeNamespaces) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(namespacesResource, name), &corev1.Namespace{})
return err
}
// Patch applies the patch and returns the patched namespace.
func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Namespace, err error) {
func (c *FakeNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Namespace, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, pt, data, subresources...), &corev1.Namespace{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var nodesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resour
var nodesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Node"}
// Get takes name of the node, and returns the corresponding node object, and an error if there is any.
func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *corev1.Node, err error) {
func (c *FakeNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Node, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(nodesResource, name), &corev1.Node{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *corev1.Node
}
// List takes label and field selectors, and returns the list of Nodes that match those selectors.
func (c *FakeNodes) List(opts v1.ListOptions) (result *corev1.NodeList, err error) {
func (c *FakeNodes) List(ctx context.Context, opts v1.ListOptions) (result *corev1.NodeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(nodesResource, nodesKind, opts), &corev1.NodeList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeNodes) List(opts v1.ListOptions) (result *corev1.NodeList, err erro
}
// Watch returns a watch.Interface that watches the requested nodes.
func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(nodesResource, opts))
}
// 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.
func (c *FakeNodes) Create(node *corev1.Node) (result *corev1.Node, err error) {
func (c *FakeNodes) Create(ctx context.Context, node *corev1.Node) (result *corev1.Node, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(nodesResource, node), &corev1.Node{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeNodes) Create(node *corev1.Node) (result *corev1.Node, err error) {
}
// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any.
func (c *FakeNodes) Update(node *corev1.Node) (result *corev1.Node, err error) {
func (c *FakeNodes) Update(ctx context.Context, node *corev1.Node) (result *corev1.Node, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(nodesResource, node), &corev1.Node{})
if obj == nil {
@@ -96,7 +98,7 @@ func (c *FakeNodes) Update(node *corev1.Node) (result *corev1.Node, err error) {
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeNodes) UpdateStatus(node *corev1.Node) (*corev1.Node, error) {
func (c *FakeNodes) UpdateStatus(ctx context.Context, node *corev1.Node) (*corev1.Node, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &corev1.Node{})
if obj == nil {
@@ -106,14 +108,14 @@ func (c *FakeNodes) UpdateStatus(node *corev1.Node) (*corev1.Node, error) {
}
// Delete takes name of the node and deletes it. Returns an error if one occurs.
func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeNodes) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(nodesResource, name), &corev1.Node{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeNodes) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(nodesResource, listOptions)
_, err := c.Fake.Invokes(action, &corev1.NodeList{})
@@ -121,7 +123,7 @@ func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L
}
// Patch applies the patch and returns the patched node.
func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Node, err error) {
func (c *FakeNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Node, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, pt, data, subresources...), &corev1.Node{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -38,7 +40,7 @@ var persistentvolumesResource = schema.GroupVersionResource{Group: "", Version:
var persistentvolumesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolume"}
// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any.
func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result *corev1.PersistentVolume, err error) {
func (c *FakePersistentVolumes) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(persistentvolumesResource, name), &corev1.PersistentVolume{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result
}
// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors.
func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *corev1.PersistentVolumeList, err error) {
func (c *FakePersistentVolumes) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PersistentVolumeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(persistentvolumesResource, persistentvolumesKind, opts), &corev1.PersistentVolumeList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *corev1.Persis
}
// Watch returns a watch.Interface that watches the requested persistentVolumes.
func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakePersistentVolumes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(persistentvolumesResource, opts))
}
// 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.
func (c *FakePersistentVolumes) Create(persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) {
func (c *FakePersistentVolumes) Create(ctx context.Context, persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakePersistentVolumes) Create(persistentVolume *corev1.PersistentVolume
}
// Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
func (c *FakePersistentVolumes) Update(persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) {
func (c *FakePersistentVolumes) Update(ctx context.Context, persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{})
if obj == nil {
@@ -96,7 +98,7 @@ func (c *FakePersistentVolumes) Update(persistentVolume *corev1.PersistentVolume
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *corev1.PersistentVolume) (*corev1.PersistentVolume, error) {
func (c *FakePersistentVolumes) UpdateStatus(ctx context.Context, persistentVolume *corev1.PersistentVolume) (*corev1.PersistentVolume, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &corev1.PersistentVolume{})
if obj == nil {
@@ -106,14 +108,14 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *corev1.Persistent
}
// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs.
func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakePersistentVolumes) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &corev1.PersistentVolume{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakePersistentVolumes) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions)
_, err := c.Fake.Invokes(action, &corev1.PersistentVolumeList{})
@@ -121,7 +123,7 @@ func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, list
}
// Patch applies the patch and returns the patched persistentVolume.
func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolume, err error) {
func (c *FakePersistentVolumes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, pt, data, subresources...), &corev1.PersistentVolume{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var persistentvolumeclaimsResource = schema.GroupVersionResource{Group: "", Vers
var persistentvolumeclaimsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolumeClaim"}
// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any.
func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (result *corev1.PersistentVolumeClaim, err error) {
func (c *FakePersistentVolumeClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.PersistentVolumeClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{})
@@ -50,7 +52,7 @@ func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (re
}
// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors.
func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *corev1.PersistentVolumeClaimList, err error) {
func (c *FakePersistentVolumeClaims) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PersistentVolumeClaimList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(persistentvolumeclaimsResource, persistentvolumeclaimsKind, c.ns, opts), &corev1.PersistentVolumeClaimList{})
@@ -72,14 +74,14 @@ func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *corev1.P
}
// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakePersistentVolumeClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts))
}
// 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.
func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) {
func (c *FakePersistentVolumeClaims) Create(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{})
@@ -90,7 +92,7 @@ func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *corev1.Persis
}
// Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) {
func (c *FakePersistentVolumeClaims) Update(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{})
@@ -102,7 +104,7 @@ func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *corev1.Persis
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) {
func (c *FakePersistentVolumeClaims) UpdateStatus(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{})
@@ -113,7 +115,7 @@ func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *corev1.
}
// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs.
func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakePersistentVolumeClaims) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{})
@@ -121,7 +123,7 @@ func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptio
}
// DeleteCollection deletes a collection of objects.
func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakePersistentVolumeClaims) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.PersistentVolumeClaimList{})
@@ -129,7 +131,7 @@ func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions,
}
// Patch applies the patch and returns the patched persistentVolumeClaim.
func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) {
func (c *FakePersistentVolumeClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, pt, data, subresources...), &corev1.PersistentVolumeClaim{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var podsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resourc
var podsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Pod"}
// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any.
func (c *FakePods) Get(name string, options v1.GetOptions) (result *corev1.Pod, err error) {
func (c *FakePods) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Pod, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(podsResource, c.ns, name), &corev1.Pod{})
@@ -50,7 +52,7 @@ func (c *FakePods) Get(name string, options v1.GetOptions) (result *corev1.Pod,
}
// List takes label and field selectors, and returns the list of Pods that match those selectors.
func (c *FakePods) List(opts v1.ListOptions) (result *corev1.PodList, err error) {
func (c *FakePods) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PodList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(podsResource, podsKind, c.ns, opts), &corev1.PodList{})
@@ -72,14 +74,14 @@ func (c *FakePods) List(opts v1.ListOptions) (result *corev1.PodList, err error)
}
// Watch returns a watch.Interface that watches the requested pods.
func (c *FakePods) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakePods) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(podsResource, c.ns, opts))
}
// 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.
func (c *FakePods) Create(pod *corev1.Pod) (result *corev1.Pod, err error) {
func (c *FakePods) Create(ctx context.Context, pod *corev1.Pod) (result *corev1.Pod, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &corev1.Pod{})
@@ -90,7 +92,7 @@ func (c *FakePods) Create(pod *corev1.Pod) (result *corev1.Pod, err error) {
}
// Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any.
func (c *FakePods) Update(pod *corev1.Pod) (result *corev1.Pod, err error) {
func (c *FakePods) Update(ctx context.Context, pod *corev1.Pod) (result *corev1.Pod, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &corev1.Pod{})
@@ -102,7 +104,7 @@ func (c *FakePods) Update(pod *corev1.Pod) (result *corev1.Pod, err error) {
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePods) UpdateStatus(pod *corev1.Pod) (*corev1.Pod, error) {
func (c *FakePods) UpdateStatus(ctx context.Context, pod *corev1.Pod) (*corev1.Pod, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &corev1.Pod{})
@@ -113,7 +115,7 @@ func (c *FakePods) UpdateStatus(pod *corev1.Pod) (*corev1.Pod, error) {
}
// Delete takes name of the pod and deletes it. Returns an error if one occurs.
func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakePods) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(podsResource, c.ns, name), &corev1.Pod{})
@@ -121,7 +123,7 @@ func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakePods) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.PodList{})
@@ -129,7 +131,7 @@ func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
}
// Patch applies the patch and returns the patched pod.
func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Pod, err error) {
func (c *FakePods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Pod, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, pt, data, subresources...), &corev1.Pod{})
@@ -140,7 +142,7 @@ func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresour
}
// GetEphemeralContainers takes name of the pod, and returns the corresponding ephemeralContainers object, and an error if there is any.
func (c *FakePods) GetEphemeralContainers(podName string, options v1.GetOptions) (result *corev1.EphemeralContainers, err error) {
func (c *FakePods) GetEphemeralContainers(ctx context.Context, podName string, options v1.GetOptions) (result *corev1.EphemeralContainers, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetSubresourceAction(podsResource, c.ns, "ephemeralcontainers", podName), &corev1.EphemeralContainers{})
@@ -151,7 +153,7 @@ func (c *FakePods) GetEphemeralContainers(podName string, options v1.GetOptions)
}
// UpdateEphemeralContainers takes the representation of a ephemeralContainers and updates it. Returns the server's representation of the ephemeralContainers, and an error, if there is any.
func (c *FakePods) UpdateEphemeralContainers(podName string, ephemeralContainers *corev1.EphemeralContainers) (result *corev1.EphemeralContainers, err error) {
func (c *FakePods) UpdateEphemeralContainers(ctx context.Context, podName string, ephemeralContainers *corev1.EphemeralContainers) (result *corev1.EphemeralContainers, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(podsResource, "ephemeralcontainers", c.ns, ephemeralContainers), &corev1.EphemeralContainers{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var podtemplatesResource = schema.GroupVersionResource{Group: "", Version: "v1",
var podtemplatesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PodTemplate"}
// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any.
func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *corev1.PodTemplate, err error) {
func (c *FakePodTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.PodTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{})
@@ -50,7 +52,7 @@ func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *core
}
// List takes label and field selectors, and returns the list of PodTemplates that match those selectors.
func (c *FakePodTemplates) List(opts v1.ListOptions) (result *corev1.PodTemplateList, err error) {
func (c *FakePodTemplates) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PodTemplateList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(podtemplatesResource, podtemplatesKind, c.ns, opts), &corev1.PodTemplateList{})
@@ -72,14 +74,14 @@ func (c *FakePodTemplates) List(opts v1.ListOptions) (result *corev1.PodTemplate
}
// Watch returns a watch.Interface that watches the requested podTemplates.
func (c *FakePodTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakePodTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(podtemplatesResource, c.ns, opts))
}
// 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.
func (c *FakePodTemplates) Create(podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) {
func (c *FakePodTemplates) Create(ctx context.Context, podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{})
@@ -90,7 +92,7 @@ func (c *FakePodTemplates) Create(podTemplate *corev1.PodTemplate) (result *core
}
// Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any.
func (c *FakePodTemplates) Update(podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) {
func (c *FakePodTemplates) Update(ctx context.Context, podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{})
@@ -101,7 +103,7 @@ func (c *FakePodTemplates) Update(podTemplate *corev1.PodTemplate) (result *core
}
// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs.
func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakePodTemplates) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{})
@@ -109,7 +111,7 @@ func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakePodTemplates) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.PodTemplateList{})
@@ -117,7 +119,7 @@ func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptio
}
// Patch applies the patch and returns the patched podTemplate.
func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PodTemplate, err error) {
func (c *FakePodTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PodTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, pt, data, subresources...), &corev1.PodTemplate{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
autoscalingv1 "k8s.io/api/autoscaling/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -40,7 +42,7 @@ var replicationcontrollersResource = schema.GroupVersionResource{Group: "", Vers
var replicationcontrollersKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ReplicationController"}
// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any.
func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (result *corev1.ReplicationController, err error) {
func (c *FakeReplicationControllers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ReplicationController, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{})
@@ -51,7 +53,7 @@ func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (re
}
// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors.
func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *corev1.ReplicationControllerList, err error) {
func (c *FakeReplicationControllers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ReplicationControllerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(replicationcontrollersResource, replicationcontrollersKind, c.ns, opts), &corev1.ReplicationControllerList{})
@@ -73,14 +75,14 @@ func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *corev1.R
}
// Watch returns a watch.Interface that watches the requested replicationControllers.
func (c *FakeReplicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeReplicationControllers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(replicationcontrollersResource, c.ns, opts))
}
// 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.
func (c *FakeReplicationControllers) Create(replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) {
func (c *FakeReplicationControllers) Create(ctx context.Context, replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{})
@@ -91,7 +93,7 @@ func (c *FakeReplicationControllers) Create(replicationController *corev1.Replic
}
// Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any.
func (c *FakeReplicationControllers) Update(replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) {
func (c *FakeReplicationControllers) Update(ctx context.Context, replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{})
@@ -103,7 +105,7 @@ func (c *FakeReplicationControllers) Update(replicationController *corev1.Replic
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeReplicationControllers) UpdateStatus(replicationController *corev1.ReplicationController) (*corev1.ReplicationController, error) {
func (c *FakeReplicationControllers) UpdateStatus(ctx context.Context, replicationController *corev1.ReplicationController) (*corev1.ReplicationController, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &corev1.ReplicationController{})
@@ -114,7 +116,7 @@ func (c *FakeReplicationControllers) UpdateStatus(replicationController *corev1.
}
// Delete takes name of the replicationController and deletes it. Returns an error if one occurs.
func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeReplicationControllers) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{})
@@ -122,7 +124,7 @@ func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptio
}
// DeleteCollection deletes a collection of objects.
func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeReplicationControllers) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.ReplicationControllerList{})
@@ -130,7 +132,7 @@ func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions,
}
// Patch applies the patch and returns the patched replicationController.
func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ReplicationController, err error) {
func (c *FakeReplicationControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ReplicationController, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, pt, data, subresources...), &corev1.ReplicationController{})
@@ -141,7 +143,7 @@ func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data
}
// GetScale takes name of the replicationController, and returns the corresponding scale object, and an error if there is any.
func (c *FakeReplicationControllers) GetScale(replicationControllerName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
func (c *FakeReplicationControllers) GetScale(ctx context.Context, replicationControllerName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetSubresourceAction(replicationcontrollersResource, c.ns, "scale", replicationControllerName), &autoscalingv1.Scale{})
@@ -152,7 +154,7 @@ func (c *FakeReplicationControllers) GetScale(replicationControllerName string,
}
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *FakeReplicationControllers) UpdateScale(replicationControllerName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
func (c *FakeReplicationControllers) UpdateScale(ctx context.Context, replicationControllerName string, scale *autoscalingv1.Scale) (result *autoscalingv1.Scale, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "scale", c.ns, scale), &autoscalingv1.Scale{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var resourcequotasResource = schema.GroupVersionResource{Group: "", Version: "v1
var resourcequotasKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ResourceQuota"}
// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any.
func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *corev1.ResourceQuota, err error) {
func (c *FakeResourceQuotas) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ResourceQuota, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{})
@@ -50,7 +52,7 @@ func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *co
}
// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors.
func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *corev1.ResourceQuotaList, err error) {
func (c *FakeResourceQuotas) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ResourceQuotaList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(resourcequotasResource, resourcequotasKind, c.ns, opts), &corev1.ResourceQuotaList{})
@@ -72,14 +74,14 @@ func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *corev1.ResourceQ
}
// Watch returns a watch.Interface that watches the requested resourceQuotas.
func (c *FakeResourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeResourceQuotas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(resourcequotasResource, c.ns, opts))
}
// 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.
func (c *FakeResourceQuotas) Create(resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) {
func (c *FakeResourceQuotas) Create(ctx context.Context, resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{})
@@ -90,7 +92,7 @@ func (c *FakeResourceQuotas) Create(resourceQuota *corev1.ResourceQuota) (result
}
// Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
func (c *FakeResourceQuotas) Update(resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) {
func (c *FakeResourceQuotas) Update(ctx context.Context, resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{})
@@ -102,7 +104,7 @@ func (c *FakeResourceQuotas) Update(resourceQuota *corev1.ResourceQuota) (result
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *corev1.ResourceQuota) (*corev1.ResourceQuota, error) {
func (c *FakeResourceQuotas) UpdateStatus(ctx context.Context, resourceQuota *corev1.ResourceQuota) (*corev1.ResourceQuota, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &corev1.ResourceQuota{})
@@ -113,7 +115,7 @@ func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *corev1.ResourceQuota) (
}
// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs.
func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeResourceQuotas) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{})
@@ -121,7 +123,7 @@ func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) erro
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeResourceQuotas) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.ResourceQuotaList{})
@@ -129,7 +131,7 @@ func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOpt
}
// Patch applies the patch and returns the patched resourceQuota.
func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ResourceQuota, err error) {
func (c *FakeResourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ResourceQuota, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, pt, data, subresources...), &corev1.ResourceQuota{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var secretsResource = schema.GroupVersionResource{Group: "", Version: "v1", Reso
var secretsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Secret"}
// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any.
func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *corev1.Secret, err error) {
func (c *FakeSecrets) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Secret, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(secretsResource, c.ns, name), &corev1.Secret{})
@@ -50,7 +52,7 @@ func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *corev1.Se
}
// List takes label and field selectors, and returns the list of Secrets that match those selectors.
func (c *FakeSecrets) List(opts v1.ListOptions) (result *corev1.SecretList, err error) {
func (c *FakeSecrets) List(ctx context.Context, opts v1.ListOptions) (result *corev1.SecretList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(secretsResource, secretsKind, c.ns, opts), &corev1.SecretList{})
@@ -72,14 +74,14 @@ func (c *FakeSecrets) List(opts v1.ListOptions) (result *corev1.SecretList, err
}
// Watch returns a watch.Interface that watches the requested secrets.
func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeSecrets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(secretsResource, c.ns, opts))
}
// 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.
func (c *FakeSecrets) Create(secret *corev1.Secret) (result *corev1.Secret, err error) {
func (c *FakeSecrets) Create(ctx context.Context, secret *corev1.Secret) (result *corev1.Secret, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &corev1.Secret{})
@@ -90,7 +92,7 @@ func (c *FakeSecrets) Create(secret *corev1.Secret) (result *corev1.Secret, err
}
// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any.
func (c *FakeSecrets) Update(secret *corev1.Secret) (result *corev1.Secret, err error) {
func (c *FakeSecrets) Update(ctx context.Context, secret *corev1.Secret) (result *corev1.Secret, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &corev1.Secret{})
@@ -101,7 +103,7 @@ func (c *FakeSecrets) Update(secret *corev1.Secret) (result *corev1.Secret, err
}
// Delete takes name of the secret and deletes it. Returns an error if one occurs.
func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeSecrets) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(secretsResource, c.ns, name), &corev1.Secret{})
@@ -109,7 +111,7 @@ func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeSecrets) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.SecretList{})
@@ -117,7 +119,7 @@ func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1
}
// Patch applies the patch and returns the patched secret.
func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Secret, err error) {
func (c *FakeSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Secret, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, pt, data, subresources...), &corev1.Secret{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -39,7 +41,7 @@ var servicesResource = schema.GroupVersionResource{Group: "", Version: "v1", Res
var servicesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Service"}
// Get takes name of the service, and returns the corresponding service object, and an error if there is any.
func (c *FakeServices) Get(name string, options v1.GetOptions) (result *corev1.Service, err error) {
func (c *FakeServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Service, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(servicesResource, c.ns, name), &corev1.Service{})
@@ -50,7 +52,7 @@ func (c *FakeServices) Get(name string, options v1.GetOptions) (result *corev1.S
}
// List takes label and field selectors, and returns the list of Services that match those selectors.
func (c *FakeServices) List(opts v1.ListOptions) (result *corev1.ServiceList, err error) {
func (c *FakeServices) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ServiceList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(servicesResource, servicesKind, c.ns, opts), &corev1.ServiceList{})
@@ -72,14 +74,14 @@ func (c *FakeServices) List(opts v1.ListOptions) (result *corev1.ServiceList, er
}
// Watch returns a watch.Interface that watches the requested services.
func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(servicesResource, c.ns, opts))
}
// 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.
func (c *FakeServices) Create(service *corev1.Service) (result *corev1.Service, err error) {
func (c *FakeServices) Create(ctx context.Context, service *corev1.Service) (result *corev1.Service, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &corev1.Service{})
@@ -90,7 +92,7 @@ func (c *FakeServices) Create(service *corev1.Service) (result *corev1.Service,
}
// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any.
func (c *FakeServices) Update(service *corev1.Service) (result *corev1.Service, err error) {
func (c *FakeServices) Update(ctx context.Context, service *corev1.Service) (result *corev1.Service, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &corev1.Service{})
@@ -102,7 +104,7 @@ func (c *FakeServices) Update(service *corev1.Service) (result *corev1.Service,
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeServices) UpdateStatus(service *corev1.Service) (*corev1.Service, error) {
func (c *FakeServices) UpdateStatus(ctx context.Context, service *corev1.Service) (*corev1.Service, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &corev1.Service{})
@@ -113,7 +115,7 @@ func (c *FakeServices) UpdateStatus(service *corev1.Service) (*corev1.Service, e
}
// Delete takes name of the service and deletes it. Returns an error if one occurs.
func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeServices) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(servicesResource, c.ns, name), &corev1.Service{})
@@ -121,7 +123,7 @@ func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error {
}
// Patch applies the patch and returns the patched service.
func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Service, err error) {
func (c *FakeServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Service, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, pt, data, subresources...), &corev1.Service{})

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
authenticationv1 "k8s.io/api/authentication/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -40,7 +42,7 @@ var serviceaccountsResource = schema.GroupVersionResource{Group: "", Version: "v
var serviceaccountsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ServiceAccount"}
// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any.
func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *corev1.ServiceAccount, err error) {
func (c *FakeServiceAccounts) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.ServiceAccount, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{})
@@ -51,7 +53,7 @@ func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *c
}
// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors.
func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *corev1.ServiceAccountList, err error) {
func (c *FakeServiceAccounts) List(ctx context.Context, opts v1.ListOptions) (result *corev1.ServiceAccountList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(serviceaccountsResource, serviceaccountsKind, c.ns, opts), &corev1.ServiceAccountList{})
@@ -73,14 +75,14 @@ func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *corev1.ServiceA
}
// Watch returns a watch.Interface that watches the requested serviceAccounts.
func (c *FakeServiceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeServiceAccounts) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(serviceaccountsResource, c.ns, opts))
}
// 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.
func (c *FakeServiceAccounts) Create(serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) {
func (c *FakeServiceAccounts) Create(ctx context.Context, serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{})
@@ -91,7 +93,7 @@ func (c *FakeServiceAccounts) Create(serviceAccount *corev1.ServiceAccount) (res
}
// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
func (c *FakeServiceAccounts) Update(serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) {
func (c *FakeServiceAccounts) Update(ctx context.Context, serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{})
@@ -102,7 +104,7 @@ func (c *FakeServiceAccounts) Update(serviceAccount *corev1.ServiceAccount) (res
}
// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs.
func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeServiceAccounts) Delete(ctx context.Context, name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{})
@@ -110,7 +112,7 @@ func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *FakeServiceAccounts) DeleteCollection(ctx context.Context, options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &corev1.ServiceAccountList{})
@@ -118,7 +120,7 @@ func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOp
}
// Patch applies the patch and returns the patched serviceAccount.
func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ServiceAccount, err error) {
func (c *FakeServiceAccounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ServiceAccount, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, pt, data, subresources...), &corev1.ServiceAccount{})
@@ -129,7 +131,7 @@ func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte
}
// CreateToken takes the representation of a tokenRequest and creates it. Returns the server's representation of the tokenRequest, and an error, if there is any.
func (c *FakeServiceAccounts) CreateToken(serviceAccountName string, tokenRequest *authenticationv1.TokenRequest) (result *authenticationv1.TokenRequest, err error) {
func (c *FakeServiceAccounts) CreateToken(ctx context.Context, serviceAccountName string, tokenRequest *authenticationv1.TokenRequest) (result *authenticationv1.TokenRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateSubresourceAction(serviceaccountsResource, serviceAccountName, "token", c.ns, tokenRequest), &authenticationv1.TokenRequest{})

Some files were not shown because too many files have changed in this diff Show More