Skip to content

docs: use clusterDefinitions instead of targetCluster #4277 - #4800

Merged
robobario merged 6 commits into
kroxylicious:mainfrom
AzazelSensei:docs-4277-cluster-definitions
Sep 17, 2026
Merged

robobario merged 6 commits into
kroxylicious:mainfrom
AzazelSensei:docs-4277-cluster-definitions

Conversation

@AzazelSensei

@AzazelSensei AzazelSensei commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Type of change

  • Documentation
  • Test

Description

Docs and examples now use clusterDefinitions + target.cluster instead of the deprecated inline targetCluster field. bootstrapServerSelection is shown on the cluster definition.

ConfigParserTest and ConfigurationTest use the new API. Deprecated targetCluster coverage is in ConfigParserDeprecatedVirtualClusterTargetClusterCompatibilityTest and ConfigurationDeprecatedVirtualClusterTargetClusterCompatibilityTest.

Kubernetes operator-generated configs are unchanged.

Closes #4277

Additional Context

#4277 asked to move remaining docs/examples/tests onto the 0.22.0 config style. Keith's review branch is included.

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.

* @param virtualClusterNames the name to use for the virtual cluster
* @return builder
*/
public static ConfigurationBuilder proxy(String clusterBootstrapServers, String... virtualClusterNames) {

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.

You've partially refactored KroxyliciousConfigUtils to use the new API. I can see why - the baseVirtualClusterBuilder API will need to change, and that will ripple out across lots of ITs. Can I suggest you reduce the scope of this PR to exclude KroxyliciousConfigUtils. We can have a separate PR that just refactors KroxyliciousConfigUtils, simplifying the review process.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Dropped the KroxyliciousConfigUtils changes from this PR.

k-wall
k-wall previously requested changes Sep 3, 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.

See comments above.

@k-wall

k-wall commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

I've opened a PR against yours.

AzazelSensei#2

It does the following

  1. Complete the documentation migration as now it is possible to express bootstrapServerSelection within the clusterDefinition
  2. Migrated ConfigParserTest unit test to use the new API. Added ConfigParserDeprecatedVirtualClusterTargetClusterCompatibilityTest to keep the old config API tested.
  3. Migrated ConfigurationTest unit test to use the new API. Added ConfigurationDeprecatedVirtualClusterTargetClusterCompatibilityTest to keep the old API tested.

The motivation for 2. and 3. - I was uncomfortable with the idea of updating the docs/examples to the new API without being sure the new API had sufficient coverage.

If you accept my changes into your PR, I think this PR will be mergeable.
Please update this PR's description so that it matches the scope of work delivered.

Separately I raised #4924 and #4925 to track the outstanding work.

@AzazelSensei

Copy link
Copy Markdown
Contributor Author

Merged your branch in and updated the description.

@k-wall
k-wall force-pushed the docs-4277-cluster-definitions branch from 2a3ac44 to 734d8d5 Compare September 16, 2026 15:04
@k-wall

k-wall commented Sep 16, 2026

Copy link
Copy Markdown
Member

Merged your branch in and updated the description.

There was a DCO problem on one of my commits that you merged. Sorry. I took the liberty of doing a:

git rebase HEAD~5 --signoff
git push --force-with-lease AzazelSensei docs-4277-cluster-definitions

@k-wall

k-wall commented Sep 16, 2026

Copy link
Copy Markdown
Member

@SamBarker I was responsible for several commits on this branch, so it'll need to be reviewed by someone other than me.

@k-wall k-wall moved this to In Progress in Release 0.25.0 Sep 16, 2026

@robobario robobario 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.

Looks good to go once these nits are fixed up. Thanks @AzazelSensei!

@AzazelSensei

Copy link
Copy Markdown
Contributor Author

Addressed the nits.

AzazelSensei and others added 6 commits September 17, 2026 17:04
Update docs, examples, and test YAML to the clusterDefinitions +
target.cluster form introduced in 0.22.0. bootstrapServerSelection
stays on the deprecated targetCluster form.

Signed-off-by: Abdullah <[email protected]>
Signed-off-by: Keith Wall <[email protected]>
…rmat

Update con-configuring-vc-target.adoc to demonstrate bootstrapServerSelection
on clusterDefinitions instead of deprecated targetCluster form.

Changes:
- Add bootstrapServerSelection to cluster definition property list
- Update example to show bootstrapServerSelection.strategy on clusterDefinitions
- Remove deprecated targetCluster example from bootstrap selection section
- Update property count from two to three properties

Assisted-by: Claude Sonnet 4 <[email protected]>
Signed-off-by: Keith Wall <[email protected]>
Signed-off-by: Keith Wall <[email protected]>
Signed-off-by: Keith Wall <[email protected]>
Migrates ConfigParserTest to use new clusterDefinitions + target.cluster
reference pattern while maintaining backward compatibility tests for
deprecated inline targetCluster format.

Changes:
- Migrated 61 ConfigParserTest cases to clusterDefinitions pattern
- Created ConfigParserDeprecatedVirtualClusterTargetClusterCompatibilityTest
  with 10 backward compatibility tests for deprecated targetCluster format
- All 71 tests passing

Assisted-by: Claude Sonnet 4.5 <[email protected]>
Signed-off-by: Keith Wall <[email protected]>
Refactored ConfigurationTest to use clusterDefinitions + target.cluster
references instead of deprecated inline targetCluster.

Introduced ConfigurationDeprecatedVirtualClusterTargetClusterCompatibilityTest
to maintain test coverage for the deprecated targetCluster API.

All tests passing (30 + 5).

Assisted-by: Claude Sonnet 4.5 <[email protected]>
Signed-off-by: Keith Wall <[email protected]>
Move gateway validation tests back to ConfigurationTest, drop the
unused targetBootstrap parameter, restore bootstrapServerSelection
on the example cluster definition, and rename the TLS compatibility test.

Signed-off-by: Abdullah <[email protected]>
@robobario
robobario force-pushed the docs-4277-cluster-definitions branch from af62fa1 to b155c8e Compare September 17, 2026 05:04
@robobario
robobario enabled auto-merge (rebase) September 17, 2026 05:04
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@k-wall
k-wall dismissed their stale review September 17, 2026 06:47

Removing my request changes

@robobario
robobario merged commit a746256 into kroxylicious:main Sep 17, 2026
53 checks passed
@k-wall k-wall moved this from In Progress to Done in Release 0.25.0 Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Update documentation, examples, test code to use clusterDefinitions rather than targetClusters

3 participants