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 {