Skip to content

Commit bd7eb66

Browse files
authored
Inclusive Language Initiative - Mirror Maker 1 (strimzi#5031)
Signed-off-by: Jakub Scholz <[email protected]>
1 parent f699618 commit bd7eb66

File tree

48 files changed

+256
-155
lines changed

Some content is hidden

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

48 files changed

+256
-155
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@
77
* Support for patching of service accounts and configuring their labels and annotations. The feature is disabled by default and enabled using the new `ServiceAccountPatching` feature gate.
88
* Added support for configuring cluster-operator's worker thread pool size that is used for various sync and async tasks
99
* Add Kafka Quotas plugin with produce, consume, and storage quotas
10-
* Remove topics and groups "blacklist" pattern from KafkaMirrorMaker2 CRD
1110
* Support pausing reconciliation of KafkaTopic CR with annotation `strimzi.io/pause-reconciliation`
1211

12+
### Changes, deprecations and removals
13+
14+
* The fields `topicsBlacklistPattern` and `groupsBlacklistPattern` in the `KafkaMirrorMaker2` resource are deprecated and will be removed in the future.
15+
They are replaced by new fields `topicsExcludePattern` and `groupsExcludePattern`.
16+
* The field `whitelist` in the `KafkaMirrorMaker` resource is deprecated and will be removed in the future.
17+
It is replaced with a new field `include`.
18+
1319
## 0.23.0
1420

1521
* Add support for Kafka 2.8.0 and 2.6.2, remove support for Kafka 2.5.x

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-affinity-tolerations.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
trustedCertificates:
2020
- secretName: my-target-cluster-cluster-ca-cert
2121
certificate: ca.crt
22-
whitelist: .*
22+
include: .*
2323
template:
2424
pod:
2525
affinity:

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-affinity-tolerations.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
trustedCertificates:
1919
- secretName: my-target-cluster-cluster-ca-cert
2020
certificate: ca.crt
21-
whitelist: ".*"
21+
include: ".*"
2222
affinity:
2323
nodeAffinity:
2424
requiredDuringSchedulingIgnoredDuringExecution:

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-logging.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
trustedCertificates:
2020
- secretName: my-target-cluster-cluster-ca-cert
2121
certificate: ca.crt
22-
whitelist: .*
22+
include: .*
2323
logging:
2424
type: external
2525
valueFrom:

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-logging.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
trustedCertificates:
1919
- secretName: my-target-cluster-cluster-ca-cert
2020
certificate: ca.crt
21-
whitelist: ".*"
21+
include: ".*"
2222
logging:
2323
type: external
2424
name: my-config-map

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-metrics.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
trustedCertificates:
2020
- secretName: my-target-cluster-cluster-ca-cert
2121
certificate: ca.crt
22-
whitelist: .*
22+
include: .*
2323
metricsConfig:
2424
type: jmxPrometheusExporter
2525
valueFrom:

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-metrics.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
trustedCertificates:
1919
- secretName: my-target-cluster-cluster-ca-cert
2020
certificate: ca.crt
21-
whitelist: ".*"
21+
include: ".*"
2222
metrics:
2323
some: config
2424
someOther: config

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-v1alpha1.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ spec:
1919
trustedCertificates:
2020
- secretName: my-target-cluster-cluster-ca-cert
2121
certificate: ca.crt
22-
whitelist: .*
22+
include: .*

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-v1alpha1.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ spec:
1818
trustedCertificates:
1919
- secretName: my-target-cluster-cluster-ca-cert
2020
certificate: ca.crt
21-
whitelist: ".*"
21+
include: ".*"

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-v1beta1.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ spec:
1919
trustedCertificates:
2020
- secretName: my-target-cluster-cluster-ca-cert
2121
certificate: ca.crt
22-
whitelist: .*
22+
include: .*

api-conversion/src/test/resources/io/strimzi/kafka/api/conversion/cli/mm-v1beta1.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ spec:
1818
trustedCertificates:
1919
- secretName: my-target-cluster-cluster-ca-cert
2020
certificate: ca.crt
21-
whitelist: ".*"
21+
include: ".*"

api/src/main/java/io/strimzi/api/kafka/model/KafkaMirrorMakerSpec.java

+19-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import io.strimzi.crdgenerator.annotations.DescriptionFile;
1818
import io.strimzi.crdgenerator.annotations.KubeLink;
1919
import io.strimzi.crdgenerator.annotations.Minimum;
20+
import io.strimzi.crdgenerator.annotations.OneOf;
2021
import io.strimzi.crdgenerator.annotations.PresentInVersions;
2122
import io.sundr.builder.annotations.Buildable;
2223
import lombok.EqualsAndHashCode;
@@ -32,9 +33,10 @@
3233
@JsonInclude(JsonInclude.Include.NON_NULL)
3334
@JsonPropertyOrder({
3435
"version", "replicas", "image", "consumer",
35-
"producer", "resources", "whitelist",
36+
"producer", "resources", "whitelist", "include",
3637
"affinity", "tolerations", "jvmOptions",
3738
"logging", "metrics", "metricsConfig", "tracing", "template"})
39+
@OneOf({@OneOf.Alternative(@OneOf.Alternative.Property("whitelist")), @OneOf.Alternative(@OneOf.Alternative.Property("include"))})
3840
@EqualsAndHashCode
3941
public class KafkaMirrorMakerSpec extends Spec implements HasConfigurableMetrics {
4042
private static final long serialVersionUID = 1L;
@@ -46,6 +48,7 @@ public class KafkaMirrorMakerSpec extends Spec implements HasConfigurableMetrics
4648
private String version;
4749
private String image;
4850
private String whitelist;
51+
private String include;
4952
private KafkaMirrorMakerConsumerSpec consumer;
5053
private KafkaMirrorMakerProducerSpec producer;
5154
private ResourceRequirements resources;
@@ -92,9 +95,11 @@ public void setImage(String image) {
9295
}
9396

9497
@Description("List of topics which are included for mirroring. This option allows any regular expression using Java-style regular expressions. " +
95-
"Mirroring two topics named A and B is achieved by using the whitelist `'A|B'`. Or, as a special case, you can mirror all topics using the whitelist '*'. " +
98+
"Mirroring two topics named A and B is achieved by using the expression `'A|B'`. Or, as a special case, you can mirror all topics using the regular expression '*'. " +
9699
"You can also specify multiple regular expressions separated by commas.")
97-
@JsonProperty(required = true)
100+
@DeprecatedProperty(movedToPath = "spec.include")
101+
@PresentInVersions("v1alpha1-v1beta2")
102+
@Deprecated
98103
public String getWhitelist() {
99104
return whitelist;
100105
}
@@ -103,6 +108,17 @@ public void setWhitelist(String whitelist) {
103108
this.whitelist = whitelist;
104109
}
105110

111+
@Description("List of topics which are included for mirroring. This option allows any regular expression using Java-style regular expressions. " +
112+
"Mirroring two topics named A and B is achieved by using the expression `'A|B'`. Or, as a special case, you can mirror all topics using the regular expression '*'. " +
113+
"You can also specify multiple regular expressions separated by commas.")
114+
public String getInclude() {
115+
return include;
116+
}
117+
118+
public void setInclude(String include) {
119+
this.include = include;
120+
}
121+
106122
@Description("Configuration of source cluster.")
107123
@JsonProperty(required = true)
108124
public KafkaMirrorMakerConsumerSpec getConsumer() {

api/src/test/java/io/strimzi/api/kafka/model/KafkaMirrorMakerCrdIT.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ void testKafkaMirrorMakerWithMissingRequired() {
5555

5656
assertMissingRequiredPropertiesMessage(exception.getMessage(),
5757
"bootstrapServers",
58-
"producer",
59-
"whitelist");
58+
"producer");
6059
}
6160

6261
@Test
@@ -77,8 +76,7 @@ void testKafkaMirrorMakerWithTlsAuthWithMissingRequired() {
7776

7877
assertMissingRequiredPropertiesMessage(exception.getMessage(),
7978
"spec.producer.authentication.certificateAndKey.certificate",
80-
"spec.producer.authentication.certificateAndKey.key",
81-
"spec.whitelist");
79+
"spec.producer.authentication.certificateAndKey.key");
8280
}
8381

8482
@Test

api/src/test/resources/io/strimzi/api/kafka/model/045-Crd-kafkamirrormaker.yaml

+60-12
Original file line numberDiff line numberDiff line change
@@ -475,10 +475,18 @@ spec:
475475
type: string
476476
description: List of topics which are included for mirroring. This
477477
option allows any regular expression using Java-style regular expressions.
478-
Mirroring two topics named A and B is achieved by using the whitelist
478+
Mirroring two topics named A and B is achieved by using the expression
479479
`'A\|B'`. Or, as a special case, you can mirror all topics using
480-
the whitelist '*'. You can also specify multiple regular expressions
481-
separated by commas.
480+
the regular expression '*'. You can also specify multiple regular
481+
expressions separated by commas.
482+
include:
483+
type: string
484+
description: List of topics which are included for mirroring. This
485+
option allows any regular expression using Java-style regular expressions.
486+
Mirroring two topics named A and B is achieved by using the expression
487+
`'A\|B'`. Or, as a special case, you can mirror all topics using
488+
the regular expression '*'. You can also specify multiple regular
489+
expressions separated by commas.
482490
jvmOptions:
483491
type: object
484492
properties:
@@ -1176,11 +1184,19 @@ spec:
11761184
description: The timeout for each attempted health check. Default
11771185
to 5 seconds. Minimum value is 1.
11781186
description: Pod readiness checking.
1187+
oneOf:
1188+
- properties:
1189+
whitelist: {}
1190+
required:
1191+
- whitelist
1192+
- properties:
1193+
include: {}
1194+
required:
1195+
- include
11791196
required:
11801197
- replicas
11811198
- consumer
11821199
- producer
1183-
- whitelist
11841200
description: The specification of Kafka MirrorMaker.
11851201
status:
11861202
type: object
@@ -1654,10 +1670,18 @@ spec:
16541670
type: string
16551671
description: List of topics which are included for mirroring. This
16561672
option allows any regular expression using Java-style regular expressions.
1657-
Mirroring two topics named A and B is achieved by using the whitelist
1673+
Mirroring two topics named A and B is achieved by using the expression
1674+
`'A\|B'`. Or, as a special case, you can mirror all topics using
1675+
the regular expression '*'. You can also specify multiple regular
1676+
expressions separated by commas.
1677+
include:
1678+
type: string
1679+
description: List of topics which are included for mirroring. This
1680+
option allows any regular expression using Java-style regular expressions.
1681+
Mirroring two topics named A and B is achieved by using the expression
16581682
`'A\|B'`. Or, as a special case, you can mirror all topics using
1659-
the whitelist '*'. You can also specify multiple regular expressions
1660-
separated by commas.
1683+
the regular expression '*'. You can also specify multiple regular
1684+
expressions separated by commas.
16611685
affinity:
16621686
type: object
16631687
properties:
@@ -2588,11 +2612,19 @@ spec:
25882612
description: The timeout for each attempted health check. Default
25892613
to 5 seconds. Minimum value is 1.
25902614
description: Pod readiness checking.
2615+
oneOf:
2616+
- properties:
2617+
whitelist: {}
2618+
required:
2619+
- whitelist
2620+
- properties:
2621+
include: {}
2622+
required:
2623+
- include
25912624
required:
25922625
- replicas
25932626
- consumer
25942627
- producer
2595-
- whitelist
25962628
description: The specification of Kafka MirrorMaker.
25972629
status:
25982630
type: object
@@ -3066,10 +3098,18 @@ spec:
30663098
type: string
30673099
description: List of topics which are included for mirroring. This
30683100
option allows any regular expression using Java-style regular expressions.
3069-
Mirroring two topics named A and B is achieved by using the whitelist
3101+
Mirroring two topics named A and B is achieved by using the expression
3102+
`'A\|B'`. Or, as a special case, you can mirror all topics using
3103+
the regular expression '*'. You can also specify multiple regular
3104+
expressions separated by commas.
3105+
include:
3106+
type: string
3107+
description: List of topics which are included for mirroring. This
3108+
option allows any regular expression using Java-style regular expressions.
3109+
Mirroring two topics named A and B is achieved by using the expression
30703110
`'A\|B'`. Or, as a special case, you can mirror all topics using
3071-
the whitelist '*'. You can also specify multiple regular expressions
3072-
separated by commas.
3111+
the regular expression '*'. You can also specify multiple regular
3112+
expressions separated by commas.
30733113
affinity:
30743114
type: object
30753115
properties:
@@ -4000,11 +4040,19 @@ spec:
40004040
description: The timeout for each attempted health check. Default
40014041
to 5 seconds. Minimum value is 1.
40024042
description: Pod readiness checking.
4043+
oneOf:
4044+
- properties:
4045+
whitelist: {}
4046+
required:
4047+
- whitelist
4048+
- properties:
4049+
include: {}
4050+
required:
4051+
- include
40034052
required:
40044053
- replicas
40054054
- consumer
40064055
- producer
4007-
- whitelist
40084056
description: The specification of Kafka MirrorMaker.
40094057
status:
40104058
type: object

api/src/test/resources/io/strimzi/api/kafka/model/KafkaMirrorMaker-minimal.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: test-kafka-mirror-maker
55
spec:
66
replicas: 1
7-
whitelist: "*"
7+
include: "*"
88
consumer:
99
bootstrapServers: my-source-kafka:9092
1010
groupId: my-source-group-id

api/src/test/resources/io/strimzi/api/kafka/model/KafkaMirrorMaker-with-commit-and-abort.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
spec:
66
image: foo
77
replicas: 1
8-
whitelist: "*"
8+
include: "*"
99
consumer:
1010
numStreams: 2
1111
groupId: my-source-group-id

api/src/test/resources/io/strimzi/api/kafka/model/KafkaMirrorMaker-with-extra-property.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ spec:
99
groupId: my-source-group-id
1010
producer:
1111
bootstrapServers: my-target-kafka:9092
12-
whitelist: "*"
12+
include: "*"
1313
extra: true
1414
extra: true

api/src/test/resources/io/strimzi/api/kafka/model/KafkaMirrorMaker-with-scram-sha-512-auth.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: test-kafka-mirror-maker
55
spec:
66
replicas: 1
7-
whitelist: "*"
7+
include: "*"
88
consumer:
99
bootstrapServers: my-source-kafka:9092
1010
groupId: my-source-group-id

api/src/test/resources/io/strimzi/api/kafka/model/KafkaMirrorMaker-with-template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
spec:
66
image: foo
77
replicas: 1
8-
whitelist: "*"
8+
include: "*"
99
consumer:
1010
numStreams: 2
1111
groupId: my-source-group-id

api/src/test/resources/io/strimzi/api/kafka/model/KafkaMirrorMaker-with-tls-auth.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: test-kafka-mirror-maker
55
spec:
66
replicas: 1
7-
whitelist: "*"
7+
include: "*"
88
consumer:
99
bootstrapServers: my-source-kafka:9093
1010
groupId: my-source-group-id

api/src/test/resources/io/strimzi/api/kafka/model/KafkaMirrorMaker-with-tls.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: test-kafka-mirror-maker
55
spec:
66
replicas: 1
7-
whitelist: "*"
7+
include: "*"
88
consumer:
99
bootstrapServers: my-source-kafka:9093
1010
groupId: my-source-group-id

api/src/test/resources/io/strimzi/api/kafka/model/KafkaMirrorMaker.out.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ spec:
1616
bootstrapServers: "my-target-kafka:9092"
1717
config:
1818
foo: "buz"
19-
whitelist: "*"
19+
include: "*"

api/src/test/resources/io/strimzi/api/kafka/model/KafkaMirrorMaker.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
spec:
66
image: foo
77
replicas: 1
8-
whitelist: "*"
8+
include: "*"
99
consumer:
1010
numStreams: 2
1111
groupId: my-source-group-id

0 commit comments

Comments
 (0)