From 35b580f148e5ad7982f7263c8dda1195e4f3eb4b Mon Sep 17 00:00:00 2001 From: Nick Pillitteri <56quarters@users.noreply.github.com> Date: Thu, 4 Apr 2024 12:18:58 -0400 Subject: [PATCH] Replace use of deprecated Kubernetes workqueue method (#6781) Replaces use of the deprecated method `workqueue.NewNamedRateLimitingQueue` with `workqueue.NewRateLimitingQueueWithConfig`. Signed-off-by: Nick Pillitteri --- internal/component/loki/rules/kubernetes/rules.go | 3 ++- internal/component/mimir/rules/kubernetes/rules.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/component/loki/rules/kubernetes/rules.go b/internal/component/loki/rules/kubernetes/rules.go index fe0cf7b0e8a8..9fbccfdf7ba5 100644 --- a/internal/component/loki/rules/kubernetes/rules.go +++ b/internal/component/loki/rules/kubernetes/rules.go @@ -212,7 +212,8 @@ func (c *Component) Run(ctx context.Context) error { // startup launches the informers and starts the event loop. func (c *Component) startup(ctx context.Context) error { - c.queue = workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "loki.rules.kubernetes") + cfg := workqueue.RateLimitingQueueConfig{Name: "loki.rules.kubernetes"} + c.queue = workqueue.NewRateLimitingQueueWithConfig(workqueue.DefaultControllerRateLimiter(), cfg) c.informerStopChan = make(chan struct{}) if err := c.startNamespaceInformer(); err != nil { diff --git a/internal/component/mimir/rules/kubernetes/rules.go b/internal/component/mimir/rules/kubernetes/rules.go index afd28c72fda3..58e723290c52 100644 --- a/internal/component/mimir/rules/kubernetes/rules.go +++ b/internal/component/mimir/rules/kubernetes/rules.go @@ -212,7 +212,8 @@ func (c *Component) Run(ctx context.Context) error { // startup launches the informers and starts the event loop. func (c *Component) startup(ctx context.Context) error { - c.queue = workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "mimir.rules.kubernetes") + cfg := workqueue.RateLimitingQueueConfig{Name: "mimir.rules.kubernetes"} + c.queue = workqueue.NewRateLimitingQueueWithConfig(workqueue.DefaultControllerRateLimiter(), cfg) c.informerStopChan = make(chan struct{}) if err := c.startNamespaceInformer(); err != nil {