Skip to content

Commit 88271f2

Browse files
authored
Change virtual cluster map into a list (kroxylicious#1874)
* Fix kroxylicious#1847: Change virtual cluster map into a list why: consistency of approach - elsewhere in the model we already use arrays of objects. virtual cluster map is the odd one out. Signed-off-by: Keith Wall <kwall@apache.org> * relocate misplaced IT test Signed-off-by: Keith Wall <kwall@apache.org> --------- Signed-off-by: Keith Wall <kwall@apache.org>
1 parent 0325980 commit 88271f2

File tree

44 files changed

+537
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+537
-354
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Format `<github issue/pr number>: <short description>`.
77

88
## SNAPSHOT
99

10+
* [#1847](https://github.com/kroxylicious/kroxylicious/pull/1847) Remodel virtual cluster map as a list (with explicit names).
1011
* [#1840](https://github.com/kroxylicious/kroxylicious/pull/1840) Refactor virtual cluster configuration model
1112
* [#1823](https://github.com/kroxylicious/kroxylicious/pull/1823) Allow VirtualClusters to express more than one listener
1213
* [#1868](https://github.com/kroxylicious/kroxylicious/pull/1868) Support use of `$()` in KEK selector templates, deprecating `${}`
@@ -23,6 +24,9 @@ Format `<github issue/pr number>: <short description>`.
2324
are deprecated. Define a virtual cluster gateway with `portIdentifiesNode` to express your networking requirements.
2425
* The networking scheme `SniRoutingClusterNetworkAddressConfigProvider` is deprecated. Define a virtual cluster gateway with
2526
`sniHostIdentifiesNode` to express your networking requirements.
27+
* The `virtualClusters` configuration property now expects a list of `virtualCluster` objects (rather than a mapping
28+
of `name` to `virtualCluster`). Furthermore, the `virtualCluster` object now requires a `name` configuration property.
29+
For backward compatibility, support for the map (and values without `name`) continues, but this will be removed in a future release.
2630

2731
## 0.10.0
2832

docs/modules/configuring/con-configuration-outline.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ filterDefinitions: # <1>
1717
defaultFilters: <5>
1818
- example
1919
virtualClusters: # <6>
20-
my-cluster-proxy:
20+
- name: my-cluster-proxy
2121
targetCluster: # <7>
2222
# ...
2323
gateways: # <8>

docs/modules/configuring/con-configuring-filters.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ defaultFilters:
2525
- validation
2626
- encryption
2727
virtualClusters:
28-
my-proxy-with-default-filters:
28+
- name: my-proxy-with-default-filters
2929
# ...
30-
my-proxy-with-custom-filters:
30+
- name: my-proxy-with-custom-filters
3131
filters:
3232
- validation
3333
- special-encryption
@@ -56,7 +56,7 @@ filters: # deprecated!
5656
config:
5757
# ...
5858
virtualClusters:
59-
my-proxy-with-default-filters:
59+
- name: my-proxy-with-default-filters
6060
# ...
6161
----
6262

docs/modules/configuring/con-configuring-vc-client-tls.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ NOTE: TLS is recommended for production configurations.
2424
----
2525
# ...
2626
virtualClusters:
27-
my-cluster-proxy:
27+
- name: my-cluster-proxy
2828
# ...
2929
gateways:
3030
- name: mygateway
@@ -49,7 +49,7 @@ virtualClusters:
4949
----
5050
# ...
5151
virtualClusters:
52-
my-cluster-proxy:
52+
- name: my-cluster-proxy
5353
# ...
5454
gateways:
5555
- name: mygateway
@@ -75,7 +75,7 @@ If verification fails, the client's connection is refused.
7575
----
7676
# ...
7777
virtualClusters:
78-
my-cluster-proxy:
78+
- name: my-cluster-proxy
7979
# ...
8080
gateways:
8181
- name: mygateway
@@ -119,7 +119,7 @@ The names of the TLS protocols are defined by {java-17-specs}/security/standard-
119119
[source,yaml]
120120
----
121121
virtualClusters:
122-
my-cluster-proxy:
122+
- name: my-cluster-proxy
123123
# ...
124124
gateways:
125125
- name: mygateway
@@ -138,7 +138,7 @@ virtualClusters:
138138
[source,yaml]
139139
----
140140
virtualClusters:
141-
my-cluster-proxy:
141+
- name: my-cluster-proxy
142142
# ...
143143
gateways:
144144
- name: mygateway
@@ -167,6 +167,7 @@ The names of the cipher suite are defined by {java-17-specs}/security/standard-n
167167
[source,yaml]
168168
----
169169
virtualClusters:
170+
- name: my-cluster-proxy
170171
# ...
171172
gateways:
172173
- name: mygateway
@@ -185,6 +186,7 @@ virtualClusters:
185186
[source,yaml]
186187
----
187188
virtualClusters:
189+
- name: my-cluster-proxy
188190
# ...
189191
gateways:
190192
- name: mygateway

docs/modules/configuring/con-configuring-vc-gateways.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ IMPORTANT: When using this scheme, you have the responsibility to avoid port num
3838
----
3939
# ...
4040
virtualClusters:
41-
my-cluster-proxy:
41+
- name: my-cluster-proxy
4242
# ...
4343
gateways:
4444
- name: mygateway
@@ -74,7 +74,7 @@ The gateway exposes the following three broker addresses:
7474
----
7575
# ...
7676
virtualClusters:
77-
my-cluster-proxy:
77+
- name: my-cluster-proxy
7878
# ...
7979
gateways:
8080
- name: mygateway
@@ -114,7 +114,7 @@ The gateway exposes the following three broker addresses:
114114
----
115115
# ...
116116
virtualClusters:
117-
my-cluster-proxy:
117+
- name: my-cluster-proxy
118118
# ...
119119
gateways:
120120
- name: mygateway
@@ -187,7 +187,7 @@ to an IP address that is routed to the proxy. Wildcard DNS is one way to achieve
187187
----
188188
# ...
189189
virtualClusters:
190-
my-cluster-proxy:
190+
- name: my-cluster-proxy
191191
# ...
192192
gateways:
193193
- name: mygateway
@@ -231,7 +231,7 @@ The gateway exposes the following broker addresses:
231231
----
232232
# ...
233233
virtualClusters:
234-
my-cluster-proxy:
234+
- name: my-cluster-proxy
235235
# ...
236236
gateways:
237237
- name: mygateway

docs/modules/configuring/con-configuring-vc-other-settings.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The `logFrames` property controls logging of the decoded requests and responses.
1414
----
1515
# ...
1616
virtualClusters:
17-
my-cluster-proxy:
17+
- name: my-cluster-proxy
1818
# ...
1919
logNetwork: true <1>
2020
logFrames: true <2>

docs/modules/configuring/con-configuring-vc-target-tls.adoc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ certificate signed by a public CA and the platform's defaults are suitable.
2424
----
2525
# ...
2626
virtualClusters:
27-
my-cluster-proxy:
27+
- name: my-cluster-proxy
2828
# ...
2929
targetCluster:
3030
bootstrapServers: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9093
@@ -40,7 +40,7 @@ The example illustrates using PKCS #12 format. PEM format is supported too.
4040
----
4141
# ...
4242
virtualClusters:
43-
my-cluster-proxy:
43+
- name: my-cluster-proxy
4444
# ...
4545
targetCluster:
4646
bootstrapServers: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9093
@@ -65,7 +65,7 @@ PKCS #12 keystore format is supported too.
6565
----
6666
# ...
6767
virtualClusters:
68-
my-cluster-proxy:
68+
- name: my-cluster-proxy
6969
# ...
7070
targetCluster:
7171
bootstrapServers: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9093
@@ -85,7 +85,7 @@ The TLS protocols and cipher suites available to the TLS connection may also be
8585
----
8686
# ...
8787
virtualClusters:
88-
my-cluster-proxy:
88+
- name: my-cluster-proxy
8989
# ...
9090
targetCluster:
9191
bootstrapServers: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9093
@@ -103,7 +103,7 @@ virtualClusters:
103103
[source,yaml]
104104
----
105105
virtualClusters:
106-
my-cluster-proxy:
106+
- name: my-cluster-proxy
107107
targetCluster:
108108
bootstrapServers: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9093
109109
tls:
@@ -119,7 +119,7 @@ virtualClusters:
119119
[source,yaml]
120120
----
121121
virtualClusters:
122-
my-cluster-proxy:
122+
- name: my-cluster-proxy
123123
targetCluster:
124124
bootstrapServers: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9093
125125
tls:
@@ -136,8 +136,7 @@ virtualClusters:
136136
[source,yaml]
137137
----
138138
virtualClusters:
139-
demo:
140-
my-cluster-proxy:
139+
- name: my-cluster-proxy
141140
targetCluster:
142141
bootstrapServers: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9093
143142
tls:
@@ -156,7 +155,7 @@ any Kafka cluster.
156155
[source,yaml]
157156
----
158157
virtualClusters:
159-
my-cluster-proxy:
158+
- name: my-cluster-proxy
160159
targetCluster:
161160
bootstrapServers: dev-cluster-kafka-bootstrap.kafka.svc.cluster.local:9093
162161
tls:

docs/modules/configuring/ref-configuring-proxy-example.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ filterDefinitions: # <1>
3434
defaultFilters:
3535
- encryption
3636
virtualClusters: # <5>
37-
my-cluster-proxy: # <6>
37+
- name: my-cluster-proxy # <6>
3838
targetCluster:
3939
bootstrapServers: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9093 # <7>
4040
tls: # <8>

kroxylicious-app/example-proxy-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ adminHttp:
99
endpoints:
1010
prometheus: {}
1111
virtualClusters:
12-
demo:
12+
- name: demo
1313
targetCluster:
1414
bootstrapServers: localhost:9092
1515
gateways:

kroxylicious-app/src/test/resources/proxy-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ adminHttp:
99
endpoints:
1010
prometheus: {}
1111
virtualClusters:
12-
demo:
12+
- name: demo
1313
targetCluster:
1414
bootstrapServers: localhost:9092
1515
gateways:

0 commit comments

Comments
 (0)