Skip to content

bootstrapServerSelection cannot be configured on a clusterDefinition #4840

Closed

Description

@k-wall

Describe the bug

clusterDefinitions (introduced in 0.22.0 as the replacement for the now-deprecated inline targetCluster) does not support bootstrapServerSelection. The deprecated targetCluster form does. Because the configuration parser rejects unknown properties (FAIL_ON_UNKNOWN_PROPERTIES is enabled), specifying bootstrapServerSelection under a clusterDefinitions entry causes the whole configuration to fail to load with an UnrecognizedPropertyException.

The practical impact: the 0.22.0 deprecation guidance tells users to move from targetCluster to clusterDefinitions, but any user who relies on bootstrap-server selection cannot complete that migration — their config stops loading.

To Reproduce

Configure a clusterDefinition with a bootstrap-server selection strategy:

# NOT allowed today - rejected at parse time
clusterDefinitions:
  - name: my-cluster
    bootstrapServers: broker-0:9092,broker-1:9092,broker-2:9092
    bootstrapServerSelection:
      strategy: random
virtualClusters:
  - name: my-cluster-proxy
    target:
      cluster: my-cluster
    gateways:
      - name: default
        portIdentifiesNode:
          bootstrapAddress: localhost:9192

Start the proxy with this config → it fails to load (Unrecognized field "bootstrapServerSelection").

The equivalent, still using the deprecated form, is accepted:

# Allowed (deprecated targetCluster form)
virtualClusters:
  - name: my-cluster-proxy
    targetCluster:
      bootstrapServers: broker-0:9092,broker-1:9092,broker-2:9092
      bootstrapServerSelection:
        strategy: random
    gateways:
      - name: default
        portIdentifiesNode:
          bootstrapAddress: localhost:9192

Expected behavior

clusterDefinitions should accept bootstrapServerSelection with the same semantics as the deprecated targetCluster (strategies round-robin (default) and random), so users can fully migrate off targetCluster without losing functionality.

YAML files and logs

See the two snippets above (the first fails to parse; the second is accepted).

Additional context

Activity

  1. added
    kind/bug
    config/api
    on Sep 3, 2026
  2. k-wall commented on Sep 3, 2026

    @k-wall
    MemberAuthor

    Discovered by AzazelSensei in their PR #4277.

  3. added theissue type on Sep 3, 2026
  4. added this to the 0.25.0 milestone on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    config/apikind/bug

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions