1
0
Fork 0

Upgrade Client-go to 0.18.2

This commit is contained in:
Daniel Tomcej 2020-05-14 09:36:06 -07:00 committed by GitHub
parent 6b1158235e
commit 5f0b6fde92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 382 additions and 408 deletions

View file

@ -67,7 +67,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

@ -27,6 +27,8 @@ THE SOFTWARE.
package fake
import (
"context"
v1alpha1 "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/traefik/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@ -47,7 +49,7 @@ var ingressroutesResource = schema.GroupVersionResource{Group: "traefik.containo
var ingressroutesKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "IngressRoute"}
// Get takes name of the ingressRoute, and returns the corresponding ingressRoute object, and an error if there is any.
func (c *FakeIngressRoutes) Get(name string, options v1.GetOptions) (result *v1alpha1.IngressRoute, err error) {
func (c *FakeIngressRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IngressRoute, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(ingressroutesResource, c.ns, name), &v1alpha1.IngressRoute{})
@ -58,7 +60,7 @@ func (c *FakeIngressRoutes) Get(name string, options v1.GetOptions) (result *v1a
}
// List takes label and field selectors, and returns the list of IngressRoutes that match those selectors.
func (c *FakeIngressRoutes) List(opts v1.ListOptions) (result *v1alpha1.IngressRouteList, err error) {
func (c *FakeIngressRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IngressRouteList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(ingressroutesResource, ingressroutesKind, c.ns, opts), &v1alpha1.IngressRouteList{})
@ -80,14 +82,14 @@ func (c *FakeIngressRoutes) List(opts v1.ListOptions) (result *v1alpha1.IngressR
}
// Watch returns a watch.Interface that watches the requested ingressRoutes.
func (c *FakeIngressRoutes) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeIngressRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(ingressroutesResource, c.ns, opts))
}
// Create takes the representation of a ingressRoute and creates it. Returns the server's representation of the ingressRoute, and an error, if there is any.
func (c *FakeIngressRoutes) Create(ingressRoute *v1alpha1.IngressRoute) (result *v1alpha1.IngressRoute, err error) {
func (c *FakeIngressRoutes) Create(ctx context.Context, ingressRoute *v1alpha1.IngressRoute, opts v1.CreateOptions) (result *v1alpha1.IngressRoute, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(ingressroutesResource, c.ns, ingressRoute), &v1alpha1.IngressRoute{})
@ -98,7 +100,7 @@ func (c *FakeIngressRoutes) Create(ingressRoute *v1alpha1.IngressRoute) (result
}
// Update takes the representation of a ingressRoute and updates it. Returns the server's representation of the ingressRoute, and an error, if there is any.
func (c *FakeIngressRoutes) Update(ingressRoute *v1alpha1.IngressRoute) (result *v1alpha1.IngressRoute, err error) {
func (c *FakeIngressRoutes) Update(ctx context.Context, ingressRoute *v1alpha1.IngressRoute, opts v1.UpdateOptions) (result *v1alpha1.IngressRoute, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(ingressroutesResource, c.ns, ingressRoute), &v1alpha1.IngressRoute{})
@ -109,7 +111,7 @@ func (c *FakeIngressRoutes) Update(ingressRoute *v1alpha1.IngressRoute) (result
}
// Delete takes name of the ingressRoute and deletes it. Returns an error if one occurs.
func (c *FakeIngressRoutes) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeIngressRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(ingressroutesResource, c.ns, name), &v1alpha1.IngressRoute{})
@ -117,15 +119,15 @@ func (c *FakeIngressRoutes) Delete(name string, options *v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIngressRoutes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ingressroutesResource, c.ns, listOptions)
func (c *FakeIngressRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ingressroutesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.IngressRouteList{})
return err
}
// Patch applies the patch and returns the patched ingressRoute.
func (c *FakeIngressRoutes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IngressRoute, err error) {
func (c *FakeIngressRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IngressRoute, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(ingressroutesResource, c.ns, name, pt, data, subresources...), &v1alpha1.IngressRoute{})

View file

@ -27,6 +27,8 @@ THE SOFTWARE.
package fake
import (
"context"
v1alpha1 "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/traefik/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@ -47,7 +49,7 @@ var ingressroutetcpsResource = schema.GroupVersionResource{Group: "traefik.conta
var ingressroutetcpsKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "IngressRouteTCP"}
// Get takes name of the ingressRouteTCP, and returns the corresponding ingressRouteTCP object, and an error if there is any.
func (c *FakeIngressRouteTCPs) Get(name string, options v1.GetOptions) (result *v1alpha1.IngressRouteTCP, err error) {
func (c *FakeIngressRouteTCPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IngressRouteTCP, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(ingressroutetcpsResource, c.ns, name), &v1alpha1.IngressRouteTCP{})
@ -58,7 +60,7 @@ func (c *FakeIngressRouteTCPs) Get(name string, options v1.GetOptions) (result *
}
// List takes label and field selectors, and returns the list of IngressRouteTCPs that match those selectors.
func (c *FakeIngressRouteTCPs) List(opts v1.ListOptions) (result *v1alpha1.IngressRouteTCPList, err error) {
func (c *FakeIngressRouteTCPs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IngressRouteTCPList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(ingressroutetcpsResource, ingressroutetcpsKind, c.ns, opts), &v1alpha1.IngressRouteTCPList{})
@ -80,14 +82,14 @@ func (c *FakeIngressRouteTCPs) List(opts v1.ListOptions) (result *v1alpha1.Ingre
}
// Watch returns a watch.Interface that watches the requested ingressRouteTCPs.
func (c *FakeIngressRouteTCPs) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeIngressRouteTCPs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(ingressroutetcpsResource, c.ns, opts))
}
// Create takes the representation of a ingressRouteTCP and creates it. Returns the server's representation of the ingressRouteTCP, and an error, if there is any.
func (c *FakeIngressRouteTCPs) Create(ingressRouteTCP *v1alpha1.IngressRouteTCP) (result *v1alpha1.IngressRouteTCP, err error) {
func (c *FakeIngressRouteTCPs) Create(ctx context.Context, ingressRouteTCP *v1alpha1.IngressRouteTCP, opts v1.CreateOptions) (result *v1alpha1.IngressRouteTCP, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(ingressroutetcpsResource, c.ns, ingressRouteTCP), &v1alpha1.IngressRouteTCP{})
@ -98,7 +100,7 @@ func (c *FakeIngressRouteTCPs) Create(ingressRouteTCP *v1alpha1.IngressRouteTCP)
}
// Update takes the representation of a ingressRouteTCP and updates it. Returns the server's representation of the ingressRouteTCP, and an error, if there is any.
func (c *FakeIngressRouteTCPs) Update(ingressRouteTCP *v1alpha1.IngressRouteTCP) (result *v1alpha1.IngressRouteTCP, err error) {
func (c *FakeIngressRouteTCPs) Update(ctx context.Context, ingressRouteTCP *v1alpha1.IngressRouteTCP, opts v1.UpdateOptions) (result *v1alpha1.IngressRouteTCP, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(ingressroutetcpsResource, c.ns, ingressRouteTCP), &v1alpha1.IngressRouteTCP{})
@ -109,7 +111,7 @@ func (c *FakeIngressRouteTCPs) Update(ingressRouteTCP *v1alpha1.IngressRouteTCP)
}
// Delete takes name of the ingressRouteTCP and deletes it. Returns an error if one occurs.
func (c *FakeIngressRouteTCPs) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeIngressRouteTCPs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(ingressroutetcpsResource, c.ns, name), &v1alpha1.IngressRouteTCP{})
@ -117,15 +119,15 @@ func (c *FakeIngressRouteTCPs) Delete(name string, options *v1.DeleteOptions) er
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIngressRouteTCPs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ingressroutetcpsResource, c.ns, listOptions)
func (c *FakeIngressRouteTCPs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ingressroutetcpsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.IngressRouteTCPList{})
return err
}
// Patch applies the patch and returns the patched ingressRouteTCP.
func (c *FakeIngressRouteTCPs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IngressRouteTCP, err error) {
func (c *FakeIngressRouteTCPs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IngressRouteTCP, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(ingressroutetcpsResource, c.ns, name, pt, data, subresources...), &v1alpha1.IngressRouteTCP{})

View file

@ -27,6 +27,8 @@ THE SOFTWARE.
package fake
import (
"context"
v1alpha1 "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/traefik/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@ -47,7 +49,7 @@ var ingressrouteudpsResource = schema.GroupVersionResource{Group: "traefik.conta
var ingressrouteudpsKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "IngressRouteUDP"}
// Get takes name of the ingressRouteUDP, and returns the corresponding ingressRouteUDP object, and an error if there is any.
func (c *FakeIngressRouteUDPs) Get(name string, options v1.GetOptions) (result *v1alpha1.IngressRouteUDP, err error) {
func (c *FakeIngressRouteUDPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IngressRouteUDP, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(ingressrouteudpsResource, c.ns, name), &v1alpha1.IngressRouteUDP{})
@ -58,7 +60,7 @@ func (c *FakeIngressRouteUDPs) Get(name string, options v1.GetOptions) (result *
}
// List takes label and field selectors, and returns the list of IngressRouteUDPs that match those selectors.
func (c *FakeIngressRouteUDPs) List(opts v1.ListOptions) (result *v1alpha1.IngressRouteUDPList, err error) {
func (c *FakeIngressRouteUDPs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IngressRouteUDPList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(ingressrouteudpsResource, ingressrouteudpsKind, c.ns, opts), &v1alpha1.IngressRouteUDPList{})
@ -80,14 +82,14 @@ func (c *FakeIngressRouteUDPs) List(opts v1.ListOptions) (result *v1alpha1.Ingre
}
// Watch returns a watch.Interface that watches the requested ingressRouteUDPs.
func (c *FakeIngressRouteUDPs) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeIngressRouteUDPs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(ingressrouteudpsResource, c.ns, opts))
}
// Create takes the representation of a ingressRouteUDP and creates it. Returns the server's representation of the ingressRouteUDP, and an error, if there is any.
func (c *FakeIngressRouteUDPs) Create(ingressRouteUDP *v1alpha1.IngressRouteUDP) (result *v1alpha1.IngressRouteUDP, err error) {
func (c *FakeIngressRouteUDPs) Create(ctx context.Context, ingressRouteUDP *v1alpha1.IngressRouteUDP, opts v1.CreateOptions) (result *v1alpha1.IngressRouteUDP, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(ingressrouteudpsResource, c.ns, ingressRouteUDP), &v1alpha1.IngressRouteUDP{})
@ -98,7 +100,7 @@ func (c *FakeIngressRouteUDPs) Create(ingressRouteUDP *v1alpha1.IngressRouteUDP)
}
// Update takes the representation of a ingressRouteUDP and updates it. Returns the server's representation of the ingressRouteUDP, and an error, if there is any.
func (c *FakeIngressRouteUDPs) Update(ingressRouteUDP *v1alpha1.IngressRouteUDP) (result *v1alpha1.IngressRouteUDP, err error) {
func (c *FakeIngressRouteUDPs) Update(ctx context.Context, ingressRouteUDP *v1alpha1.IngressRouteUDP, opts v1.UpdateOptions) (result *v1alpha1.IngressRouteUDP, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(ingressrouteudpsResource, c.ns, ingressRouteUDP), &v1alpha1.IngressRouteUDP{})
@ -109,7 +111,7 @@ func (c *FakeIngressRouteUDPs) Update(ingressRouteUDP *v1alpha1.IngressRouteUDP)
}
// Delete takes name of the ingressRouteUDP and deletes it. Returns an error if one occurs.
func (c *FakeIngressRouteUDPs) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeIngressRouteUDPs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(ingressrouteudpsResource, c.ns, name), &v1alpha1.IngressRouteUDP{})
@ -117,15 +119,15 @@ func (c *FakeIngressRouteUDPs) Delete(name string, options *v1.DeleteOptions) er
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIngressRouteUDPs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ingressrouteudpsResource, c.ns, listOptions)
func (c *FakeIngressRouteUDPs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ingressrouteudpsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.IngressRouteUDPList{})
return err
}
// Patch applies the patch and returns the patched ingressRouteUDP.
func (c *FakeIngressRouteUDPs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IngressRouteUDP, err error) {
func (c *FakeIngressRouteUDPs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IngressRouteUDP, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(ingressrouteudpsResource, c.ns, name, pt, data, subresources...), &v1alpha1.IngressRouteUDP{})

View file

@ -27,6 +27,8 @@ THE SOFTWARE.
package fake
import (
"context"
v1alpha1 "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/traefik/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@ -47,7 +49,7 @@ var middlewaresResource = schema.GroupVersionResource{Group: "traefik.containo.u
var middlewaresKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "Middleware"}
// Get takes name of the middleware, and returns the corresponding middleware object, and an error if there is any.
func (c *FakeMiddlewares) Get(name string, options v1.GetOptions) (result *v1alpha1.Middleware, err error) {
func (c *FakeMiddlewares) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Middleware, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(middlewaresResource, c.ns, name), &v1alpha1.Middleware{})
@ -58,7 +60,7 @@ func (c *FakeMiddlewares) Get(name string, options v1.GetOptions) (result *v1alp
}
// List takes label and field selectors, and returns the list of Middlewares that match those selectors.
func (c *FakeMiddlewares) List(opts v1.ListOptions) (result *v1alpha1.MiddlewareList, err error) {
func (c *FakeMiddlewares) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MiddlewareList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(middlewaresResource, middlewaresKind, c.ns, opts), &v1alpha1.MiddlewareList{})
@ -80,14 +82,14 @@ func (c *FakeMiddlewares) List(opts v1.ListOptions) (result *v1alpha1.Middleware
}
// Watch returns a watch.Interface that watches the requested middlewares.
func (c *FakeMiddlewares) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeMiddlewares) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(middlewaresResource, c.ns, opts))
}
// Create takes the representation of a middleware and creates it. Returns the server's representation of the middleware, and an error, if there is any.
func (c *FakeMiddlewares) Create(middleware *v1alpha1.Middleware) (result *v1alpha1.Middleware, err error) {
func (c *FakeMiddlewares) Create(ctx context.Context, middleware *v1alpha1.Middleware, opts v1.CreateOptions) (result *v1alpha1.Middleware, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(middlewaresResource, c.ns, middleware), &v1alpha1.Middleware{})
@ -98,7 +100,7 @@ func (c *FakeMiddlewares) Create(middleware *v1alpha1.Middleware) (result *v1alp
}
// Update takes the representation of a middleware and updates it. Returns the server's representation of the middleware, and an error, if there is any.
func (c *FakeMiddlewares) Update(middleware *v1alpha1.Middleware) (result *v1alpha1.Middleware, err error) {
func (c *FakeMiddlewares) Update(ctx context.Context, middleware *v1alpha1.Middleware, opts v1.UpdateOptions) (result *v1alpha1.Middleware, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(middlewaresResource, c.ns, middleware), &v1alpha1.Middleware{})
@ -109,7 +111,7 @@ func (c *FakeMiddlewares) Update(middleware *v1alpha1.Middleware) (result *v1alp
}
// Delete takes name of the middleware and deletes it. Returns an error if one occurs.
func (c *FakeMiddlewares) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeMiddlewares) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(middlewaresResource, c.ns, name), &v1alpha1.Middleware{})
@ -117,15 +119,15 @@ func (c *FakeMiddlewares) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeMiddlewares) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(middlewaresResource, c.ns, listOptions)
func (c *FakeMiddlewares) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(middlewaresResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.MiddlewareList{})
return err
}
// Patch applies the patch and returns the patched middleware.
func (c *FakeMiddlewares) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Middleware, err error) {
func (c *FakeMiddlewares) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Middleware, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(middlewaresResource, c.ns, name, pt, data, subresources...), &v1alpha1.Middleware{})

View file

@ -27,6 +27,8 @@ THE SOFTWARE.
package fake
import (
"context"
v1alpha1 "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/traefik/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@ -47,7 +49,7 @@ var tlsoptionsResource = schema.GroupVersionResource{Group: "traefik.containo.us
var tlsoptionsKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "TLSOption"}
// Get takes name of the tLSOption, and returns the corresponding tLSOption object, and an error if there is any.
func (c *FakeTLSOptions) Get(name string, options v1.GetOptions) (result *v1alpha1.TLSOption, err error) {
func (c *FakeTLSOptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TLSOption, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(tlsoptionsResource, c.ns, name), &v1alpha1.TLSOption{})
@ -58,7 +60,7 @@ func (c *FakeTLSOptions) Get(name string, options v1.GetOptions) (result *v1alph
}
// List takes label and field selectors, and returns the list of TLSOptions that match those selectors.
func (c *FakeTLSOptions) List(opts v1.ListOptions) (result *v1alpha1.TLSOptionList, err error) {
func (c *FakeTLSOptions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TLSOptionList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(tlsoptionsResource, tlsoptionsKind, c.ns, opts), &v1alpha1.TLSOptionList{})
@ -80,14 +82,14 @@ func (c *FakeTLSOptions) List(opts v1.ListOptions) (result *v1alpha1.TLSOptionLi
}
// Watch returns a watch.Interface that watches the requested tLSOptions.
func (c *FakeTLSOptions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeTLSOptions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(tlsoptionsResource, c.ns, opts))
}
// Create takes the representation of a tLSOption and creates it. Returns the server's representation of the tLSOption, and an error, if there is any.
func (c *FakeTLSOptions) Create(tLSOption *v1alpha1.TLSOption) (result *v1alpha1.TLSOption, err error) {
func (c *FakeTLSOptions) Create(ctx context.Context, tLSOption *v1alpha1.TLSOption, opts v1.CreateOptions) (result *v1alpha1.TLSOption, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(tlsoptionsResource, c.ns, tLSOption), &v1alpha1.TLSOption{})
@ -98,7 +100,7 @@ func (c *FakeTLSOptions) Create(tLSOption *v1alpha1.TLSOption) (result *v1alpha1
}
// Update takes the representation of a tLSOption and updates it. Returns the server's representation of the tLSOption, and an error, if there is any.
func (c *FakeTLSOptions) Update(tLSOption *v1alpha1.TLSOption) (result *v1alpha1.TLSOption, err error) {
func (c *FakeTLSOptions) Update(ctx context.Context, tLSOption *v1alpha1.TLSOption, opts v1.UpdateOptions) (result *v1alpha1.TLSOption, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(tlsoptionsResource, c.ns, tLSOption), &v1alpha1.TLSOption{})
@ -109,7 +111,7 @@ func (c *FakeTLSOptions) Update(tLSOption *v1alpha1.TLSOption) (result *v1alpha1
}
// Delete takes name of the tLSOption and deletes it. Returns an error if one occurs.
func (c *FakeTLSOptions) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeTLSOptions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(tlsoptionsResource, c.ns, name), &v1alpha1.TLSOption{})
@ -117,15 +119,15 @@ func (c *FakeTLSOptions) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeTLSOptions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(tlsoptionsResource, c.ns, listOptions)
func (c *FakeTLSOptions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(tlsoptionsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.TLSOptionList{})
return err
}
// Patch applies the patch and returns the patched tLSOption.
func (c *FakeTLSOptions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.TLSOption, err error) {
func (c *FakeTLSOptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TLSOption, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(tlsoptionsResource, c.ns, name, pt, data, subresources...), &v1alpha1.TLSOption{})

View file

@ -27,6 +27,8 @@ THE SOFTWARE.
package fake
import (
"context"
v1alpha1 "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/traefik/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@ -47,7 +49,7 @@ var tlsstoresResource = schema.GroupVersionResource{Group: "traefik.containo.us"
var tlsstoresKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "TLSStore"}
// Get takes name of the tLSStore, and returns the corresponding tLSStore object, and an error if there is any.
func (c *FakeTLSStores) Get(name string, options v1.GetOptions) (result *v1alpha1.TLSStore, err error) {
func (c *FakeTLSStores) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TLSStore, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(tlsstoresResource, c.ns, name), &v1alpha1.TLSStore{})
@ -58,7 +60,7 @@ func (c *FakeTLSStores) Get(name string, options v1.GetOptions) (result *v1alpha
}
// List takes label and field selectors, and returns the list of TLSStores that match those selectors.
func (c *FakeTLSStores) List(opts v1.ListOptions) (result *v1alpha1.TLSStoreList, err error) {
func (c *FakeTLSStores) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TLSStoreList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(tlsstoresResource, tlsstoresKind, c.ns, opts), &v1alpha1.TLSStoreList{})
@ -80,14 +82,14 @@ func (c *FakeTLSStores) List(opts v1.ListOptions) (result *v1alpha1.TLSStoreList
}
// Watch returns a watch.Interface that watches the requested tLSStores.
func (c *FakeTLSStores) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeTLSStores) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(tlsstoresResource, c.ns, opts))
}
// Create takes the representation of a tLSStore and creates it. Returns the server's representation of the tLSStore, and an error, if there is any.
func (c *FakeTLSStores) Create(tLSStore *v1alpha1.TLSStore) (result *v1alpha1.TLSStore, err error) {
func (c *FakeTLSStores) Create(ctx context.Context, tLSStore *v1alpha1.TLSStore, opts v1.CreateOptions) (result *v1alpha1.TLSStore, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(tlsstoresResource, c.ns, tLSStore), &v1alpha1.TLSStore{})
@ -98,7 +100,7 @@ func (c *FakeTLSStores) Create(tLSStore *v1alpha1.TLSStore) (result *v1alpha1.TL
}
// Update takes the representation of a tLSStore and updates it. Returns the server's representation of the tLSStore, and an error, if there is any.
func (c *FakeTLSStores) Update(tLSStore *v1alpha1.TLSStore) (result *v1alpha1.TLSStore, err error) {
func (c *FakeTLSStores) Update(ctx context.Context, tLSStore *v1alpha1.TLSStore, opts v1.UpdateOptions) (result *v1alpha1.TLSStore, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(tlsstoresResource, c.ns, tLSStore), &v1alpha1.TLSStore{})
@ -109,7 +111,7 @@ func (c *FakeTLSStores) Update(tLSStore *v1alpha1.TLSStore) (result *v1alpha1.TL
}
// Delete takes name of the tLSStore and deletes it. Returns an error if one occurs.
func (c *FakeTLSStores) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeTLSStores) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(tlsstoresResource, c.ns, name), &v1alpha1.TLSStore{})
@ -117,15 +119,15 @@ func (c *FakeTLSStores) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *FakeTLSStores) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(tlsstoresResource, c.ns, listOptions)
func (c *FakeTLSStores) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(tlsstoresResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.TLSStoreList{})
return err
}
// Patch applies the patch and returns the patched tLSStore.
func (c *FakeTLSStores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.TLSStore, err error) {
func (c *FakeTLSStores) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TLSStore, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(tlsstoresResource, c.ns, name, pt, data, subresources...), &v1alpha1.TLSStore{})

View file

@ -27,6 +27,8 @@ THE SOFTWARE.
package fake
import (
"context"
v1alpha1 "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/traefik/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@ -47,7 +49,7 @@ var traefikservicesResource = schema.GroupVersionResource{Group: "traefik.contai
var traefikservicesKind = schema.GroupVersionKind{Group: "traefik.containo.us", Version: "v1alpha1", Kind: "TraefikService"}
// Get takes name of the traefikService, and returns the corresponding traefikService object, and an error if there is any.
func (c *FakeTraefikServices) Get(name string, options v1.GetOptions) (result *v1alpha1.TraefikService, err error) {
func (c *FakeTraefikServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TraefikService, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(traefikservicesResource, c.ns, name), &v1alpha1.TraefikService{})
@ -58,7 +60,7 @@ func (c *FakeTraefikServices) Get(name string, options v1.GetOptions) (result *v
}
// List takes label and field selectors, and returns the list of TraefikServices that match those selectors.
func (c *FakeTraefikServices) List(opts v1.ListOptions) (result *v1alpha1.TraefikServiceList, err error) {
func (c *FakeTraefikServices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TraefikServiceList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(traefikservicesResource, traefikservicesKind, c.ns, opts), &v1alpha1.TraefikServiceList{})
@ -80,14 +82,14 @@ func (c *FakeTraefikServices) List(opts v1.ListOptions) (result *v1alpha1.Traefi
}
// Watch returns a watch.Interface that watches the requested traefikServices.
func (c *FakeTraefikServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeTraefikServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(traefikservicesResource, c.ns, opts))
}
// Create takes the representation of a traefikService and creates it. Returns the server's representation of the traefikService, and an error, if there is any.
func (c *FakeTraefikServices) Create(traefikService *v1alpha1.TraefikService) (result *v1alpha1.TraefikService, err error) {
func (c *FakeTraefikServices) Create(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.CreateOptions) (result *v1alpha1.TraefikService, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(traefikservicesResource, c.ns, traefikService), &v1alpha1.TraefikService{})
@ -98,7 +100,7 @@ func (c *FakeTraefikServices) Create(traefikService *v1alpha1.TraefikService) (r
}
// Update takes the representation of a traefikService and updates it. Returns the server's representation of the traefikService, and an error, if there is any.
func (c *FakeTraefikServices) Update(traefikService *v1alpha1.TraefikService) (result *v1alpha1.TraefikService, err error) {
func (c *FakeTraefikServices) Update(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.UpdateOptions) (result *v1alpha1.TraefikService, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(traefikservicesResource, c.ns, traefikService), &v1alpha1.TraefikService{})
@ -109,7 +111,7 @@ func (c *FakeTraefikServices) Update(traefikService *v1alpha1.TraefikService) (r
}
// Delete takes name of the traefikService and deletes it. Returns an error if one occurs.
func (c *FakeTraefikServices) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeTraefikServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(traefikservicesResource, c.ns, name), &v1alpha1.TraefikService{})
@ -117,15 +119,15 @@ func (c *FakeTraefikServices) Delete(name string, options *v1.DeleteOptions) err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeTraefikServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(traefikservicesResource, c.ns, listOptions)
func (c *FakeTraefikServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(traefikservicesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.TraefikServiceList{})
return err
}
// Patch applies the patch and returns the patched traefikService.
func (c *FakeTraefikServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.TraefikService, err error) {
func (c *FakeTraefikServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TraefikService, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(traefikservicesResource, c.ns, name, pt, data, subresources...), &v1alpha1.TraefikService{})

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
"time"
scheme "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme"
@ -45,14 +46,14 @@ type IngressRoutesGetter interface {
// IngressRouteInterface has methods to work with IngressRoute resources.
type IngressRouteInterface interface {
Create(*v1alpha1.IngressRoute) (*v1alpha1.IngressRoute, error)
Update(*v1alpha1.IngressRoute) (*v1alpha1.IngressRoute, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.IngressRoute, error)
List(opts v1.ListOptions) (*v1alpha1.IngressRouteList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IngressRoute, err error)
Create(ctx context.Context, ingressRoute *v1alpha1.IngressRoute, opts v1.CreateOptions) (*v1alpha1.IngressRoute, error)
Update(ctx context.Context, ingressRoute *v1alpha1.IngressRoute, opts v1.UpdateOptions) (*v1alpha1.IngressRoute, 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) (*v1alpha1.IngressRoute, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.IngressRouteList, 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 *v1alpha1.IngressRoute, err error)
IngressRouteExpansion
}
@ -71,20 +72,20 @@ func newIngressRoutes(c *TraefikV1alpha1Client, namespace string) *ingressRoutes
}
// Get takes name of the ingressRoute, and returns the corresponding ingressRoute object, and an error if there is any.
func (c *ingressRoutes) Get(name string, options v1.GetOptions) (result *v1alpha1.IngressRoute, err error) {
func (c *ingressRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IngressRoute, err error) {
result = &v1alpha1.IngressRoute{}
err = c.client.Get().
Namespace(c.ns).
Resource("ingressroutes").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of IngressRoutes that match those selectors.
func (c *ingressRoutes) List(opts v1.ListOptions) (result *v1alpha1.IngressRouteList, err error) {
func (c *ingressRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IngressRouteList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@ -95,13 +96,13 @@ func (c *ingressRoutes) List(opts v1.ListOptions) (result *v1alpha1.IngressRoute
Resource("ingressroutes").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested ingressRoutes.
func (c *ingressRoutes) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *ingressRoutes) 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
@ -112,71 +113,74 @@ func (c *ingressRoutes) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("ingressroutes").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a ingressRoute and creates it. Returns the server's representation of the ingressRoute, and an error, if there is any.
func (c *ingressRoutes) Create(ingressRoute *v1alpha1.IngressRoute) (result *v1alpha1.IngressRoute, err error) {
func (c *ingressRoutes) Create(ctx context.Context, ingressRoute *v1alpha1.IngressRoute, opts v1.CreateOptions) (result *v1alpha1.IngressRoute, err error) {
result = &v1alpha1.IngressRoute{}
err = c.client.Post().
Namespace(c.ns).
Resource("ingressroutes").
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingressRoute).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a ingressRoute and updates it. Returns the server's representation of the ingressRoute, and an error, if there is any.
func (c *ingressRoutes) Update(ingressRoute *v1alpha1.IngressRoute) (result *v1alpha1.IngressRoute, err error) {
func (c *ingressRoutes) Update(ctx context.Context, ingressRoute *v1alpha1.IngressRoute, opts v1.UpdateOptions) (result *v1alpha1.IngressRoute, err error) {
result = &v1alpha1.IngressRoute{}
err = c.client.Put().
Namespace(c.ns).
Resource("ingressroutes").
Name(ingressRoute.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingressRoute).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the ingressRoute and deletes it. Returns an error if one occurs.
func (c *ingressRoutes) Delete(name string, options *v1.DeleteOptions) error {
func (c *ingressRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("ingressroutes").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *ingressRoutes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *ingressRoutes) 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().
Namespace(c.ns).
Resource("ingressroutes").
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 ingressRoute.
func (c *ingressRoutes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IngressRoute, err error) {
func (c *ingressRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IngressRoute, err error) {
result = &v1alpha1.IngressRoute{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("ingressroutes").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
"time"
scheme "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme"
@ -45,14 +46,14 @@ type IngressRouteTCPsGetter interface {
// IngressRouteTCPInterface has methods to work with IngressRouteTCP resources.
type IngressRouteTCPInterface interface {
Create(*v1alpha1.IngressRouteTCP) (*v1alpha1.IngressRouteTCP, error)
Update(*v1alpha1.IngressRouteTCP) (*v1alpha1.IngressRouteTCP, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.IngressRouteTCP, error)
List(opts v1.ListOptions) (*v1alpha1.IngressRouteTCPList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IngressRouteTCP, err error)
Create(ctx context.Context, ingressRouteTCP *v1alpha1.IngressRouteTCP, opts v1.CreateOptions) (*v1alpha1.IngressRouteTCP, error)
Update(ctx context.Context, ingressRouteTCP *v1alpha1.IngressRouteTCP, opts v1.UpdateOptions) (*v1alpha1.IngressRouteTCP, 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) (*v1alpha1.IngressRouteTCP, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.IngressRouteTCPList, 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 *v1alpha1.IngressRouteTCP, err error)
IngressRouteTCPExpansion
}
@ -71,20 +72,20 @@ func newIngressRouteTCPs(c *TraefikV1alpha1Client, namespace string) *ingressRou
}
// Get takes name of the ingressRouteTCP, and returns the corresponding ingressRouteTCP object, and an error if there is any.
func (c *ingressRouteTCPs) Get(name string, options v1.GetOptions) (result *v1alpha1.IngressRouteTCP, err error) {
func (c *ingressRouteTCPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IngressRouteTCP, err error) {
result = &v1alpha1.IngressRouteTCP{}
err = c.client.Get().
Namespace(c.ns).
Resource("ingressroutetcps").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of IngressRouteTCPs that match those selectors.
func (c *ingressRouteTCPs) List(opts v1.ListOptions) (result *v1alpha1.IngressRouteTCPList, err error) {
func (c *ingressRouteTCPs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IngressRouteTCPList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@ -95,13 +96,13 @@ func (c *ingressRouteTCPs) List(opts v1.ListOptions) (result *v1alpha1.IngressRo
Resource("ingressroutetcps").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested ingressRouteTCPs.
func (c *ingressRouteTCPs) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *ingressRouteTCPs) 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
@ -112,71 +113,74 @@ func (c *ingressRouteTCPs) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("ingressroutetcps").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a ingressRouteTCP and creates it. Returns the server's representation of the ingressRouteTCP, and an error, if there is any.
func (c *ingressRouteTCPs) Create(ingressRouteTCP *v1alpha1.IngressRouteTCP) (result *v1alpha1.IngressRouteTCP, err error) {
func (c *ingressRouteTCPs) Create(ctx context.Context, ingressRouteTCP *v1alpha1.IngressRouteTCP, opts v1.CreateOptions) (result *v1alpha1.IngressRouteTCP, err error) {
result = &v1alpha1.IngressRouteTCP{}
err = c.client.Post().
Namespace(c.ns).
Resource("ingressroutetcps").
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingressRouteTCP).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a ingressRouteTCP and updates it. Returns the server's representation of the ingressRouteTCP, and an error, if there is any.
func (c *ingressRouteTCPs) Update(ingressRouteTCP *v1alpha1.IngressRouteTCP) (result *v1alpha1.IngressRouteTCP, err error) {
func (c *ingressRouteTCPs) Update(ctx context.Context, ingressRouteTCP *v1alpha1.IngressRouteTCP, opts v1.UpdateOptions) (result *v1alpha1.IngressRouteTCP, err error) {
result = &v1alpha1.IngressRouteTCP{}
err = c.client.Put().
Namespace(c.ns).
Resource("ingressroutetcps").
Name(ingressRouteTCP.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingressRouteTCP).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the ingressRouteTCP and deletes it. Returns an error if one occurs.
func (c *ingressRouteTCPs) Delete(name string, options *v1.DeleteOptions) error {
func (c *ingressRouteTCPs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("ingressroutetcps").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *ingressRouteTCPs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *ingressRouteTCPs) 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().
Namespace(c.ns).
Resource("ingressroutetcps").
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 ingressRouteTCP.
func (c *ingressRouteTCPs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IngressRouteTCP, err error) {
func (c *ingressRouteTCPs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IngressRouteTCP, err error) {
result = &v1alpha1.IngressRouteTCP{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("ingressroutetcps").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
"time"
scheme "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme"
@ -45,14 +46,14 @@ type IngressRouteUDPsGetter interface {
// IngressRouteUDPInterface has methods to work with IngressRouteUDP resources.
type IngressRouteUDPInterface interface {
Create(*v1alpha1.IngressRouteUDP) (*v1alpha1.IngressRouteUDP, error)
Update(*v1alpha1.IngressRouteUDP) (*v1alpha1.IngressRouteUDP, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.IngressRouteUDP, error)
List(opts v1.ListOptions) (*v1alpha1.IngressRouteUDPList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IngressRouteUDP, err error)
Create(ctx context.Context, ingressRouteUDP *v1alpha1.IngressRouteUDP, opts v1.CreateOptions) (*v1alpha1.IngressRouteUDP, error)
Update(ctx context.Context, ingressRouteUDP *v1alpha1.IngressRouteUDP, opts v1.UpdateOptions) (*v1alpha1.IngressRouteUDP, 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) (*v1alpha1.IngressRouteUDP, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.IngressRouteUDPList, 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 *v1alpha1.IngressRouteUDP, err error)
IngressRouteUDPExpansion
}
@ -71,20 +72,20 @@ func newIngressRouteUDPs(c *TraefikV1alpha1Client, namespace string) *ingressRou
}
// Get takes name of the ingressRouteUDP, and returns the corresponding ingressRouteUDP object, and an error if there is any.
func (c *ingressRouteUDPs) Get(name string, options v1.GetOptions) (result *v1alpha1.IngressRouteUDP, err error) {
func (c *ingressRouteUDPs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IngressRouteUDP, err error) {
result = &v1alpha1.IngressRouteUDP{}
err = c.client.Get().
Namespace(c.ns).
Resource("ingressrouteudps").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of IngressRouteUDPs that match those selectors.
func (c *ingressRouteUDPs) List(opts v1.ListOptions) (result *v1alpha1.IngressRouteUDPList, err error) {
func (c *ingressRouteUDPs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IngressRouteUDPList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@ -95,13 +96,13 @@ func (c *ingressRouteUDPs) List(opts v1.ListOptions) (result *v1alpha1.IngressRo
Resource("ingressrouteudps").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested ingressRouteUDPs.
func (c *ingressRouteUDPs) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *ingressRouteUDPs) 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
@ -112,71 +113,74 @@ func (c *ingressRouteUDPs) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("ingressrouteudps").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a ingressRouteUDP and creates it. Returns the server's representation of the ingressRouteUDP, and an error, if there is any.
func (c *ingressRouteUDPs) Create(ingressRouteUDP *v1alpha1.IngressRouteUDP) (result *v1alpha1.IngressRouteUDP, err error) {
func (c *ingressRouteUDPs) Create(ctx context.Context, ingressRouteUDP *v1alpha1.IngressRouteUDP, opts v1.CreateOptions) (result *v1alpha1.IngressRouteUDP, err error) {
result = &v1alpha1.IngressRouteUDP{}
err = c.client.Post().
Namespace(c.ns).
Resource("ingressrouteudps").
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingressRouteUDP).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a ingressRouteUDP and updates it. Returns the server's representation of the ingressRouteUDP, and an error, if there is any.
func (c *ingressRouteUDPs) Update(ingressRouteUDP *v1alpha1.IngressRouteUDP) (result *v1alpha1.IngressRouteUDP, err error) {
func (c *ingressRouteUDPs) Update(ctx context.Context, ingressRouteUDP *v1alpha1.IngressRouteUDP, opts v1.UpdateOptions) (result *v1alpha1.IngressRouteUDP, err error) {
result = &v1alpha1.IngressRouteUDP{}
err = c.client.Put().
Namespace(c.ns).
Resource("ingressrouteudps").
Name(ingressRouteUDP.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingressRouteUDP).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the ingressRouteUDP and deletes it. Returns an error if one occurs.
func (c *ingressRouteUDPs) Delete(name string, options *v1.DeleteOptions) error {
func (c *ingressRouteUDPs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("ingressrouteudps").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *ingressRouteUDPs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *ingressRouteUDPs) 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().
Namespace(c.ns).
Resource("ingressrouteudps").
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 ingressRouteUDP.
func (c *ingressRouteUDPs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IngressRouteUDP, err error) {
func (c *ingressRouteUDPs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IngressRouteUDP, err error) {
result = &v1alpha1.IngressRouteUDP{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("ingressrouteudps").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
"time"
scheme "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme"
@ -45,14 +46,14 @@ type MiddlewaresGetter interface {
// MiddlewareInterface has methods to work with Middleware resources.
type MiddlewareInterface interface {
Create(*v1alpha1.Middleware) (*v1alpha1.Middleware, error)
Update(*v1alpha1.Middleware) (*v1alpha1.Middleware, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.Middleware, error)
List(opts v1.ListOptions) (*v1alpha1.MiddlewareList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Middleware, err error)
Create(ctx context.Context, middleware *v1alpha1.Middleware, opts v1.CreateOptions) (*v1alpha1.Middleware, error)
Update(ctx context.Context, middleware *v1alpha1.Middleware, opts v1.UpdateOptions) (*v1alpha1.Middleware, 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) (*v1alpha1.Middleware, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MiddlewareList, 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 *v1alpha1.Middleware, err error)
MiddlewareExpansion
}
@ -71,20 +72,20 @@ func newMiddlewares(c *TraefikV1alpha1Client, namespace string) *middlewares {
}
// Get takes name of the middleware, and returns the corresponding middleware object, and an error if there is any.
func (c *middlewares) Get(name string, options v1.GetOptions) (result *v1alpha1.Middleware, err error) {
func (c *middlewares) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Middleware, err error) {
result = &v1alpha1.Middleware{}
err = c.client.Get().
Namespace(c.ns).
Resource("middlewares").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Middlewares that match those selectors.
func (c *middlewares) List(opts v1.ListOptions) (result *v1alpha1.MiddlewareList, err error) {
func (c *middlewares) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MiddlewareList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@ -95,13 +96,13 @@ func (c *middlewares) List(opts v1.ListOptions) (result *v1alpha1.MiddlewareList
Resource("middlewares").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested middlewares.
func (c *middlewares) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *middlewares) 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
@ -112,71 +113,74 @@ func (c *middlewares) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("middlewares").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a middleware and creates it. Returns the server's representation of the middleware, and an error, if there is any.
func (c *middlewares) Create(middleware *v1alpha1.Middleware) (result *v1alpha1.Middleware, err error) {
func (c *middlewares) Create(ctx context.Context, middleware *v1alpha1.Middleware, opts v1.CreateOptions) (result *v1alpha1.Middleware, err error) {
result = &v1alpha1.Middleware{}
err = c.client.Post().
Namespace(c.ns).
Resource("middlewares").
VersionedParams(&opts, scheme.ParameterCodec).
Body(middleware).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a middleware and updates it. Returns the server's representation of the middleware, and an error, if there is any.
func (c *middlewares) Update(middleware *v1alpha1.Middleware) (result *v1alpha1.Middleware, err error) {
func (c *middlewares) Update(ctx context.Context, middleware *v1alpha1.Middleware, opts v1.UpdateOptions) (result *v1alpha1.Middleware, err error) {
result = &v1alpha1.Middleware{}
err = c.client.Put().
Namespace(c.ns).
Resource("middlewares").
Name(middleware.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(middleware).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the middleware and deletes it. Returns an error if one occurs.
func (c *middlewares) Delete(name string, options *v1.DeleteOptions) error {
func (c *middlewares) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("middlewares").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *middlewares) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *middlewares) 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().
Namespace(c.ns).
Resource("middlewares").
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 middleware.
func (c *middlewares) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Middleware, err error) {
func (c *middlewares) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Middleware, err error) {
result = &v1alpha1.Middleware{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("middlewares").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
"time"
scheme "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme"
@ -45,14 +46,14 @@ type TLSOptionsGetter interface {
// TLSOptionInterface has methods to work with TLSOption resources.
type TLSOptionInterface interface {
Create(*v1alpha1.TLSOption) (*v1alpha1.TLSOption, error)
Update(*v1alpha1.TLSOption) (*v1alpha1.TLSOption, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.TLSOption, error)
List(opts v1.ListOptions) (*v1alpha1.TLSOptionList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.TLSOption, err error)
Create(ctx context.Context, tLSOption *v1alpha1.TLSOption, opts v1.CreateOptions) (*v1alpha1.TLSOption, error)
Update(ctx context.Context, tLSOption *v1alpha1.TLSOption, opts v1.UpdateOptions) (*v1alpha1.TLSOption, 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) (*v1alpha1.TLSOption, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TLSOptionList, 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 *v1alpha1.TLSOption, err error)
TLSOptionExpansion
}
@ -71,20 +72,20 @@ func newTLSOptions(c *TraefikV1alpha1Client, namespace string) *tLSOptions {
}
// Get takes name of the tLSOption, and returns the corresponding tLSOption object, and an error if there is any.
func (c *tLSOptions) Get(name string, options v1.GetOptions) (result *v1alpha1.TLSOption, err error) {
func (c *tLSOptions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TLSOption, err error) {
result = &v1alpha1.TLSOption{}
err = c.client.Get().
Namespace(c.ns).
Resource("tlsoptions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of TLSOptions that match those selectors.
func (c *tLSOptions) List(opts v1.ListOptions) (result *v1alpha1.TLSOptionList, err error) {
func (c *tLSOptions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TLSOptionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@ -95,13 +96,13 @@ func (c *tLSOptions) List(opts v1.ListOptions) (result *v1alpha1.TLSOptionList,
Resource("tlsoptions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested tLSOptions.
func (c *tLSOptions) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *tLSOptions) 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
@ -112,71 +113,74 @@ func (c *tLSOptions) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("tlsoptions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a tLSOption and creates it. Returns the server's representation of the tLSOption, and an error, if there is any.
func (c *tLSOptions) Create(tLSOption *v1alpha1.TLSOption) (result *v1alpha1.TLSOption, err error) {
func (c *tLSOptions) Create(ctx context.Context, tLSOption *v1alpha1.TLSOption, opts v1.CreateOptions) (result *v1alpha1.TLSOption, err error) {
result = &v1alpha1.TLSOption{}
err = c.client.Post().
Namespace(c.ns).
Resource("tlsoptions").
VersionedParams(&opts, scheme.ParameterCodec).
Body(tLSOption).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a tLSOption and updates it. Returns the server's representation of the tLSOption, and an error, if there is any.
func (c *tLSOptions) Update(tLSOption *v1alpha1.TLSOption) (result *v1alpha1.TLSOption, err error) {
func (c *tLSOptions) Update(ctx context.Context, tLSOption *v1alpha1.TLSOption, opts v1.UpdateOptions) (result *v1alpha1.TLSOption, err error) {
result = &v1alpha1.TLSOption{}
err = c.client.Put().
Namespace(c.ns).
Resource("tlsoptions").
Name(tLSOption.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(tLSOption).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the tLSOption and deletes it. Returns an error if one occurs.
func (c *tLSOptions) Delete(name string, options *v1.DeleteOptions) error {
func (c *tLSOptions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("tlsoptions").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *tLSOptions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *tLSOptions) 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().
Namespace(c.ns).
Resource("tlsoptions").
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 tLSOption.
func (c *tLSOptions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.TLSOption, err error) {
func (c *tLSOptions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TLSOption, err error) {
result = &v1alpha1.TLSOption{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("tlsoptions").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
"time"
scheme "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme"
@ -45,14 +46,14 @@ type TLSStoresGetter interface {
// TLSStoreInterface has methods to work with TLSStore resources.
type TLSStoreInterface interface {
Create(*v1alpha1.TLSStore) (*v1alpha1.TLSStore, error)
Update(*v1alpha1.TLSStore) (*v1alpha1.TLSStore, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.TLSStore, error)
List(opts v1.ListOptions) (*v1alpha1.TLSStoreList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.TLSStore, err error)
Create(ctx context.Context, tLSStore *v1alpha1.TLSStore, opts v1.CreateOptions) (*v1alpha1.TLSStore, error)
Update(ctx context.Context, tLSStore *v1alpha1.TLSStore, opts v1.UpdateOptions) (*v1alpha1.TLSStore, 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) (*v1alpha1.TLSStore, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TLSStoreList, 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 *v1alpha1.TLSStore, err error)
TLSStoreExpansion
}
@ -71,20 +72,20 @@ func newTLSStores(c *TraefikV1alpha1Client, namespace string) *tLSStores {
}
// Get takes name of the tLSStore, and returns the corresponding tLSStore object, and an error if there is any.
func (c *tLSStores) Get(name string, options v1.GetOptions) (result *v1alpha1.TLSStore, err error) {
func (c *tLSStores) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TLSStore, err error) {
result = &v1alpha1.TLSStore{}
err = c.client.Get().
Namespace(c.ns).
Resource("tlsstores").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of TLSStores that match those selectors.
func (c *tLSStores) List(opts v1.ListOptions) (result *v1alpha1.TLSStoreList, err error) {
func (c *tLSStores) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TLSStoreList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@ -95,13 +96,13 @@ func (c *tLSStores) List(opts v1.ListOptions) (result *v1alpha1.TLSStoreList, er
Resource("tlsstores").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested tLSStores.
func (c *tLSStores) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *tLSStores) 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
@ -112,71 +113,74 @@ func (c *tLSStores) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("tlsstores").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a tLSStore and creates it. Returns the server's representation of the tLSStore, and an error, if there is any.
func (c *tLSStores) Create(tLSStore *v1alpha1.TLSStore) (result *v1alpha1.TLSStore, err error) {
func (c *tLSStores) Create(ctx context.Context, tLSStore *v1alpha1.TLSStore, opts v1.CreateOptions) (result *v1alpha1.TLSStore, err error) {
result = &v1alpha1.TLSStore{}
err = c.client.Post().
Namespace(c.ns).
Resource("tlsstores").
VersionedParams(&opts, scheme.ParameterCodec).
Body(tLSStore).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a tLSStore and updates it. Returns the server's representation of the tLSStore, and an error, if there is any.
func (c *tLSStores) Update(tLSStore *v1alpha1.TLSStore) (result *v1alpha1.TLSStore, err error) {
func (c *tLSStores) Update(ctx context.Context, tLSStore *v1alpha1.TLSStore, opts v1.UpdateOptions) (result *v1alpha1.TLSStore, err error) {
result = &v1alpha1.TLSStore{}
err = c.client.Put().
Namespace(c.ns).
Resource("tlsstores").
Name(tLSStore.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(tLSStore).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the tLSStore and deletes it. Returns an error if one occurs.
func (c *tLSStores) Delete(name string, options *v1.DeleteOptions) error {
func (c *tLSStores) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("tlsstores").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *tLSStores) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *tLSStores) 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().
Namespace(c.ns).
Resource("tlsstores").
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 tLSStore.
func (c *tLSStores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.TLSStore, err error) {
func (c *tLSStores) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TLSStore, err error) {
result = &v1alpha1.TLSStore{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("tlsstores").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
"time"
scheme "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme"
@ -45,14 +46,14 @@ type TraefikServicesGetter interface {
// TraefikServiceInterface has methods to work with TraefikService resources.
type TraefikServiceInterface interface {
Create(*v1alpha1.TraefikService) (*v1alpha1.TraefikService, error)
Update(*v1alpha1.TraefikService) (*v1alpha1.TraefikService, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.TraefikService, error)
List(opts v1.ListOptions) (*v1alpha1.TraefikServiceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.TraefikService, err error)
Create(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.CreateOptions) (*v1alpha1.TraefikService, error)
Update(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.UpdateOptions) (*v1alpha1.TraefikService, 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) (*v1alpha1.TraefikService, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TraefikServiceList, 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 *v1alpha1.TraefikService, err error)
TraefikServiceExpansion
}
@ -71,20 +72,20 @@ func newTraefikServices(c *TraefikV1alpha1Client, namespace string) *traefikServ
}
// Get takes name of the traefikService, and returns the corresponding traefikService object, and an error if there is any.
func (c *traefikServices) Get(name string, options v1.GetOptions) (result *v1alpha1.TraefikService, err error) {
func (c *traefikServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TraefikService, err error) {
result = &v1alpha1.TraefikService{}
err = c.client.Get().
Namespace(c.ns).
Resource("traefikservices").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of TraefikServices that match those selectors.
func (c *traefikServices) List(opts v1.ListOptions) (result *v1alpha1.TraefikServiceList, err error) {
func (c *traefikServices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TraefikServiceList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@ -95,13 +96,13 @@ func (c *traefikServices) List(opts v1.ListOptions) (result *v1alpha1.TraefikSer
Resource("traefikservices").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested traefikServices.
func (c *traefikServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
func (c *traefikServices) 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
@ -112,71 +113,74 @@ func (c *traefikServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
Resource("traefikservices").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
Watch(ctx)
}
// Create takes the representation of a traefikService and creates it. Returns the server's representation of the traefikService, and an error, if there is any.
func (c *traefikServices) Create(traefikService *v1alpha1.TraefikService) (result *v1alpha1.TraefikService, err error) {
func (c *traefikServices) Create(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.CreateOptions) (result *v1alpha1.TraefikService, err error) {
result = &v1alpha1.TraefikService{}
err = c.client.Post().
Namespace(c.ns).
Resource("traefikservices").
VersionedParams(&opts, scheme.ParameterCodec).
Body(traefikService).
Do().
Do(ctx).
Into(result)
return
}
// Update takes the representation of a traefikService and updates it. Returns the server's representation of the traefikService, and an error, if there is any.
func (c *traefikServices) Update(traefikService *v1alpha1.TraefikService) (result *v1alpha1.TraefikService, err error) {
func (c *traefikServices) Update(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.UpdateOptions) (result *v1alpha1.TraefikService, err error) {
result = &v1alpha1.TraefikService{}
err = c.client.Put().
Namespace(c.ns).
Resource("traefikservices").
Name(traefikService.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(traefikService).
Do().
Do(ctx).
Into(result)
return
}
// Delete takes name of the traefikService and deletes it. Returns an error if one occurs.
func (c *traefikServices) Delete(name string, options *v1.DeleteOptions) error {
func (c *traefikServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("traefikservices").
Name(name).
Body(options).
Do().
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *traefikServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
func (c *traefikServices) 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().
Namespace(c.ns).
Resource("traefikservices").
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 traefikService.
func (c *traefikServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.TraefikService, err error) {
func (c *traefikServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TraefikService, err error) {
result = &v1alpha1.TraefikService{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("traefikservices").
SubResource(subresources...).
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do().
Do(ctx).
Into(result)
return
}

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
time "time"
versioned "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned"
@ -69,13 +70,13 @@ func NewFilteredIngressRouteInformer(client versioned.Interface, namespace strin
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().IngressRoutes(namespace).List(options)
return client.TraefikV1alpha1().IngressRoutes(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().IngressRoutes(namespace).Watch(options)
return client.TraefikV1alpha1().IngressRoutes(namespace).Watch(context.TODO(), options)
},
},
&traefikv1alpha1.IngressRoute{},

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
time "time"
versioned "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned"
@ -69,13 +70,13 @@ func NewFilteredIngressRouteTCPInformer(client versioned.Interface, namespace st
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().IngressRouteTCPs(namespace).List(options)
return client.TraefikV1alpha1().IngressRouteTCPs(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().IngressRouteTCPs(namespace).Watch(options)
return client.TraefikV1alpha1().IngressRouteTCPs(namespace).Watch(context.TODO(), options)
},
},
&traefikv1alpha1.IngressRouteTCP{},

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
time "time"
versioned "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned"
@ -69,13 +70,13 @@ func NewFilteredIngressRouteUDPInformer(client versioned.Interface, namespace st
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().IngressRouteUDPs(namespace).List(options)
return client.TraefikV1alpha1().IngressRouteUDPs(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().IngressRouteUDPs(namespace).Watch(options)
return client.TraefikV1alpha1().IngressRouteUDPs(namespace).Watch(context.TODO(), options)
},
},
&traefikv1alpha1.IngressRouteUDP{},

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
time "time"
versioned "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned"
@ -69,13 +70,13 @@ func NewFilteredMiddlewareInformer(client versioned.Interface, namespace string,
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().Middlewares(namespace).List(options)
return client.TraefikV1alpha1().Middlewares(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().Middlewares(namespace).Watch(options)
return client.TraefikV1alpha1().Middlewares(namespace).Watch(context.TODO(), options)
},
},
&traefikv1alpha1.Middleware{},

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
time "time"
versioned "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned"
@ -69,13 +70,13 @@ func NewFilteredTLSOptionInformer(client versioned.Interface, namespace string,
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().TLSOptions(namespace).List(options)
return client.TraefikV1alpha1().TLSOptions(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().TLSOptions(namespace).Watch(options)
return client.TraefikV1alpha1().TLSOptions(namespace).Watch(context.TODO(), options)
},
},
&traefikv1alpha1.TLSOption{},

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
time "time"
versioned "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned"
@ -69,13 +70,13 @@ func NewFilteredTLSStoreInformer(client versioned.Interface, namespace string, r
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().TLSStores(namespace).List(options)
return client.TraefikV1alpha1().TLSStores(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().TLSStores(namespace).Watch(options)
return client.TraefikV1alpha1().TLSStores(namespace).Watch(context.TODO(), options)
},
},
&traefikv1alpha1.TLSStore{},

View file

@ -27,6 +27,7 @@ THE SOFTWARE.
package v1alpha1
import (
"context"
time "time"
versioned "github.com/containous/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned"
@ -69,13 +70,13 @@ func NewFilteredTraefikServiceInformer(client versioned.Interface, namespace str
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().TraefikServices(namespace).List(options)
return client.TraefikV1alpha1().TraefikServices(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.TraefikV1alpha1().TraefikServices(namespace).Watch(options)
return client.TraefikV1alpha1().TraefikServices(namespace).Watch(context.TODO(), options)
},
},
&traefikv1alpha1.TraefikService{},

View file

@ -1,6 +1,7 @@
package ingress
import (
"context"
"errors"
"fmt"
"io/ioutil"
@ -21,7 +22,10 @@ import (
"k8s.io/client-go/tools/clientcmd"
)
const resyncPeriod = 10 * time.Minute
const (
resyncPeriod = 10 * time.Minute
defaultTimeout = 5 * time.Second
)
type resourceEventHandler struct {
ev chan<- interface{}
@ -229,7 +233,10 @@ func (c *clientWrapper) UpdateIngressStatus(src *networkingv1beta1.Ingress, ip,
ingCopy := ing.DeepCopy()
ingCopy.Status = networkingv1beta1.IngressStatus{LoadBalancer: corev1.LoadBalancerStatus{Ingress: []corev1.LoadBalancerIngress{{IP: ip, Hostname: hostname}}}}
_, err = c.clientset.NetworkingV1beta1().Ingresses(ingCopy.Namespace).UpdateStatus(ingCopy)
ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout)
defer cancel()
_, err = c.clientset.NetworkingV1beta1().Ingresses(ingCopy.Namespace).UpdateStatus(ctx, ingCopy, metav1.UpdateOptions{})
if err != nil {
return fmt.Errorf("failed to update ingress status %s/%s: %v", src.Namespace, src.Name, err)
}
@ -255,7 +262,10 @@ func (c *clientWrapper) updateIngressStatusOld(src *networkingv1beta1.Ingress, i
ingCopy := ing.DeepCopy()
ingCopy.Status = extensionsv1beta1.IngressStatus{LoadBalancer: corev1.LoadBalancerStatus{Ingress: []corev1.LoadBalancerIngress{{IP: ip, Hostname: hostname}}}}
_, err = c.clientset.ExtensionsV1beta1().Ingresses(ingCopy.Namespace).UpdateStatus(ingCopy)
ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout)
defer cancel()
_, err = c.clientset.ExtensionsV1beta1().Ingresses(ingCopy.Namespace).UpdateStatus(ctx, ingCopy, metav1.UpdateOptions{})
if err != nil {
return fmt.Errorf("failed to update ingress status %s/%s: %v", src.Namespace, src.Name, err)
}