Skip to content

feat: accept bootstrapServerSelection on clusterDefinitions #4840 - #4891

Merged
k-wall merged 3 commits into
kroxylicious:mainfrom
AzazelSensei:fix-4840-cluster-definition-bootstrap-selection
Sep 16, 2026
Merged

k-wall merged 3 commits into
kroxylicious:mainfrom
AzazelSensei:fix-4840-cluster-definition-bootstrap-selection

Conversation

@AzazelSensei

Copy link
Copy Markdown
Contributor

Type of change

  • Bugfix
  • Enhancement / new feature

Description

clusterDefinitions now accepts bootstrapServerSelection with the same round-robin (default) and random strategies as the deprecated targetCluster form.

Without this, moving a config that uses bootstrap-server selection onto clusterDefinitions fails to load (UnrecognizedPropertyException).

Closes #4840

Additional Context

Keith asked me to split this out of #4800.

Checklist

  • New tests written (where applicable).
  • If making a user-facing change, documentation is provided, or if the intent is to provide documentation in a follow up PR, an issue is raised tracking the need for the documentation update. Link the to issue in this checklist.
  • Existing unit/integration/system tests passing.
  • Any Sonarcloud warnings are addressed (or suppressed with @SuppressWarnings and a justifying comment).
  • PR references related GitHub issue(s) so they are closed on merging.
  • If AI tools assisted with code changes, ensure commit messages include Assisted-by: trailer (see DEV_GUIDE.md).
  • For user facing changes, add a logchange entry YAML file to changelog/unreleased/ (remember to include changes affecting the API of the test artefacts too). See DEV_GUIDE.md for the entry format.

@AzazelSensei
AzazelSensei requested a review from a team as a code owner September 11, 2026 13:23
…ous#4840

clusterDefinitions can now take bootstrapServerSelection with the same
round-robin/random strategies as the deprecated targetCluster form.

Signed-off-by: Abdullah <[email protected]>
@k-wall
k-wall force-pushed the fix-4840-cluster-definition-bootstrap-selection branch from 7f772a2 to 2eb7ed0 Compare September 15, 2026 13:00
@k-wall k-wall added kind/bug Something isn't working config/api Anything publicly exposed through proxy config labels Sep 15, 2026

@k-wall k-wall left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

I changed my mind. I made a couple of suggestions here: AzazelSensei#1. Could you review and if you are happy, incorporate into your PR.

A named cluster definition is reused by many virtual clusters, so
toTargetCluster() now mints a newInstance() instead of sharing the
round-robin counter. Also moved the YAML parse test into ConfigParserTest.

Co-authored-by: Keith Wall <[email protected]>
Signed-off-by: Abdullah <[email protected]>
@AzazelSensei

Copy link
Copy Markdown
Contributor Author

Incorporated both suggestions from AzazelSensei#1.

@k-wall k-wall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

* @return a strategy with independent selection state
*/
@JsonIgnore
BootstrapSelectionStrategy newInstance();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a ugly, but is okay for the moment. #4921 should clean this up.

@k-wall
k-wall enabled auto-merge (squash) September 16, 2026 09:02
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@k-wall
k-wall merged commit fc1c6c5 into kroxylicious:main Sep 16, 2026
52 of 53 checks passed
MarkNSweep pushed a commit to MarkNSweep/kroxylicious that referenced this pull request Sep 17, 2026
…ous#4840 (kroxylicious#4891)

* feat: accept bootstrapServerSelection on clusterDefinitions kroxylicious#4840

clusterDefinitions can now take bootstrapServerSelection with the same
round-robin/random strategies as the deprecated targetCluster form.

Signed-off-by: Abdullah <[email protected]>

* fix: give each target cluster its own bootstrap selection strategy

A named cluster definition is reused by many virtual clusters, so
toTargetCluster() now mints a newInstance() instead of sharing the
round-robin counter. Also moved the YAML parse test into ConfigParserTest.

Co-authored-by: Keith Wall <[email protected]>
Signed-off-by: Abdullah <[email protected]>

---------

Signed-off-by: Abdullah <[email protected]>
Signed-off-by: Keith Wall <[email protected]>
Co-authored-by: Keith Wall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config/api Anything publicly exposed through proxy config kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bootstrapServerSelection cannot be configured on a clusterDefinition

2 participants