Skip to content

Commit

Permalink
Stop including MirrorMaker2 Extensions and EnvVarConfigProvider (#10923)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <[email protected]>
  • Loading branch information
scholzj authored Dec 8, 2024
1 parent 18b7507 commit de30da5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 91 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.46.0

### Major changes, deprecations and removals

* [Strimzi EnvVar Configuration Provider](https://github.com/strimzi/kafka-env-var-config-provider) (deprecated in Strimzi 0.38.0) and [Strimzi MirrorMaker 2 Extensions](https://github.com/strimzi/mirror-maker-2-extensions) (deprecated in Strimzi 0.28.0) plugins were removed from Strimzi container images.
Please use the Apache Kafka [EnvVarConfigProvider](https://github.com/strimzi/kafka-env-var-config-provider?tab=readme-ov-file#deprecation-notice) and [Identity Replication Policy](https://github.com/strimzi/mirror-maker-2-extensions?tab=readme-ov-file#identity-replication-policy) instead.

## 0.45.0

Expand Down
14 changes: 0 additions & 14 deletions docker-images/artifacts/kafka-thirdparty-libs/3.8.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
<cruise-control.version>2.5.141</cruise-control.version>
<opa-authorizer.version>1.5.1</opa-authorizer.version>
<kafka-quotas-plugin.version>0.3.1</kafka-quotas-plugin.version>
<kafka-mirror-maker-2-extensions.version>1.2.0</kafka-mirror-maker-2-extensions.version>
<kafka-kubernetes-config-provider.version>1.2.0</kafka-kubernetes-config-provider.version>
<kafka-env-var-config-provider.version>1.1.0</kafka-env-var-config-provider.version>
<json-smart.version>2.4.9</json-smart.version>
<jsonevent-layout.version>1.7</jsonevent-layout.version>
<opentelemetry.version>1.34.1</opentelemetry.version>
Expand Down Expand Up @@ -347,12 +345,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- Mirror Maker 2 Extensions -->
<dependency>
<groupId>io.strimzi</groupId>
<artifactId>mirror-maker-2-extensions</artifactId>
<version>${kafka-mirror-maker-2-extensions.version}</version>
</dependency>
<!-- Kafka Quotas Plugin -->
<dependency>
<groupId>io.strimzi</groupId>
Expand Down Expand Up @@ -403,11 +395,5 @@
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.16.2</version>
</dependency>
<!-- EnvVar Configuration Provider for Apache Kafka -->
<dependency>
<groupId>io.strimzi</groupId>
<artifactId>kafka-env-var-config-provider</artifactId>
<version>${kafka-env-var-config-provider.version}</version>
</dependency>
</dependencies>
</project>
14 changes: 0 additions & 14 deletions docker-images/artifacts/kafka-thirdparty-libs/3.9.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
<cruise-control.version>2.5.141</cruise-control.version>
<opa-authorizer.version>1.5.1</opa-authorizer.version>
<kafka-quotas-plugin.version>0.3.1</kafka-quotas-plugin.version>
<kafka-mirror-maker-2-extensions.version>1.2.0</kafka-mirror-maker-2-extensions.version>
<kafka-kubernetes-config-provider.version>1.2.0</kafka-kubernetes-config-provider.version>
<kafka-env-var-config-provider.version>1.1.0</kafka-env-var-config-provider.version>
<json-smart.version>2.4.9</json-smart.version>
<jsonevent-layout.version>1.7</jsonevent-layout.version>
<opentelemetry.version>1.34.1</opentelemetry.version>
Expand Down Expand Up @@ -347,12 +345,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- Mirror Maker 2 Extensions -->
<dependency>
<groupId>io.strimzi</groupId>
<artifactId>mirror-maker-2-extensions</artifactId>
<version>${kafka-mirror-maker-2-extensions.version}</version>
</dependency>
<!-- Kafka Quotas Plugin -->
<dependency>
<groupId>io.strimzi</groupId>
Expand Down Expand Up @@ -403,11 +395,5 @@
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.16.2</version>
</dependency>
<!-- EnvVar Configuration Provider for Apache Kafka -->
<dependency>
<groupId>io.strimzi</groupId>
<artifactId>kafka-env-var-config-provider</artifactId>
<version>${kafka-env-var-config-provider.version}</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -654,69 +654,6 @@ void testIdentityReplicationPolicy() {
}
}

/*
* This test is using the Strimzi Identity Replication policy. This is needed for backwards compatibility for users
* who might still have it configured.
*
* This ST should be deleted once we drop the Strimzi policy completely.
*/
@ParallelNamespaceTest
void testStrimziIdentityReplicationPolicy() {
final TestStorage testStorage = new TestStorage(ResourceManager.getTestContext());

resourceManager.createResourceWithWait(
NodePoolsConverter.convertNodePoolsIfNeeded(
KafkaNodePoolTemplates.brokerPoolPersistentStorage(testStorage.getNamespaceName(), testStorage.getSourceBrokerPoolName(), testStorage.getSourceClusterName(), 1).build(),
KafkaNodePoolTemplates.controllerPoolPersistentStorage(testStorage.getNamespaceName(), testStorage.getSourceControllerPoolName(), testStorage.getSourceClusterName(), 1).build(),
KafkaNodePoolTemplates.brokerPoolPersistentStorage(testStorage.getNamespaceName(), testStorage.getTargetBrokerPoolName(), testStorage.getTargetClusterName(), 1).build(),
KafkaNodePoolTemplates.controllerPoolPersistentStorage(testStorage.getNamespaceName(), testStorage.getTargetControllerPoolName(), testStorage.getTargetClusterName(), 1).build()
)
);

resourceManager.createResourceWithWait(
KafkaTemplates.kafkaPersistent(testStorage.getNamespaceName(), testStorage.getSourceClusterName(), 1, 1).build(),
KafkaTemplates.kafkaPersistent(testStorage.getNamespaceName(), testStorage.getTargetClusterName(), 1, 1).build(),
ScraperTemplates.scraperPod(testStorage.getNamespaceName(), testStorage.getScraperName()).build()
);

final String scraperPodName = kubeClient().listPodsByPrefixInName(testStorage.getNamespaceName(), testStorage.getScraperName()).get(0).getMetadata().getName();

// Create topic
resourceManager.createResourceWithWait(KafkaTopicTemplates.topic(testStorage.getNamespaceName(), testStorage.getTopicName(), testStorage.getSourceClusterName(), 3).build());

resourceManager.createResourceWithWait(KafkaMirrorMaker2Templates.kafkaMirrorMaker2(testStorage, 1, false)
.editSpec()
.editMirror(0)
.editSourceConnector()
.addToConfig("replication.policy.class", "io.strimzi.kafka.connect.mirror.IdentityReplicationPolicy")
.addToConfig("refresh.topics.interval.seconds", "1")
.endSourceConnector()
.endMirror()
.endSpec()
.build());

LOGGER.info("Sending and receiving messages using Topic: {}", testStorage.getSourceClusterName());
final KafkaClients sourceClients = ClientUtils.getInstantPlainClients(testStorage, KafkaResources.plainBootstrapAddress(testStorage.getSourceClusterName()));
resourceManager.createResourceWithWait(sourceClients.producerStrimzi(), sourceClients.consumerStrimzi());
ClientUtils.waitForInstantClientSuccess(testStorage);

LOGGER.info("Consuming mirrored messages using Topic: {}", testStorage.getTargetClusterName());
final KafkaClients targetClients = ClientUtils.getInstantPlainClients(testStorage, KafkaResources.plainBootstrapAddress(testStorage.getTargetClusterName()));
resourceManager.createResourceWithWait(targetClients.consumerStrimzi());
ClientUtils.waitForInstantConsumerClientSuccess(testStorage);

if (!Environment.isKRaftModeEnabled()) {
LOGGER.info("Checking if the mirrored Topic name is same as the original one");

List<String> kafkaTopics = KafkaCmdClient.listTopicsUsingPodCli(testStorage.getNamespaceName(), scraperPodName, KafkaResources.plainBootstrapAddress(testStorage.getTargetClusterName()));
assertNotNull(kafkaTopics.stream().filter(kafkaTopic -> kafkaTopic.equals(testStorage.getTopicName())).findAny());

String kafkaTopicSpec = KafkaCmdClient.describeTopicUsingPodCli(testStorage.getNamespaceName(), scraperPodName, KafkaResources.plainBootstrapAddress(testStorage.getTargetClusterName()), testStorage.getTopicName());
assertThat(kafkaTopicSpec, containsString("Topic: " + testStorage.getTopicName()));
assertThat(kafkaTopicSpec, containsString("PartitionCount: 3"));
}
}

@ParallelNamespaceTest
void testRestoreOffsetsInConsumerGroup() {
final TestStorage testStorage = new TestStorage(ResourceManager.getTestContext());
Expand Down

0 comments on commit de30da5

Please sign in to comment.