Skip to content

Commit

Permalink
Replace use of deprecated Kubernetes workqueue method (#6781)
Browse files Browse the repository at this point in the history
Replaces use of the deprecated method `workqueue.NewNamedRateLimitingQueue`
with `workqueue.NewRateLimitingQueueWithConfig`.

Signed-off-by: Nick Pillitteri <[email protected]>
  • Loading branch information
56quarters authored Apr 4, 2024
1 parent 196ea05 commit 35b580f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/component/loki/rules/kubernetes/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion internal/component/mimir/rules/kubernetes/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 35b580f

Please sign in to comment.