Skip to content

feat: enable priority queue#1641

Merged
ricardo-mng merged 4 commits intomainfrom
feat/enable-priority-queue
Nov 21, 2025
Merged

feat: enable priority queue#1641
ricardo-mng merged 4 commits intomainfrom
feat/enable-priority-queue

Conversation

@ricardo-mng
Copy link
Collaborator

Enable Priority Queue for Controller Manager

Summary

Enable the controller-runtime priority queue feature to improve reconciliation responsiveness. This ensures newly created or updated Terraform resources are reconciled before re-queued existing resources during controller restarts.

Problem

Without priority queue, all resources use FIFO ordering. During controller restarts, new resources wait behind all re-queued existing resources.

Test evidence:

  • 15 existing resources + controller restart + 1 new resource
  • Result: New resource reconciled last (position 16/16)
  • Expected: New resource reconciled first (top 20%)

Solution

Enable priority queue in manager configuration:

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

This will be the default behavior in future controller-runtime releases - commit d2c0c8b

How it works:

  • High priority (0): New resources, spec changes, real updates
  • Low priority (-100): Controller restart re-queue, periodic resyncs

Testing

  • 15 existing resources + controller restart + 1 new resource
  • Result: New resource reconciled first (top 20%) as expected

References

@ricardo-mng ricardo-mng changed the title Feat/enable priority queue feat: enable priority queue Nov 21, 2025
Copy link
Collaborator

@alexandermarston alexandermarston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@ricardo-mng ricardo-mng merged commit 13b5f45 into main Nov 21, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants