Commit dfcbd5a3 authored by Darren Shepherd's avatar Darren Shepherd Committed by Erik Wilson

Update generated code

parent a8d96112
...@@ -59,7 +59,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { ...@@ -59,7 +59,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
configShallowCopy := *c configShallowCopy := *c
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
if configShallowCopy.Burst <= 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) configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
} }
......
...@@ -19,6 +19,7 @@ limitations under the License. ...@@ -19,6 +19,7 @@ limitations under the License.
package v1 package v1
import ( import (
"context"
"time" "time"
v1 "github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1" v1 "github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1"
...@@ -37,15 +38,15 @@ type AddonsGetter interface { ...@@ -37,15 +38,15 @@ type AddonsGetter interface {
// AddonInterface has methods to work with Addon resources. // AddonInterface has methods to work with Addon resources.
type AddonInterface interface { type AddonInterface interface {
Create(*v1.Addon) (*v1.Addon, error) Create(ctx context.Context, addon *v1.Addon, opts metav1.CreateOptions) (*v1.Addon, error)
Update(*v1.Addon) (*v1.Addon, error) Update(ctx context.Context, addon *v1.Addon, opts metav1.UpdateOptions) (*v1.Addon, error)
UpdateStatus(*v1.Addon) (*v1.Addon, error) UpdateStatus(ctx context.Context, addon *v1.Addon, opts metav1.UpdateOptions) (*v1.Addon, error)
Delete(name string, options *metav1.DeleteOptions) error Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Addon, error) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Addon, error)
List(opts metav1.ListOptions) (*v1.AddonList, error) List(ctx context.Context, opts metav1.ListOptions) (*v1.AddonList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Addon, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Addon, err error)
AddonExpansion AddonExpansion
} }
...@@ -64,20 +65,20 @@ func newAddons(c *K3sV1Client, namespace string) *addons { ...@@ -64,20 +65,20 @@ func newAddons(c *K3sV1Client, namespace string) *addons {
} }
// Get takes name of the addon, and returns the corresponding addon object, and an error if there is any. // Get takes name of the addon, and returns the corresponding addon object, and an error if there is any.
func (c *addons) Get(name string, options metav1.GetOptions) (result *v1.Addon, err error) { func (c *addons) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Addon, err error) {
result = &v1.Addon{} result = &v1.Addon{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("addons"). Resource("addons").
Name(name). Name(name).
VersionedParams(&options, scheme.ParameterCodec). VersionedParams(&options, scheme.ParameterCodec).
Do(). Do(ctx).
Into(result) Into(result)
return return
} }
// List takes label and field selectors, and returns the list of Addons that match those selectors. // List takes label and field selectors, and returns the list of Addons that match those selectors.
func (c *addons) List(opts metav1.ListOptions) (result *v1.AddonList, err error) { func (c *addons) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AddonList, err error) {
var timeout time.Duration var timeout time.Duration
if opts.TimeoutSeconds != nil { if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
...@@ -88,13 +89,13 @@ func (c *addons) List(opts metav1.ListOptions) (result *v1.AddonList, err error) ...@@ -88,13 +89,13 @@ func (c *addons) List(opts metav1.ListOptions) (result *v1.AddonList, err error)
Resource("addons"). Resource("addons").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Do(). Do(ctx).
Into(result) Into(result)
return return
} }
// Watch returns a watch.Interface that watches the requested addons. // Watch returns a watch.Interface that watches the requested addons.
func (c *addons) Watch(opts metav1.ListOptions) (watch.Interface, error) { func (c *addons) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration var timeout time.Duration
if opts.TimeoutSeconds != nil { if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
...@@ -105,87 +106,90 @@ func (c *addons) Watch(opts metav1.ListOptions) (watch.Interface, error) { ...@@ -105,87 +106,90 @@ func (c *addons) Watch(opts metav1.ListOptions) (watch.Interface, error) {
Resource("addons"). Resource("addons").
VersionedParams(&opts, scheme.ParameterCodec). VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Watch() Watch(ctx)
} }
// Create takes the representation of a addon and creates it. Returns the server's representation of the addon, and an error, if there is any. // Create takes the representation of a addon and creates it. Returns the server's representation of the addon, and an error, if there is any.
func (c *addons) Create(addon *v1.Addon) (result *v1.Addon, err error) { func (c *addons) Create(ctx context.Context, addon *v1.Addon, opts metav1.CreateOptions) (result *v1.Addon, err error) {
result = &v1.Addon{} result = &v1.Addon{}
err = c.client.Post(). err = c.client.Post().
Namespace(c.ns). Namespace(c.ns).
Resource("addons"). Resource("addons").
VersionedParams(&opts, scheme.ParameterCodec).
Body(addon). Body(addon).
Do(). Do(ctx).
Into(result) Into(result)
return return
} }
// Update takes the representation of a addon and updates it. Returns the server's representation of the addon, and an error, if there is any. // Update takes the representation of a addon and updates it. Returns the server's representation of the addon, and an error, if there is any.
func (c *addons) Update(addon *v1.Addon) (result *v1.Addon, err error) { func (c *addons) Update(ctx context.Context, addon *v1.Addon, opts metav1.UpdateOptions) (result *v1.Addon, err error) {
result = &v1.Addon{} result = &v1.Addon{}
err = c.client.Put(). err = c.client.Put().
Namespace(c.ns). Namespace(c.ns).
Resource("addons"). Resource("addons").
Name(addon.Name). Name(addon.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(addon). Body(addon).
Do(). Do(ctx).
Into(result) Into(result)
return return
} }
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *addons) UpdateStatus(ctx context.Context, addon *v1.Addon, opts metav1.UpdateOptions) (result *v1.Addon, err error) {
func (c *addons) UpdateStatus(addon *v1.Addon) (result *v1.Addon, err error) {
result = &v1.Addon{} result = &v1.Addon{}
err = c.client.Put(). err = c.client.Put().
Namespace(c.ns). Namespace(c.ns).
Resource("addons"). Resource("addons").
Name(addon.Name). Name(addon.Name).
SubResource("status"). SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(addon). Body(addon).
Do(). Do(ctx).
Into(result) Into(result)
return return
} }
// Delete takes name of the addon and deletes it. Returns an error if one occurs. // Delete takes name of the addon and deletes it. Returns an error if one occurs.
func (c *addons) Delete(name string, options *metav1.DeleteOptions) error { func (c *addons) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("addons"). Resource("addons").
Name(name). Name(name).
Body(options). Body(&opts).
Do(). Do(ctx).
Error() Error()
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *addons) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { func (c *addons) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration var timeout time.Duration
if listOptions.TimeoutSeconds != nil { if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
} }
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("addons"). Resource("addons").
VersionedParams(&listOptions, scheme.ParameterCodec). VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout). Timeout(timeout).
Body(options). Body(&opts).
Do(). Do(ctx).
Error() Error()
} }
// Patch applies the patch and returns the patched addon. // Patch applies the patch and returns the patched addon.
func (c *addons) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Addon, err error) { func (c *addons) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Addon, err error) {
result = &v1.Addon{} result = &v1.Addon{}
err = c.client.Patch(pt). err = c.client.Patch(pt).
Namespace(c.ns). Namespace(c.ns).
Resource("addons"). Resource("addons").
SubResource(subresources...).
Name(name). Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data). Body(data).
Do(). Do(ctx).
Into(result) Into(result)
return return
} }
...@@ -19,6 +19,8 @@ limitations under the License. ...@@ -19,6 +19,8 @@ limitations under the License.
package fake package fake
import ( import (
"context"
k3scattleiov1 "github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1" k3scattleiov1 "github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" labels "k8s.io/apimachinery/pkg/labels"
...@@ -39,7 +41,7 @@ var addonsResource = schema.GroupVersionResource{Group: "k3s.cattle.io", Version ...@@ -39,7 +41,7 @@ var addonsResource = schema.GroupVersionResource{Group: "k3s.cattle.io", Version
var addonsKind = schema.GroupVersionKind{Group: "k3s.cattle.io", Version: "v1", Kind: "Addon"} var addonsKind = schema.GroupVersionKind{Group: "k3s.cattle.io", Version: "v1", Kind: "Addon"}
// Get takes name of the addon, and returns the corresponding addon object, and an error if there is any. // Get takes name of the addon, and returns the corresponding addon object, and an error if there is any.
func (c *FakeAddons) Get(name string, options v1.GetOptions) (result *k3scattleiov1.Addon, err error) { func (c *FakeAddons) Get(ctx context.Context, name string, options v1.GetOptions) (result *k3scattleiov1.Addon, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetAction(addonsResource, c.ns, name), &k3scattleiov1.Addon{}) Invokes(testing.NewGetAction(addonsResource, c.ns, name), &k3scattleiov1.Addon{})
...@@ -50,7 +52,7 @@ func (c *FakeAddons) Get(name string, options v1.GetOptions) (result *k3scattlei ...@@ -50,7 +52,7 @@ func (c *FakeAddons) Get(name string, options v1.GetOptions) (result *k3scattlei
} }
// List takes label and field selectors, and returns the list of Addons that match those selectors. // List takes label and field selectors, and returns the list of Addons that match those selectors.
func (c *FakeAddons) List(opts v1.ListOptions) (result *k3scattleiov1.AddonList, err error) { func (c *FakeAddons) List(ctx context.Context, opts v1.ListOptions) (result *k3scattleiov1.AddonList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewListAction(addonsResource, addonsKind, c.ns, opts), &k3scattleiov1.AddonList{}) Invokes(testing.NewListAction(addonsResource, addonsKind, c.ns, opts), &k3scattleiov1.AddonList{})
...@@ -72,14 +74,14 @@ func (c *FakeAddons) List(opts v1.ListOptions) (result *k3scattleiov1.AddonList, ...@@ -72,14 +74,14 @@ func (c *FakeAddons) List(opts v1.ListOptions) (result *k3scattleiov1.AddonList,
} }
// Watch returns a watch.Interface that watches the requested addons. // Watch returns a watch.Interface that watches the requested addons.
func (c *FakeAddons) Watch(opts v1.ListOptions) (watch.Interface, error) { func (c *FakeAddons) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(testing.NewWatchAction(addonsResource, c.ns, opts)) InvokesWatch(testing.NewWatchAction(addonsResource, c.ns, opts))
} }
// Create takes the representation of a addon and creates it. Returns the server's representation of the addon, and an error, if there is any. // Create takes the representation of a addon and creates it. Returns the server's representation of the addon, and an error, if there is any.
func (c *FakeAddons) Create(addon *k3scattleiov1.Addon) (result *k3scattleiov1.Addon, err error) { func (c *FakeAddons) Create(ctx context.Context, addon *k3scattleiov1.Addon, opts v1.CreateOptions) (result *k3scattleiov1.Addon, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewCreateAction(addonsResource, c.ns, addon), &k3scattleiov1.Addon{}) Invokes(testing.NewCreateAction(addonsResource, c.ns, addon), &k3scattleiov1.Addon{})
...@@ -90,7 +92,7 @@ func (c *FakeAddons) Create(addon *k3scattleiov1.Addon) (result *k3scattleiov1.A ...@@ -90,7 +92,7 @@ func (c *FakeAddons) Create(addon *k3scattleiov1.Addon) (result *k3scattleiov1.A
} }
// Update takes the representation of a addon and updates it. Returns the server's representation of the addon, and an error, if there is any. // Update takes the representation of a addon and updates it. Returns the server's representation of the addon, and an error, if there is any.
func (c *FakeAddons) Update(addon *k3scattleiov1.Addon) (result *k3scattleiov1.Addon, err error) { func (c *FakeAddons) Update(ctx context.Context, addon *k3scattleiov1.Addon, opts v1.UpdateOptions) (result *k3scattleiov1.Addon, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateAction(addonsResource, c.ns, addon), &k3scattleiov1.Addon{}) Invokes(testing.NewUpdateAction(addonsResource, c.ns, addon), &k3scattleiov1.Addon{})
...@@ -102,7 +104,7 @@ func (c *FakeAddons) Update(addon *k3scattleiov1.Addon) (result *k3scattleiov1.A ...@@ -102,7 +104,7 @@ func (c *FakeAddons) Update(addon *k3scattleiov1.Addon) (result *k3scattleiov1.A
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeAddons) UpdateStatus(addon *k3scattleiov1.Addon) (*k3scattleiov1.Addon, error) { func (c *FakeAddons) UpdateStatus(ctx context.Context, addon *k3scattleiov1.Addon, opts v1.UpdateOptions) (*k3scattleiov1.Addon, error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(addonsResource, "status", c.ns, addon), &k3scattleiov1.Addon{}) Invokes(testing.NewUpdateSubresourceAction(addonsResource, "status", c.ns, addon), &k3scattleiov1.Addon{})
...@@ -113,7 +115,7 @@ func (c *FakeAddons) UpdateStatus(addon *k3scattleiov1.Addon) (*k3scattleiov1.Ad ...@@ -113,7 +115,7 @@ func (c *FakeAddons) UpdateStatus(addon *k3scattleiov1.Addon) (*k3scattleiov1.Ad
} }
// Delete takes name of the addon and deletes it. Returns an error if one occurs. // Delete takes name of the addon and deletes it. Returns an error if one occurs.
func (c *FakeAddons) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeAddons) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(addonsResource, c.ns, name), &k3scattleiov1.Addon{}) Invokes(testing.NewDeleteAction(addonsResource, c.ns, name), &k3scattleiov1.Addon{})
...@@ -121,15 +123,15 @@ func (c *FakeAddons) Delete(name string, options *v1.DeleteOptions) error { ...@@ -121,15 +123,15 @@ func (c *FakeAddons) Delete(name string, options *v1.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *FakeAddons) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeAddons) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(addonsResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(addonsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &k3scattleiov1.AddonList{}) _, err := c.Fake.Invokes(action, &k3scattleiov1.AddonList{})
return err return err
} }
// Patch applies the patch and returns the patched addon. // Patch applies the patch and returns the patched addon.
func (c *FakeAddons) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *k3scattleiov1.Addon, err error) { func (c *FakeAddons) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *k3scattleiov1.Addon, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(addonsResource, c.ns, name, pt, data, subresources...), &k3scattleiov1.Addon{}) Invokes(testing.NewPatchSubresourceAction(addonsResource, c.ns, name, pt, data, subresources...), &k3scattleiov1.Addon{})
......
...@@ -176,35 +176,38 @@ func (c *addonController) Cache() AddonCache { ...@@ -176,35 +176,38 @@ func (c *addonController) Cache() AddonCache {
} }
func (c *addonController) Create(obj *v1.Addon) (*v1.Addon, error) { func (c *addonController) Create(obj *v1.Addon) (*v1.Addon, error) {
return c.clientGetter.Addons(obj.Namespace).Create(obj) return c.clientGetter.Addons(obj.Namespace).Create(context.TODO(), obj, metav1.CreateOptions{})
} }
func (c *addonController) Update(obj *v1.Addon) (*v1.Addon, error) { func (c *addonController) Update(obj *v1.Addon) (*v1.Addon, error) {
return c.clientGetter.Addons(obj.Namespace).Update(obj) return c.clientGetter.Addons(obj.Namespace).Update(context.TODO(), obj, metav1.UpdateOptions{})
} }
func (c *addonController) UpdateStatus(obj *v1.Addon) (*v1.Addon, error) { func (c *addonController) UpdateStatus(obj *v1.Addon) (*v1.Addon, error) {
return c.clientGetter.Addons(obj.Namespace).UpdateStatus(obj) return c.clientGetter.Addons(obj.Namespace).UpdateStatus(context.TODO(), obj, metav1.UpdateOptions{})
} }
func (c *addonController) Delete(namespace, name string, options *metav1.DeleteOptions) error { func (c *addonController) Delete(namespace, name string, options *metav1.DeleteOptions) error {
return c.clientGetter.Addons(namespace).Delete(name, options) if options == nil {
options = &metav1.DeleteOptions{}
}
return c.clientGetter.Addons(namespace).Delete(context.TODO(), name, *options)
} }
func (c *addonController) Get(namespace, name string, options metav1.GetOptions) (*v1.Addon, error) { func (c *addonController) Get(namespace, name string, options metav1.GetOptions) (*v1.Addon, error) {
return c.clientGetter.Addons(namespace).Get(name, options) return c.clientGetter.Addons(namespace).Get(context.TODO(), name, options)
} }
func (c *addonController) List(namespace string, opts metav1.ListOptions) (*v1.AddonList, error) { func (c *addonController) List(namespace string, opts metav1.ListOptions) (*v1.AddonList, error) {
return c.clientGetter.Addons(namespace).List(opts) return c.clientGetter.Addons(namespace).List(context.TODO(), opts)
} }
func (c *addonController) Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error) { func (c *addonController) Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error) {
return c.clientGetter.Addons(namespace).Watch(opts) return c.clientGetter.Addons(namespace).Watch(context.TODO(), opts)
} }
func (c *addonController) Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Addon, err error) { func (c *addonController) Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Addon, err error) {
return c.clientGetter.Addons(namespace).Patch(name, pt, data, subresources...) return c.clientGetter.Addons(namespace).Patch(context.TODO(), name, pt, data, metav1.PatchOptions{}, subresources...)
} }
type addonCache struct { type addonCache struct {
...@@ -233,6 +236,7 @@ func (c *addonCache) GetByIndex(indexName, key string) (result []*v1.Addon, err ...@@ -233,6 +236,7 @@ func (c *addonCache) GetByIndex(indexName, key string) (result []*v1.Addon, err
if err != nil { if err != nil {
return nil, err return nil, err
} }
result = make([]*v1.Addon, 0, len(objs))
for _, obj := range objs { for _, obj := range objs {
result = append(result, obj.(*v1.Addon)) result = append(result, obj.(*v1.Addon))
} }
......
...@@ -19,6 +19,7 @@ limitations under the License. ...@@ -19,6 +19,7 @@ limitations under the License.
package v1 package v1
import ( import (
"context"
time "time" time "time"
k3scattleiov1 "github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1" k3scattleiov1 "github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1"
...@@ -61,13 +62,13 @@ func NewFilteredAddonInformer(client versioned.Interface, namespace string, resy ...@@ -61,13 +62,13 @@ func NewFilteredAddonInformer(client versioned.Interface, namespace string, resy
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.K3sV1().Addons(namespace).List(options) return client.K3sV1().Addons(namespace).List(context.TODO(), options)
}, },
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.K3sV1().Addons(namespace).Watch(options) return client.K3sV1().Addons(namespace).Watch(context.TODO(), options)
}, },
}, },
&k3scattleiov1.Addon{}, &k3scattleiov1.Addon{},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment