Skip to content

feat: add configurable max-concurrent-reconciles flag#387

Merged
freeznet merged 3 commits intomainfrom
feat/configurable-max-concurrent-reconciles
Mar 29, 2026
Merged

feat: add configurable max-concurrent-reconciles flag#387
freeznet merged 3 commits intomainfrom
feat/configurable-max-concurrent-reconciles

Conversation

@mattisonchao
Copy link
Copy Markdown
Member

Summary

  • Add --max-concurrent-reconciles CLI flag (default 1) to control concurrent reconciles per controller
  • Exposed via Helm values as features.maxConcurrentReconciles
  • Applied to PulsarConnectionReconciler and RoleBindingReconciler
  • Removes the TODO comment in main.go for making this configurable

Motivation

Customers with many RoleBindings (85+ in this case) experience slow reconciliation due to sequential processing. With concurrency=5, 85 RoleBindings reconcile in ~90s vs ~180s with concurrency=1.

Test plan

  • Tested with customer's 3-phase Helm install (85 RoleBindings) on kind cluster
  • Verified concurrency=1 (default): 85/85 ready in ~180s
  • Verified concurrency=5: 85/85 ready in ~90s
  • Verified Helm chart renders the flag correctly

When deleting a RoleBinding, if the resource doesn't exist on the cloud
API server, treat it as success instead of retrying indefinitely. This
prevents the controller from getting stuck in an error loop during
helm uninstall when the remote resource was already cleaned up.
Add --max-concurrent-reconciles CLI flag (default 1) to control the
number of concurrent reconciles per controller. This is exposed via
Helm values as features.maxConcurrentReconciles.

Applied to PulsarConnection and RoleBinding controllers. Customers
with many RoleBindings (e.g. 85+) can increase this to speed up
reconciliation significantly.
@mattisonchao mattisonchao requested review from a team as code owners March 27, 2026 15:21
@github-actions
Copy link
Copy Markdown
Contributor

@mattisonchao:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions Bot added the doc-info-missing This pr needs to mark a document option in description label Mar 27, 2026
freeznet
freeznet previously approved these changes Mar 28, 2026
Only pass --max-concurrent-reconciles when the value is greater than 1,
so the chart remains compatible with older operator images that don't
support this flag.
@freeznet freeznet merged commit 67d98d2 into main Mar 29, 2026
10 checks passed
@freeznet freeznet deleted the feat/configurable-max-concurrent-reconciles branch March 29, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-info-missing This pr needs to mark a document option in description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants