Skip to content

Commit

Permalink
Updated Kraft Test Cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Vaseekaran committed Dec 2, 2024
1 parent 251679a commit 0943500
Showing 1 changed file with 64 additions and 28 deletions.
92 changes: 64 additions & 28 deletions pkg/resources/kafka/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ process.roles=broker,controller
},
},
expectedBrokerConfigs: []string{
`advertised.listeners=CONTROLLER://kafka-0.kafka.svc.cluster.local:9093,INTERNAL://kafka-0.kafka.svc.cluster.local:9092
`advertised.listeners=INTERNAL://kafka-0.kafka.svc.cluster.local:9092
controller.listener.names=CONTROLLER
[email protected]:9093
cruise.control.metrics.reporter.bootstrap.servers=kafka-all-broker.kafka.svc.cluster.local:9092
Expand All @@ -1128,14 +1128,13 @@ listener.name.internal.ssl.truststore.location=/var/run/secrets/java.io/keystore
listener.name.internal.ssl.truststore.password=
listener.name.internal.ssl.truststore.type=JKS
listener.security.protocol.map=INTERNAL:SSL,CONTROLLER:SSL
listeners=INTERNAL://:9092,CONTROLLER://:9093
listeners=INTERNAL://:9092
log.dirs=/test-kafka-logs/kafka,/test-kafka-logs-0/kafka
metric.reporters=com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
node.id=0
process.roles=broker
`,
`advertised.listeners=CONTROLLER://kafka-0.kafka.svc.cluster.local:9093,INTERNAL://kafka-0.kafka.svc.cluster.local:9092
controller.listener.names=CONTROLLER
`controller.listener.names=CONTROLLER
[email protected]:9093
cruise.control.metrics.reporter.bootstrap.servers=kafka-all-broker.kafka.svc.cluster.local:9092
cruise.control.metrics.reporter.kubernetes.mode=true
Expand All @@ -1160,13 +1159,13 @@ listener.name.internal.ssl.truststore.location=/var/run/secrets/java.io/keystore
listener.name.internal.ssl.truststore.password=
listener.name.internal.ssl.truststore.type=JKS
listener.security.protocol.map=INTERNAL:SSL,CONTROLLER:SSL
listeners=INTERNAL://:9092,CONTROLLER://:9093
listeners=CONTROLLER://:9093
log.dirs=/test-kafka-logs/kafka
metric.reporters=com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
node.id=500
process.roles=controller
`,
`advertised.listeners=CONTROLLER://kafka-200.kafka.svc.cluster.local:9093,INTERNAL://kafka-200.kafka.svc.cluster.local:9092
`advertised.listeners=INTERNAL://kafka-200.kafka.svc.cluster.local:9092
controller.listener.names=CONTROLLER
[email protected]:9093
cruise.control.metrics.reporter.bootstrap.servers=kafka-all-broker.kafka.svc.cluster.local:9092
Expand All @@ -1192,7 +1191,7 @@ listener.name.internal.ssl.truststore.location=/var/run/secrets/java.io/keystore
listener.name.internal.ssl.truststore.password=
listener.name.internal.ssl.truststore.type=JKS
listener.security.protocol.map=INTERNAL:SSL,CONTROLLER:SSL
listeners=INTERNAL://:9092,CONTROLLER://:9093
listeners=INTERNAL://:9092
log.dirs=/test-kafka-logs/kafka
metric.reporters=com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
node.id=200
Expand Down Expand Up @@ -1299,44 +1298,81 @@ process.roles=broker
},
},
expectedBrokerConfigs: []string{
`advertised.listeners=CONTROLLER://kafka-0.kafka.svc.cluster.local:9092,INTERNAL://kafka-0.kafka.svc.cluster.local:9092
controller.listener.names=CONTROLLER
`advertised.listeners=INTERNAL://kafka-0.kafka.svc.cluster.local:9092
[email protected]:9093
cruise.control.metrics.reporter.bootstrap.servers=kafka-all-broker.kafka.svc.cluster.local:9092
cruise.control.metrics.reporter.kubernetes.mode=true
inter.broker.listener.name=INTERNAL
listener.security.protocol.map=INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT
listeners=INTERNAL://:9092,CONTROLLER://:9093
inter.broker.listener.name=
listener.name.controller.ssl.client.auth=none
listener.name.controller.ssl.keystore.location=/var/run/secrets/java.io/keystores/server/controller/keystore.jks
listener.name.controller.ssl.keystore.password=
listener.name.controller.ssl.keystore.type=JKS
listener.name.controller.ssl.truststore.location=/var/run/secrets/java.io/keystores/server/controller/truststore.jks
listener.name.controller.ssl.truststore.password=
listener.name.controller.ssl.truststore.type=JKS
listener.name.external.ssl.client.auth=none
listener.name.external.ssl.keystore.location=/var/run/secrets/java.io/keystores/server/external/keystore.jks
listener.name.external.ssl.keystore.password=
listener.name.external.ssl.keystore.type=JKS
listener.name.external.ssl.truststore.location=/var/run/secrets/java.io/keystores/server/external/truststore.jks
listener.name.external.ssl.truststore.password=
listener.name.external.ssl.truststore.type=JKS
listener.security.protocol.map=EXTERNAL:SSL,CONTROLLER:SSL
listeners=
log.dirs=/test-kafka-logs/kafka,/test-kafka-logs-0/kafka
metric.reporters=com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
node.id=0
process.roles=broker
`,
`advertised.listeners=CONTROLLER://kafka-0.kafka.svc.cluster.local:9092,INTERNAL://kafka-0.kafka.svc.cluster.local:9092
controller.listener.names=CONTROLLER
[email protected]:9093
`[email protected]:9093
cruise.control.metrics.reporter.bootstrap.servers=kafka-all-broker.kafka.svc.cluster.local:9092
cruise.control.metrics.reporter.kubernetes.mode=true
inter.broker.listener.name=INTERNAL
listener.security.protocol.map=INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT
listeners=INTERNAL://:9092,CONTROLLER://:9093
log.dirs=/test-kafka-logs/kafka,/test-kafka-logs-0/kafka
inter.broker.listener.name=
listener.name.controller.ssl.client.auth=none
listener.name.controller.ssl.keystore.location=/var/run/secrets/java.io/keystores/server/controller/keystore.jks
listener.name.controller.ssl.keystore.password=
listener.name.controller.ssl.keystore.type=JKS
listener.name.controller.ssl.truststore.location=/var/run/secrets/java.io/keystores/server/controller/truststore.jks
listener.name.controller.ssl.truststore.password=
listener.name.controller.ssl.truststore.type=JKS
listener.name.external.ssl.client.auth=none
listener.name.external.ssl.keystore.location=/var/run/secrets/java.io/keystores/server/external/keystore.jks
listener.name.external.ssl.keystore.password=
listener.name.external.ssl.keystore.type=JKS
listener.name.external.ssl.truststore.location=/var/run/secrets/java.io/keystores/server/external/truststore.jks
listener.name.external.ssl.truststore.password=
listener.name.external.ssl.truststore.type=JKS
listener.security.protocol.map=EXTERNAL:SSL,CONTROLLER:SSL
listeners=EXTERNAL://:9092
log.dirs=/test-kafka-logs/kafka
metric.reporters=com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
node.id=0
process.roles=broker
node.id=500
process.roles=controller
`,
`advertised.listeners=INTERNAL://kafka-200.kafka.svc.cluster.local:9092
advertised.listeners=CONTROLLER://kafka-200.kafka.svc.cluster.local:9092,INTERNAL://kafka-0.kafka.svc.cluster.local:9092
controller.listener.names=CONTROLLER
[email protected]:9093
cruise.control.metrics.reporter.bootstrap.servers=kafka-all-broker.kafka.svc.cluster.local:9092
cruise.control.metrics.reporter.kubernetes.mode=true
inter.broker.listener.name=INTERNAL
listener.security.protocol.map=INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT
listeners=INTERNAL://:9092,CONTROLLER://:9093
log.dirs=/test-kafka-logs/kafka,/test-kafka-logs-0/kafka
inter.broker.listener.name=
listener.name.controller.ssl.client.auth=none
listener.name.controller.ssl.keystore.location=/var/run/secrets/java.io/keystores/server/controller/keystore.jks
listener.name.controller.ssl.keystore.password=
listener.name.controller.ssl.keystore.type=JKS
listener.name.controller.ssl.truststore.location=/var/run/secrets/java.io/keystores/server/controller/truststore.jks
listener.name.controller.ssl.truststore.password=
listener.name.controller.ssl.truststore.type=JKS
listener.name.external.ssl.client.auth=none
listener.name.external.ssl.keystore.location=/var/run/secrets/java.io/keystores/server/external/keystore.jks
listener.name.external.ssl.keystore.password=
listener.name.external.ssl.keystore.type=JKS
listener.name.external.ssl.truststore.location=/var/run/secrets/java.io/keystores/server/external/truststore.jks
listener.name.external.ssl.truststore.password=
listener.name.external.ssl.truststore.type=JKS
listener.security.protocol.map=EXTERNAL:SSL,CONTROLLER:SSL
listeners=
log.dirs=/test-kafka-logs/kafka
metric.reporters=com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
node.id=0
node.id=200
process.roles=broker
`},
},
Expand Down

0 comments on commit 0943500

Please sign in to comment.