Skip to content

Conversation

@mikkeloscar
Copy link
Contributor

@mikkeloscar mikkeloscar commented Jan 16, 2026

This is a fundamental refactoring of the controller watch/queue logic with the intention of making it more efficient.

So far the stackset-controller worked roughly like this:

  1. watch for stackset changes (via informer)
  2. For each change emit an event
  3. For each event maintain a central table of active stacksets
  4. Every internal (2s)
  5. Collect all stackset related resources and build a table of stacksets to child resources (stackset container)
  6. In parallel reconcile all stackset containers (concurrency limited by number of "workers")

With this change it now works more like this:

  1. watch for stackset changes (via informer) (also watch for all possible child resource types via informer)
  2. For each change update a workqueue (using standard client-go workqueue pattern) - The queue just has StackSet Namespace/name as key, if there is a change to a child resource of a StackSet the stackSet namespace/name is resolved and the queue is updated, essentially triggering a new reconcilication no matter which child resource changed.
  3. Workers go through the queue and for each item
  4. Collect all stackset related resources via local informer caches and build a stackset container
  5. Reconcile the stackset container

TODO

  • Validate that tests/e2e works as usual
  • Validate speed of new implementation
  • Remove old implementation

@mikkeloscar mikkeloscar force-pushed the refactor-queue-logic branch 5 times, most recently from fa08f66 to 7cead1b Compare January 16, 2026 15:51
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants