From 96c902df476fe41ada7bcb7b2836b992d331eeba Mon Sep 17 00:00:00 2001 From: David Gogl <1381862+kengou@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:34:29 +0100 Subject: [PATCH] fix(git-controller) rm deprecated Ratelimiter --- controllers/git_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/git_controller.go b/controllers/git_controller.go index 7d5801f..d7a3c84 100644 --- a/controllers/git_controller.go +++ b/controllers/git_controller.go @@ -55,7 +55,7 @@ type GitController struct { client client.Client scheme *runtime.Scheme repositorySyncer *git.RepositorySyncer - queue workqueue.RateLimitingInterface + queue workqueue.TypedRateLimitingInterface[interface{}] wg sync.WaitGroup mtx sync.Mutex } @@ -258,7 +258,7 @@ func (g *GitController) SetupWithManager(mgr ctrl.Manager) error { g.scheme = mgr.GetScheme() g.client = mgr.GetClient() - g.queue = workqueue.NewRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(30*time.Second, 600*time.Second)) + g.queue = workqueue.NewTypedRateLimitingQueue(workqueue.NewTypedItemExponentialFailureRateLimiter[interface{}](30*time.Second, 600*time.Second)) g.ControllerOptions.Namespace = util.GetEnv("NAMESPACE", g.ControllerOptions.Namespace) if err := mgr.Add(g); err != nil {