kubernetes-sigs / kubernetes-sigs/controller-runtime

Feature: Priority Queue

Open
#2,374 21 comments 13 reactions 1 assignee View on GitHub

@alvaroaleman is already working on this.

Since Nov 16, 2024.

kind/feature lifecycle/frozen
Dominant language
Go
Stars
3k
Forks
1.3k
Avg merge
2d 5h
Merged PRs (30d)
14

Description

Tasks

Ideas:

Feature enablement

The feature can be enabled by setting the UsePriorityQueue option to true, e.g.:

	ctrlOptions := ctrl.Options{
		Controller: config.Controller{
			UsePriorityQueue: ptr.To[bool](true),
		},
        ...
	}

	mgr, err := ctrl.NewManager(restConfig, ctrlOptions)
Original issue description

While discussing https://github.com/kubernetes-sigs/controller-runtime/issues/857#issuecomment-1587149384 an idea come up about having something like a priority queue, so we can give resync events a lower priority while assigning to other events a higher priority.

This could help when there are many objects of the same type and at every resync period there is a storm of events being added to the queue.

cc @alvaroaleman @sbueringer

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.