update dependencies

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2020-12-22 16:48:26 +08:00
parent 4a11a50544
commit fe6c5de00f
2857 changed files with 252134 additions and 115656 deletions

View File

@@ -59,7 +59,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
configShallowCopy := *c
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
if configShallowCopy.Burst <= 0 {
return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
}
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
}

View File

@@ -19,6 +19,7 @@ limitations under the License.
package calicov3
import (
"context"
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -37,14 +38,14 @@ type BlockAffinitiesGetter interface {
// BlockAffinityInterface has methods to work with BlockAffinity resources.
type BlockAffinityInterface interface {
Create(*calicov3.BlockAffinity) (*calicov3.BlockAffinity, error)
Update(*calicov3.BlockAffinity) (*calicov3.BlockAffinity, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*calicov3.BlockAffinity, error)
List(opts v1.ListOptions) (*calicov3.BlockAffinityList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *calicov3.BlockAffinity, err error)
Create(ctx context.Context, blockAffinity *calicov3.BlockAffinity, opts v1.CreateOptions) (*calicov3.BlockAffinity, error)
Update(ctx context.Context, blockAffinity *calicov3.BlockAffinity, opts v1.UpdateOptions) (*calicov3.BlockAffinity, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*calicov3.BlockAffinity, error)
List(ctx context.Context, opts v1.ListOptions) (*calicov3.BlockAffinityList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *calicov3.BlockAffinity, err error)
BlockAffinityExpansion
}
@@ -61,19 +62,19 @@ func newBlockAffinities(c *CrdCalicov3Client) *blockAffinities {
}
// Get takes name of the blockAffinity, and returns the corresponding blockAffinity object, and an error if there is any.
func (c *blockAffinities) Get(name string, options v1.GetOptions) (result *calicov3.BlockAffinity, err error) {
func (c *blockAffinities) Get(ctx context.Context, name string, options v1.GetOptions) (result *calicov3.BlockAffinity, err error) {
result = &calicov3.BlockAffinity{}
err = c.client.Get().
Resource("blockaffinities").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of BlockAffinities that match those selectors.
func (c *blockAffinities) List(opts v1.ListOptions) (result *calicov3.BlockAffinityList, err error) {
func (c *blockAffinities) List(ctx context.Context, opts v1.ListOptions) (result *calicov3.BlockAffinityList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -83,13 +84,13 @@ func (c *blockAffinities) List(opts v1.ListOptions) (result *calicov3.BlockAffin
Resource("blockaffinities").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested blockAffinities.
func (c *blockAffinities) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *blockAffinities) 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
@@ -99,66 +100,69 @@ func (c *blockAffinities) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("blockaffinities").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a blockAffinity and creates it. Returns the server's representation of the blockAffinity, and an error, if there is any.
func (c *blockAffinities) Create(blockAffinity *calicov3.BlockAffinity) (result *calicov3.BlockAffinity, err error) {
func (c *blockAffinities) Create(ctx context.Context, blockAffinity *calicov3.BlockAffinity, opts v1.CreateOptions) (result *calicov3.BlockAffinity, err error) {
result = &calicov3.BlockAffinity{}
err = c.client.Post().
Resource("blockaffinities").
VersionedParams(&opts, scheme.ParameterCodec).
Body(blockAffinity).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a blockAffinity and updates it. Returns the server's representation of the blockAffinity, and an error, if there is any.
func (c *blockAffinities) Update(blockAffinity *calicov3.BlockAffinity) (result *calicov3.BlockAffinity, err error) {
func (c *blockAffinities) Update(ctx context.Context, blockAffinity *calicov3.BlockAffinity, opts v1.UpdateOptions) (result *calicov3.BlockAffinity, err error) {
result = &calicov3.BlockAffinity{}
err = c.client.Put().
Resource("blockaffinities").
Name(blockAffinity.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(blockAffinity).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the blockAffinity and deletes it. Returns an error if one occurs.
func (c *blockAffinities) Delete(name string, options *v1.DeleteOptions) error {
func (c *blockAffinities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("blockaffinities").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *blockAffinities) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *blockAffinities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("blockaffinities").
VersionedParams(&listOptions, scheme.ParameterCodec).
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched blockAffinity.
func (c *blockAffinities) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *calicov3.BlockAffinity, err error) {
func (c *blockAffinities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *calicov3.BlockAffinity, err error) {
result = &calicov3.BlockAffinity{}
err = c.client.Patch(pt).
Resource("blockaffinities").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,7 +40,7 @@ var blockaffinitiesResource = schema.GroupVersionResource{Group: "crd.projectcal
var blockaffinitiesKind = schema.GroupVersionKind{Group: "crd.projectcalico.org", Version: "calicov3", Kind: "BlockAffinity"}
// Get takes name of the blockAffinity, and returns the corresponding blockAffinity object, and an error if there is any.
func (c *FakeBlockAffinities) Get(name string, options v1.GetOptions) (result *calicov3.BlockAffinity, err error) {
func (c *FakeBlockAffinities) Get(ctx context.Context, name string, options v1.GetOptions) (result *calicov3.BlockAffinity, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(blockaffinitiesResource, name), &calicov3.BlockAffinity{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeBlockAffinities) Get(name string, options v1.GetOptions) (result *c
}
// List takes label and field selectors, and returns the list of BlockAffinities that match those selectors.
func (c *FakeBlockAffinities) List(opts v1.ListOptions) (result *calicov3.BlockAffinityList, err error) {
func (c *FakeBlockAffinities) List(ctx context.Context, opts v1.ListOptions) (result *calicov3.BlockAffinityList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(blockaffinitiesResource, blockaffinitiesKind, opts), &calicov3.BlockAffinityList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeBlockAffinities) List(opts v1.ListOptions) (result *calicov3.BlockA
}
// Watch returns a watch.Interface that watches the requested blockAffinities.
func (c *FakeBlockAffinities) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeBlockAffinities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(blockaffinitiesResource, opts))
}
// Create takes the representation of a blockAffinity and creates it. Returns the server's representation of the blockAffinity, and an error, if there is any.
func (c *FakeBlockAffinities) Create(blockAffinity *calicov3.BlockAffinity) (result *calicov3.BlockAffinity, err error) {
func (c *FakeBlockAffinities) Create(ctx context.Context, blockAffinity *calicov3.BlockAffinity, opts v1.CreateOptions) (result *calicov3.BlockAffinity, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(blockaffinitiesResource, blockAffinity), &calicov3.BlockAffinity{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeBlockAffinities) Create(blockAffinity *calicov3.BlockAffinity) (res
}
// Update takes the representation of a blockAffinity and updates it. Returns the server's representation of the blockAffinity, and an error, if there is any.
func (c *FakeBlockAffinities) Update(blockAffinity *calicov3.BlockAffinity) (result *calicov3.BlockAffinity, err error) {
func (c *FakeBlockAffinities) Update(ctx context.Context, blockAffinity *calicov3.BlockAffinity, opts v1.UpdateOptions) (result *calicov3.BlockAffinity, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(blockaffinitiesResource, blockAffinity), &calicov3.BlockAffinity{})
if obj == nil {
@@ -95,22 +97,22 @@ func (c *FakeBlockAffinities) Update(blockAffinity *calicov3.BlockAffinity) (res
}
// Delete takes name of the blockAffinity and deletes it. Returns an error if one occurs.
func (c *FakeBlockAffinities) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeBlockAffinities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(blockaffinitiesResource, name), &calicov3.BlockAffinity{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeBlockAffinities) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(blockaffinitiesResource, listOptions)
func (c *FakeBlockAffinities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(blockaffinitiesResource, listOpts)
_, err := c.Fake.Invokes(action, &calicov3.BlockAffinityList{})
return err
}
// Patch applies the patch and returns the patched blockAffinity.
func (c *FakeBlockAffinities) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *calicov3.BlockAffinity, err error) {
func (c *FakeBlockAffinities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *calicov3.BlockAffinity, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(blockaffinitiesResource, name, pt, data, subresources...), &calicov3.BlockAffinity{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,7 +40,7 @@ var ipamblocksResource = schema.GroupVersionResource{Group: "crd.projectcalico.o
var ipamblocksKind = schema.GroupVersionKind{Group: "crd.projectcalico.org", Version: "calicov3", Kind: "IPAMBlock"}
// Get takes name of the iPAMBlock, and returns the corresponding iPAMBlock object, and an error if there is any.
func (c *FakeIPAMBlocks) Get(name string, options v1.GetOptions) (result *calicov3.IPAMBlock, err error) {
func (c *FakeIPAMBlocks) Get(ctx context.Context, name string, options v1.GetOptions) (result *calicov3.IPAMBlock, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(ipamblocksResource, name), &calicov3.IPAMBlock{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeIPAMBlocks) Get(name string, options v1.GetOptions) (result *calico
}
// List takes label and field selectors, and returns the list of IPAMBlocks that match those selectors.
func (c *FakeIPAMBlocks) List(opts v1.ListOptions) (result *calicov3.IPAMBlockList, err error) {
func (c *FakeIPAMBlocks) List(ctx context.Context, opts v1.ListOptions) (result *calicov3.IPAMBlockList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(ipamblocksResource, ipamblocksKind, opts), &calicov3.IPAMBlockList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeIPAMBlocks) List(opts v1.ListOptions) (result *calicov3.IPAMBlockLi
}
// Watch returns a watch.Interface that watches the requested iPAMBlocks.
func (c *FakeIPAMBlocks) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeIPAMBlocks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(ipamblocksResource, opts))
}
// Create takes the representation of a iPAMBlock and creates it. Returns the server's representation of the iPAMBlock, and an error, if there is any.
func (c *FakeIPAMBlocks) Create(iPAMBlock *calicov3.IPAMBlock) (result *calicov3.IPAMBlock, err error) {
func (c *FakeIPAMBlocks) Create(ctx context.Context, iPAMBlock *calicov3.IPAMBlock, opts v1.CreateOptions) (result *calicov3.IPAMBlock, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(ipamblocksResource, iPAMBlock), &calicov3.IPAMBlock{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeIPAMBlocks) Create(iPAMBlock *calicov3.IPAMBlock) (result *calicov3
}
// Update takes the representation of a iPAMBlock and updates it. Returns the server's representation of the iPAMBlock, and an error, if there is any.
func (c *FakeIPAMBlocks) Update(iPAMBlock *calicov3.IPAMBlock) (result *calicov3.IPAMBlock, err error) {
func (c *FakeIPAMBlocks) Update(ctx context.Context, iPAMBlock *calicov3.IPAMBlock, opts v1.UpdateOptions) (result *calicov3.IPAMBlock, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(ipamblocksResource, iPAMBlock), &calicov3.IPAMBlock{})
if obj == nil {
@@ -95,22 +97,22 @@ func (c *FakeIPAMBlocks) Update(iPAMBlock *calicov3.IPAMBlock) (result *calicov3
}
// Delete takes name of the iPAMBlock and deletes it. Returns an error if one occurs.
func (c *FakeIPAMBlocks) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeIPAMBlocks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(ipamblocksResource, name), &calicov3.IPAMBlock{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIPAMBlocks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(ipamblocksResource, listOptions)
func (c *FakeIPAMBlocks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(ipamblocksResource, listOpts)
_, err := c.Fake.Invokes(action, &calicov3.IPAMBlockList{})
return err
}
// Patch applies the patch and returns the patched iPAMBlock.
func (c *FakeIPAMBlocks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *calicov3.IPAMBlock, err error) {
func (c *FakeIPAMBlocks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *calicov3.IPAMBlock, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(ipamblocksResource, name, pt, data, subresources...), &calicov3.IPAMBlock{})
if obj == nil {

View File

@@ -19,6 +19,8 @@ limitations under the License.
package fake
import (
"context"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,7 +40,7 @@ var ippoolsResource = schema.GroupVersionResource{Group: "crd.projectcalico.org"
var ippoolsKind = schema.GroupVersionKind{Group: "crd.projectcalico.org", Version: "calicov3", Kind: "IPPool"}
// Get takes name of the iPPool, and returns the corresponding iPPool object, and an error if there is any.
func (c *FakeIPPools) Get(name string, options v1.GetOptions) (result *calicov3.IPPool, err error) {
func (c *FakeIPPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *calicov3.IPPool, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(ippoolsResource, name), &calicov3.IPPool{})
if obj == nil {
@@ -48,7 +50,7 @@ func (c *FakeIPPools) Get(name string, options v1.GetOptions) (result *calicov3.
}
// List takes label and field selectors, and returns the list of IPPools that match those selectors.
func (c *FakeIPPools) List(opts v1.ListOptions) (result *calicov3.IPPoolList, err error) {
func (c *FakeIPPools) List(ctx context.Context, opts v1.ListOptions) (result *calicov3.IPPoolList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(ippoolsResource, ippoolsKind, opts), &calicov3.IPPoolList{})
if obj == nil {
@@ -69,13 +71,13 @@ func (c *FakeIPPools) List(opts v1.ListOptions) (result *calicov3.IPPoolList, er
}
// Watch returns a watch.Interface that watches the requested iPPools.
func (c *FakeIPPools) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeIPPools) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(ippoolsResource, opts))
}
// Create takes the representation of a iPPool and creates it. Returns the server's representation of the iPPool, and an error, if there is any.
func (c *FakeIPPools) Create(iPPool *calicov3.IPPool) (result *calicov3.IPPool, err error) {
func (c *FakeIPPools) Create(ctx context.Context, iPPool *calicov3.IPPool, opts v1.CreateOptions) (result *calicov3.IPPool, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(ippoolsResource, iPPool), &calicov3.IPPool{})
if obj == nil {
@@ -85,7 +87,7 @@ func (c *FakeIPPools) Create(iPPool *calicov3.IPPool) (result *calicov3.IPPool,
}
// Update takes the representation of a iPPool and updates it. Returns the server's representation of the iPPool, and an error, if there is any.
func (c *FakeIPPools) Update(iPPool *calicov3.IPPool) (result *calicov3.IPPool, err error) {
func (c *FakeIPPools) Update(ctx context.Context, iPPool *calicov3.IPPool, opts v1.UpdateOptions) (result *calicov3.IPPool, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(ippoolsResource, iPPool), &calicov3.IPPool{})
if obj == nil {
@@ -95,22 +97,22 @@ func (c *FakeIPPools) Update(iPPool *calicov3.IPPool) (result *calicov3.IPPool,
}
// Delete takes name of the iPPool and deletes it. Returns an error if one occurs.
func (c *FakeIPPools) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeIPPools) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(ippoolsResource, name), &calicov3.IPPool{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIPPools) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(ippoolsResource, listOptions)
func (c *FakeIPPools) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(ippoolsResource, listOpts)
_, err := c.Fake.Invokes(action, &calicov3.IPPoolList{})
return err
}
// Patch applies the patch and returns the patched iPPool.
func (c *FakeIPPools) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *calicov3.IPPool, err error) {
func (c *FakeIPPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *calicov3.IPPool, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(ippoolsResource, name, pt, data, subresources...), &calicov3.IPPool{})
if obj == nil {

View File

@@ -19,6 +19,7 @@ limitations under the License.
package calicov3
import (
"context"
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -37,14 +38,14 @@ type IPAMBlocksGetter interface {
// IPAMBlockInterface has methods to work with IPAMBlock resources.
type IPAMBlockInterface interface {
Create(*calicov3.IPAMBlock) (*calicov3.IPAMBlock, error)
Update(*calicov3.IPAMBlock) (*calicov3.IPAMBlock, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*calicov3.IPAMBlock, error)
List(opts v1.ListOptions) (*calicov3.IPAMBlockList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *calicov3.IPAMBlock, err error)
Create(ctx context.Context, iPAMBlock *calicov3.IPAMBlock, opts v1.CreateOptions) (*calicov3.IPAMBlock, error)
Update(ctx context.Context, iPAMBlock *calicov3.IPAMBlock, opts v1.UpdateOptions) (*calicov3.IPAMBlock, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*calicov3.IPAMBlock, error)
List(ctx context.Context, opts v1.ListOptions) (*calicov3.IPAMBlockList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *calicov3.IPAMBlock, err error)
IPAMBlockExpansion
}
@@ -61,19 +62,19 @@ func newIPAMBlocks(c *CrdCalicov3Client) *iPAMBlocks {
}
// Get takes name of the iPAMBlock, and returns the corresponding iPAMBlock object, and an error if there is any.
func (c *iPAMBlocks) Get(name string, options v1.GetOptions) (result *calicov3.IPAMBlock, err error) {
func (c *iPAMBlocks) Get(ctx context.Context, name string, options v1.GetOptions) (result *calicov3.IPAMBlock, err error) {
result = &calicov3.IPAMBlock{}
err = c.client.Get().
Resource("ipamblocks").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of IPAMBlocks that match those selectors.
func (c *iPAMBlocks) List(opts v1.ListOptions) (result *calicov3.IPAMBlockList, err error) {
func (c *iPAMBlocks) List(ctx context.Context, opts v1.ListOptions) (result *calicov3.IPAMBlockList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -83,13 +84,13 @@ func (c *iPAMBlocks) List(opts v1.ListOptions) (result *calicov3.IPAMBlockList,
Resource("ipamblocks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested iPAMBlocks.
func (c *iPAMBlocks) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *iPAMBlocks) 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
@@ -99,66 +100,69 @@ func (c *iPAMBlocks) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("ipamblocks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a iPAMBlock and creates it. Returns the server's representation of the iPAMBlock, and an error, if there is any.
func (c *iPAMBlocks) Create(iPAMBlock *calicov3.IPAMBlock) (result *calicov3.IPAMBlock, err error) {
func (c *iPAMBlocks) Create(ctx context.Context, iPAMBlock *calicov3.IPAMBlock, opts v1.CreateOptions) (result *calicov3.IPAMBlock, err error) {
result = &calicov3.IPAMBlock{}
err = c.client.Post().
Resource("ipamblocks").
VersionedParams(&opts, scheme.ParameterCodec).
Body(iPAMBlock).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a iPAMBlock and updates it. Returns the server's representation of the iPAMBlock, and an error, if there is any.
func (c *iPAMBlocks) Update(iPAMBlock *calicov3.IPAMBlock) (result *calicov3.IPAMBlock, err error) {
func (c *iPAMBlocks) Update(ctx context.Context, iPAMBlock *calicov3.IPAMBlock, opts v1.UpdateOptions) (result *calicov3.IPAMBlock, err error) {
result = &calicov3.IPAMBlock{}
err = c.client.Put().
Resource("ipamblocks").
Name(iPAMBlock.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(iPAMBlock).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the iPAMBlock and deletes it. Returns an error if one occurs.
func (c *iPAMBlocks) Delete(name string, options *v1.DeleteOptions) error {
func (c *iPAMBlocks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("ipamblocks").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *iPAMBlocks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *iPAMBlocks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("ipamblocks").
VersionedParams(&listOptions, scheme.ParameterCodec).
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched iPAMBlock.
func (c *iPAMBlocks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *calicov3.IPAMBlock, err error) {
func (c *iPAMBlocks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *calicov3.IPAMBlock, err error) {
result = &calicov3.IPAMBlock{}
err = c.client.Patch(pt).
Resource("ipamblocks").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,7 @@ limitations under the License.
package calicov3
import (
"context"
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -37,14 +38,14 @@ type IPPoolsGetter interface {
// IPPoolInterface has methods to work with IPPool resources.
type IPPoolInterface interface {
Create(*calicov3.IPPool) (*calicov3.IPPool, error)
Update(*calicov3.IPPool) (*calicov3.IPPool, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*calicov3.IPPool, error)
List(opts v1.ListOptions) (*calicov3.IPPoolList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *calicov3.IPPool, err error)
Create(ctx context.Context, iPPool *calicov3.IPPool, opts v1.CreateOptions) (*calicov3.IPPool, error)
Update(ctx context.Context, iPPool *calicov3.IPPool, opts v1.UpdateOptions) (*calicov3.IPPool, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*calicov3.IPPool, error)
List(ctx context.Context, opts v1.ListOptions) (*calicov3.IPPoolList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *calicov3.IPPool, err error)
IPPoolExpansion
}
@@ -61,19 +62,19 @@ func newIPPools(c *CrdCalicov3Client) *iPPools {
}
// Get takes name of the iPPool, and returns the corresponding iPPool object, and an error if there is any.
func (c *iPPools) Get(name string, options v1.GetOptions) (result *calicov3.IPPool, err error) {
func (c *iPPools) Get(ctx context.Context, name string, options v1.GetOptions) (result *calicov3.IPPool, err error) {
result = &calicov3.IPPool{}
err = c.client.Get().
Resource("ippools").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of IPPools that match those selectors.
func (c *iPPools) List(opts v1.ListOptions) (result *calicov3.IPPoolList, err error) {
func (c *iPPools) List(ctx context.Context, opts v1.ListOptions) (result *calicov3.IPPoolList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -83,13 +84,13 @@ func (c *iPPools) List(opts v1.ListOptions) (result *calicov3.IPPoolList, err er
Resource("ippools").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested iPPools.
func (c *iPPools) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *iPPools) 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
@@ -99,66 +100,69 @@ func (c *iPPools) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("ippools").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a iPPool and creates it. Returns the server's representation of the iPPool, and an error, if there is any.
func (c *iPPools) Create(iPPool *calicov3.IPPool) (result *calicov3.IPPool, err error) {
func (c *iPPools) Create(ctx context.Context, iPPool *calicov3.IPPool, opts v1.CreateOptions) (result *calicov3.IPPool, err error) {
result = &calicov3.IPPool{}
err = c.client.Post().
Resource("ippools").
VersionedParams(&opts, scheme.ParameterCodec).
Body(iPPool).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a iPPool and updates it. Returns the server's representation of the iPPool, and an error, if there is any.
func (c *iPPools) Update(iPPool *calicov3.IPPool) (result *calicov3.IPPool, err error) {
func (c *iPPools) Update(ctx context.Context, iPPool *calicov3.IPPool, opts v1.UpdateOptions) (result *calicov3.IPPool, err error) {
result = &calicov3.IPPool{}
err = c.client.Put().
Resource("ippools").
Name(iPPool.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(iPPool).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the iPPool and deletes it. Returns an error if one occurs.
func (c *iPPools) Delete(name string, options *v1.DeleteOptions) error {
func (c *iPPools) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("ippools").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *iPPools) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *iPPools) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("ippools").
VersionedParams(&listOptions, scheme.ParameterCodec).
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched iPPool.
func (c *iPPools) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *calicov3.IPPool, err error) {
func (c *iPPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *calicov3.IPPool, err error) {
result = &calicov3.IPPool{}
err = c.client.Patch(pt).
Resource("ippools").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View File

@@ -19,6 +19,7 @@ limitations under the License.
package calicov3
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -60,13 +61,13 @@ func NewFilteredBlockAffinityInformer(client versioned.Interface, resyncPeriod t
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CrdCalicov3().BlockAffinities().List(options)
return client.CrdCalicov3().BlockAffinities().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CrdCalicov3().BlockAffinities().Watch(options)
return client.CrdCalicov3().BlockAffinities().Watch(context.TODO(), options)
},
},
&networkcalicov3.BlockAffinity{},

View File

@@ -19,6 +19,7 @@ limitations under the License.
package calicov3
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -60,13 +61,13 @@ func NewFilteredIPAMBlockInformer(client versioned.Interface, resyncPeriod time.
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CrdCalicov3().IPAMBlocks().List(options)
return client.CrdCalicov3().IPAMBlocks().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CrdCalicov3().IPAMBlocks().Watch(options)
return client.CrdCalicov3().IPAMBlocks().Watch(context.TODO(), options)
},
},
&networkcalicov3.IPAMBlock{},

View File

@@ -19,6 +19,7 @@ limitations under the License.
package calicov3
import (
"context"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -60,13 +61,13 @@ func NewFilteredIPPoolInformer(client versioned.Interface, resyncPeriod time.Dur
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CrdCalicov3().IPPools().List(options)
return client.CrdCalicov3().IPPools().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CrdCalicov3().IPPools().Watch(options)
return client.CrdCalicov3().IPPools().Watch(context.TODO(), options)
},
},
&networkcalicov3.IPPool{},