Skip to content

Make the NATS Broker control plane scalable - #798

Open
kahirokunn wants to merge 1 commit into
knative-extensions:mainfrom
kahirokunn:fix/broker-control-plane-ha
Open

Make the NATS Broker control plane scalable#798
kahirokunn wants to merge 1 commit into
knative-extensions:mainfrom
kahirokunn:fix/broker-control-plane-ha

Conversation

@kahirokunn

@kahirokunn kahirokunn commented Aug 14, 2026

Copy link
Copy Markdown
Member

Why

The shared Broker ingress handles traffic for every NATS JetStream Broker in the cluster, but its Deployment was fixed at one replica. The Broker controller already supports leader election, but the manifest also fixed its replica count and did not express a scheduling preference for additional replicas.

The manifests should keep the one-replica Kubernetes default while allowing the ingress and controller to scale independently.

Proposed Changes

  • Add CPU-based autoscaling for the shared Broker ingress.
  • Allow the Broker controller to scale independently, with replicas preferably scheduled across nodes.

Release Note

The NATS Broker shared ingress now autoscales based on CPU utilization, with support for operator-managed scaling and replica spreading across nodes.

@knative-prow

knative-prow Bot commented Aug 14, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kahirokunn
Once this PR has been reviewed and has the lgtm label, please assign matzew for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 14, 2026
@knative-prow
knative-prow Bot requested review from Cali0707 and Leo6Leo August 14, 2026 02:54
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.50%. Comparing base (2c86680) to head (898382c).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #798   +/-   ##
=======================================
  Coverage   43.50%   43.50%           
=======================================
  Files          68       68           
  Lines        4259     4259           
=======================================
  Hits         1853     1853           
  Misses       2282     2282           
  Partials      124      124           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kahirokunn

Copy link
Copy Markdown
Member Author

/ok-to-test

@knative-prow knative-prow Bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Aug 14, 2026
@kahirokunn

Copy link
Copy Markdown
Member Author

@astelmashenko Hi ✋
If “replicas” is omitted, the default value is 1.
Since omitting it allows integration with HPA and KEDA, what do you think?
Thank you 🙏

@astelmashenko

astelmashenko commented Aug 24, 2026

Copy link
Copy Markdown
Member

@kahirokunn , thank you for the PR. I'm sorry, but I'm busy on this week, will try to find time on the next week to review all the PRs.

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 29, 2026
@knative-prow-robot

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants