Search in sources :

Example 1 with KafkaMirrorMaker2MirrorSpec

use of io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec in project strimzi by strimzi.

the class KafkaMirrorMaker2AssemblyOperatorTest method testTopicsGroupsExclude.

@Test
public void testTopicsGroupsExclude(VertxTestContext context) {
    String kmm2Name = "foo";
    String sourceNamespace = "source-ns";
    String targetNamespace = "target-ns";
    String sourceClusterAlias = "my-cluster-src";
    String targetClusterAlias = "my-cluster-tgt";
    String excludedTopicList = "excludedTopic0,excludedTopic1";
    String excludedGroupList = "excludedGroup0,excludedGroup1";
    ResourceOperatorSupplier supplier = ResourceUtils.supplierWithMocks(true);
    KafkaMirrorMaker2 kmm2 = ResourceUtils.createEmptyKafkaMirrorMaker2(targetNamespace, kmm2Name);
    ArgumentCaptor<KafkaMirrorMaker2> mirrorMaker2Captor = createMirrorMaker2CaptorMock(targetNamespace, kmm2Name, kmm2, supplier);
    KafkaConnectApi mockConnectClient = createConnectClientMock();
    KafkaMirrorMaker2ClusterSpec sourceCluster = new KafkaMirrorMaker2ClusterSpecBuilder(true).withAlias(sourceClusterAlias).withBootstrapServers(sourceClusterAlias + "." + sourceNamespace + ".svc:9092").build();
    KafkaMirrorMaker2ClusterSpec targetCluster = new KafkaMirrorMaker2ClusterSpecBuilder(true).withAlias(targetClusterAlias).withBootstrapServers(targetClusterAlias + "." + targetNamespace + ".svc:9092").build();
    kmm2.getSpec().setClusters(List.of(sourceCluster, targetCluster));
    KafkaMirrorMaker2MirrorSpec deprecatedMirrorConnector = new KafkaMirrorMaker2MirrorSpecBuilder().withSourceCluster(sourceClusterAlias).withTargetCluster(targetClusterAlias).withTopicsExcludePattern(excludedTopicList).withGroupsExcludePattern(excludedGroupList).build();
    kmm2.getSpec().setMirrors(List.of(deprecatedMirrorConnector));
    KafkaMirrorMaker2AssemblyOperator mm2AssemblyOperator = new KafkaMirrorMaker2AssemblyOperator(vertx, new PlatformFeaturesAvailability(true, kubernetesVersion), supplier, ResourceUtils.dummyClusterOperatorConfig(VERSIONS), x -> mockConnectClient);
    Checkpoint async = context.checkpoint();
    KafkaMirrorMaker2Cluster.fromCrd(Reconciliation.DUMMY_RECONCILIATION, kmm2, VERSIONS);
    mm2AssemblyOperator.reconcile(new Reconciliation("test-exclude", KafkaMirrorMaker2.RESOURCE_KIND, targetNamespace, kmm2Name)).onComplete(context.succeeding(v -> context.verify(() -> {
        KafkaMirrorMaker2MirrorSpec capturedMirrorConnector = mirrorMaker2Captor.getAllValues().get(0).getSpec().getMirrors().get(0);
        assertThat(capturedMirrorConnector.getTopicsExcludePattern(), is(excludedTopicList));
        assertThat(capturedMirrorConnector.getGroupsExcludePattern(), is(excludedGroupList));
        async.flag();
    })));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) OrderedProperties(io.strimzi.operator.common.model.OrderedProperties) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Annotations(io.strimzi.operator.common.Annotations) PodDisruptionBudget(io.fabric8.kubernetes.api.model.policy.v1.PodDisruptionBudget) AfterAll(org.junit.jupiter.api.AfterAll) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) PodDisruptionBudgetV1Beta1Operator(io.strimzi.operator.common.operator.resource.PodDisruptionBudgetV1Beta1Operator) BeforeAll(org.junit.jupiter.api.BeforeAll) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) Mockito.doAnswer(org.mockito.Mockito.doAnswer) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) ResourceUtils(io.strimzi.operator.cluster.ResourceUtils) AbstractModel(io.strimzi.operator.cluster.model.AbstractModel) KafkaJmxOptionsBuilder(io.strimzi.api.kafka.model.KafkaJmxOptionsBuilder) Collections.emptyList(java.util.Collections.emptyList) DeploymentOperator(io.strimzi.operator.common.operator.resource.DeploymentOperator) KafkaVersion(io.strimzi.operator.cluster.model.KafkaVersion) SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) Set(java.util.Set) VertxExtension(io.vertx.junit5.VertxExtension) CopyOnWriteArraySet(java.util.concurrent.CopyOnWriteArraySet) Future(io.vertx.core.Future) KafkaMirrorMaker2Resources(io.strimzi.api.kafka.model.KafkaMirrorMaker2Resources) Test(org.junit.jupiter.api.Test) KafkaMirrorMaker2(io.strimzi.api.kafka.model.KafkaMirrorMaker2) KafkaMirrorMaker2Status(io.strimzi.api.kafka.model.status.KafkaMirrorMaker2Status) List(java.util.List) Labels(io.strimzi.operator.common.model.Labels) Optional(java.util.Optional) Checkpoint(io.vertx.junit5.Checkpoint) PodDisruptionBudgetOperator(io.strimzi.operator.common.operator.resource.PodDisruptionBudgetOperator) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) Mockito.mock(org.mockito.Mockito.mock) VertxTestContext(io.vertx.junit5.VertxTestContext) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) NetworkPolicyOperator(io.strimzi.operator.common.operator.resource.NetworkPolicyOperator) HashMap(java.util.HashMap) HashSet(java.util.HashSet) ServiceOperator(io.strimzi.operator.common.operator.resource.ServiceOperator) ArgumentCaptor(org.mockito.ArgumentCaptor) KafkaVersionTestUtils(io.strimzi.operator.cluster.KafkaVersionTestUtils) ConfigMapOperator(io.strimzi.operator.common.operator.resource.ConfigMapOperator) CrdOperator(io.strimzi.operator.common.operator.resource.CrdOperator) TestUtils(io.strimzi.test.TestUtils) KafkaMirrorMaker2MirrorSpecBuilder(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpecBuilder) Matchers.hasSize(org.hamcrest.Matchers.hasSize) ReconcileResult(io.strimzi.operator.common.operator.resource.ReconcileResult) Service(io.fabric8.kubernetes.api.model.Service) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) ArgumentMatchers.anyInt(org.mockito.ArgumentMatchers.anyInt) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) KafkaMirrorMaker2ClusterSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec) KafkaJmxAuthenticationPasswordBuilder(io.strimzi.api.kafka.model.KafkaJmxAuthenticationPasswordBuilder) KubernetesVersion(io.strimzi.operator.KubernetesVersion) Vertx(io.vertx.core.Vertx) KafkaMirrorMaker2MirrorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec) KafkaMirrorMaker2Cluster(io.strimzi.operator.cluster.model.KafkaMirrorMaker2Cluster) Mockito.when(org.mockito.Mockito.when) ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) Mockito.verify(org.mockito.Mockito.verify) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) Reconciliation(io.strimzi.operator.common.Reconciliation) Mockito.never(org.mockito.Mockito.never) Util(io.strimzi.operator.common.Util) KafkaMirrorMaker2ClusterSpecBuilder(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpecBuilder) NetworkPolicy(io.fabric8.kubernetes.api.model.networking.v1.NetworkPolicy) Deployment(io.fabric8.kubernetes.api.model.apps.Deployment) Collections(java.util.Collections) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) KafkaMirrorMaker2MirrorSpecBuilder(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpecBuilder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) Checkpoint(io.vertx.junit5.Checkpoint) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) KafkaMirrorMaker2ClusterSpecBuilder(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpecBuilder) Reconciliation(io.strimzi.operator.common.Reconciliation) KafkaMirrorMaker2ClusterSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec) KafkaMirrorMaker2(io.strimzi.api.kafka.model.KafkaMirrorMaker2) KafkaMirrorMaker2MirrorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec) Test(org.junit.jupiter.api.Test)

Example 2 with KafkaMirrorMaker2MirrorSpec

use of io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec in project strimzi by strimzi.

the class KafkaMirrorMaker2AssemblyOperator method reconcileConnectors.

/**
 * Reconcile all the MirrorMaker 2.0 connectors selected by the given MirrorMaker 2.0 instance.
 * @param reconciliation The reconciliation
 * @param kafkaMirrorMaker2 The MirrorMaker 2.0
 * @return A future, failed if any of the connectors could not be reconciled.
 */
protected Future<Void> reconcileConnectors(Reconciliation reconciliation, KafkaMirrorMaker2 kafkaMirrorMaker2, KafkaMirrorMaker2Cluster mirrorMaker2Cluster, KafkaMirrorMaker2Status mirrorMaker2Status, String desiredLogging) {
    String mirrorMaker2Name = kafkaMirrorMaker2.getMetadata().getName();
    if (kafkaMirrorMaker2.getSpec() == null) {
        return maybeUpdateMirrorMaker2Status(reconciliation, kafkaMirrorMaker2, new InvalidResourceException("spec property is required"));
    }
    List<KafkaMirrorMaker2MirrorSpec> mirrors = ModelUtils.asListOrEmptyList(kafkaMirrorMaker2.getSpec().getMirrors());
    String host = KafkaMirrorMaker2Resources.qualifiedServiceName(mirrorMaker2Name, reconciliation.namespace());
    KafkaConnectApi apiClient = getKafkaConnectApi();
    return apiClient.list(host, KafkaConnectCluster.REST_API_PORT).compose(deleteMirrorMaker2ConnectorNames -> {
        for (Map.Entry<String, Function<KafkaMirrorMaker2MirrorSpec, KafkaMirrorMaker2ConnectorSpec>> connectorEntry : MIRRORMAKER2_CONNECTORS.entrySet()) {
            deleteMirrorMaker2ConnectorNames.removeAll(mirrors.stream().filter(// filter out non-existent connectors
            mirror -> connectorEntry.getValue().apply(mirror) != null).map(mirror -> mirror.getSourceCluster() + "->" + mirror.getTargetCluster() + connectorEntry.getKey()).collect(Collectors.toSet()));
        }
        LOGGER.debugCr(reconciliation, "delete MirrorMaker 2.0 connectors: {}", deleteMirrorMaker2ConnectorNames);
        Stream<Future<Void>> deletionFutures = deleteMirrorMaker2ConnectorNames.stream().map(connectorName -> apiClient.delete(reconciliation, host, KafkaConnectCluster.REST_API_PORT, connectorName));
        Stream<Future<Void>> createUpdateFutures = mirrors.stream().map(mirror -> reconcileMirrorMaker2Connectors(reconciliation, host, apiClient, kafkaMirrorMaker2, mirror, mirrorMaker2Cluster, mirrorMaker2Status, desiredLogging));
        return CompositeFuture.join(Stream.concat(deletionFutures, createUpdateFutures).collect(Collectors.toList())).map((Void) null);
    });
}
Also used : InvalidResourceException(io.strimzi.operator.cluster.model.InvalidResourceException) KafkaMirrorMaker2Builder(io.strimzi.api.kafka.model.KafkaMirrorMaker2Builder) Annotations(io.strimzi.operator.common.Annotations) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_TASK(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_TASK) Resource(io.fabric8.kubernetes.client.dsl.Resource) Matcher(java.util.regex.Matcher) Map(java.util.Map) KafkaConnectorSpec(io.strimzi.api.kafka.model.KafkaConnectorSpec) ReconciliationException(io.strimzi.operator.common.ReconciliationException) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) AbstractModel(io.strimzi.operator.cluster.model.AbstractModel) ModelUtils(io.strimzi.operator.cluster.model.ModelUtils) StatusUtils(io.strimzi.operator.common.operator.resource.StatusUtils) ANNO_STRIMZI_IO_RESTART_CONNECTOR(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR) CertSecretSource(io.strimzi.api.kafka.model.CertSecretSource) KafkaMirrorMaker2ConnectorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ConnectorSpec) KafkaMirrorMaker2Spec(io.strimzi.api.kafka.model.KafkaMirrorMaker2Spec) DeploymentOperator(io.strimzi.operator.common.operator.resource.DeploymentOperator) KafkaVersion(io.strimzi.operator.cluster.model.KafkaVersion) Collectors(java.util.stream.Collectors) Future(io.vertx.core.Future) Serializable(java.io.Serializable) KafkaMirrorMaker2Resources(io.strimzi.api.kafka.model.KafkaMirrorMaker2Resources) KafkaClientAuthenticationScramSha256(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationScramSha256) KafkaMirrorMaker2List(io.strimzi.api.kafka.KafkaMirrorMaker2List) KafkaMirrorMaker2(io.strimzi.api.kafka.model.KafkaMirrorMaker2) KafkaMirrorMaker2Status(io.strimzi.api.kafka.model.status.KafkaMirrorMaker2Status) List(java.util.List) KafkaConnectCluster(io.strimzi.operator.cluster.model.KafkaConnectCluster) Stream(java.util.stream.Stream) Condition(io.strimzi.api.kafka.model.status.Condition) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN) ClusterOperatorConfig(io.strimzi.operator.cluster.ClusterOperatorConfig) CustomResource(io.fabric8.kubernetes.client.CustomResource) AuthenticationUtils(io.strimzi.operator.cluster.model.AuthenticationUtils) HashMap(java.util.HashMap) KafkaClientAuthenticationPlain(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationPlain) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK) CompositeFuture(io.vertx.core.CompositeFuture) KafkaClientAuthenticationOAuth(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationOAuth) KafkaClientAuthenticationTls(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationTls) SaslConfigs(org.apache.kafka.common.config.SaslConfigs) SslConfigs(org.apache.kafka.common.config.SslConfigs) ReconciliationLogger(io.strimzi.operator.common.ReconciliationLogger) Collections.emptyMap(java.util.Collections.emptyMap) KafkaMirrorMaker2ClusterSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec) InvalidResourceException(io.strimzi.operator.cluster.model.InvalidResourceException) AdminClientConfig(org.apache.kafka.clients.admin.AdminClientConfig) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) KafkaMirrorMaker2MirrorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec) KafkaMirrorMaker2Cluster(io.strimzi.operator.cluster.model.KafkaMirrorMaker2Cluster) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_CONNECTOR(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_CONNECTOR) KafkaClientAuthenticationScramSha512(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationScramSha512) Reconciliation(io.strimzi.operator.common.Reconciliation) Util(io.strimzi.operator.common.Util) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Comparator(java.util.Comparator) Collections(java.util.Collections) Deployment(io.fabric8.kubernetes.api.model.apps.Deployment) KafkaConnectorSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectorSpecBuilder) Function(java.util.function.Function) Future(io.vertx.core.Future) CompositeFuture(io.vertx.core.CompositeFuture) KafkaMirrorMaker2MirrorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec) Map(java.util.Map) HashMap(java.util.HashMap) Collections.emptyMap(java.util.Collections.emptyMap)

Example 3 with KafkaMirrorMaker2MirrorSpec

use of io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec in project strimzi-kafka-operator by strimzi.

the class KafkaMirrorMaker2AssemblyOperator method reconcileConnectors.

/**
 * Reconcile all the MirrorMaker 2.0 connectors selected by the given MirrorMaker 2.0 instance.
 * @param reconciliation The reconciliation
 * @param kafkaMirrorMaker2 The MirrorMaker 2.0
 * @return A future, failed if any of the connectors could not be reconciled.
 */
protected Future<Void> reconcileConnectors(Reconciliation reconciliation, KafkaMirrorMaker2 kafkaMirrorMaker2, KafkaMirrorMaker2Cluster mirrorMaker2Cluster, KafkaMirrorMaker2Status mirrorMaker2Status, String desiredLogging) {
    String mirrorMaker2Name = kafkaMirrorMaker2.getMetadata().getName();
    if (kafkaMirrorMaker2.getSpec() == null) {
        return maybeUpdateMirrorMaker2Status(reconciliation, kafkaMirrorMaker2, new InvalidResourceException("spec property is required"));
    }
    List<KafkaMirrorMaker2MirrorSpec> mirrors = ModelUtils.asListOrEmptyList(kafkaMirrorMaker2.getSpec().getMirrors());
    String host = KafkaMirrorMaker2Resources.qualifiedServiceName(mirrorMaker2Name, reconciliation.namespace());
    KafkaConnectApi apiClient = getKafkaConnectApi();
    return apiClient.list(host, KafkaConnectCluster.REST_API_PORT).compose(deleteMirrorMaker2ConnectorNames -> {
        for (Map.Entry<String, Function<KafkaMirrorMaker2MirrorSpec, KafkaMirrorMaker2ConnectorSpec>> connectorEntry : MIRRORMAKER2_CONNECTORS.entrySet()) {
            deleteMirrorMaker2ConnectorNames.removeAll(mirrors.stream().filter(// filter out non-existent connectors
            mirror -> connectorEntry.getValue().apply(mirror) != null).map(mirror -> mirror.getSourceCluster() + "->" + mirror.getTargetCluster() + connectorEntry.getKey()).collect(Collectors.toSet()));
        }
        LOGGER.debugCr(reconciliation, "delete MirrorMaker 2.0 connectors: {}", deleteMirrorMaker2ConnectorNames);
        Stream<Future<Void>> deletionFutures = deleteMirrorMaker2ConnectorNames.stream().map(connectorName -> apiClient.delete(reconciliation, host, KafkaConnectCluster.REST_API_PORT, connectorName));
        Stream<Future<Void>> createUpdateFutures = mirrors.stream().map(mirror -> reconcileMirrorMaker2Connectors(reconciliation, host, apiClient, kafkaMirrorMaker2, mirror, mirrorMaker2Cluster, mirrorMaker2Status, desiredLogging));
        return CompositeFuture.join(Stream.concat(deletionFutures, createUpdateFutures).collect(Collectors.toList())).map((Void) null);
    });
}
Also used : InvalidResourceException(io.strimzi.operator.cluster.model.InvalidResourceException) KafkaMirrorMaker2Builder(io.strimzi.api.kafka.model.KafkaMirrorMaker2Builder) Annotations(io.strimzi.operator.common.Annotations) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_TASK(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_TASK) Resource(io.fabric8.kubernetes.client.dsl.Resource) Matcher(java.util.regex.Matcher) Map(java.util.Map) KafkaConnectorSpec(io.strimzi.api.kafka.model.KafkaConnectorSpec) ReconciliationException(io.strimzi.operator.common.ReconciliationException) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) AbstractModel(io.strimzi.operator.cluster.model.AbstractModel) ModelUtils(io.strimzi.operator.cluster.model.ModelUtils) StatusUtils(io.strimzi.operator.common.operator.resource.StatusUtils) ANNO_STRIMZI_IO_RESTART_CONNECTOR(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR) CertSecretSource(io.strimzi.api.kafka.model.CertSecretSource) KafkaMirrorMaker2ConnectorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ConnectorSpec) KafkaMirrorMaker2Spec(io.strimzi.api.kafka.model.KafkaMirrorMaker2Spec) DeploymentOperator(io.strimzi.operator.common.operator.resource.DeploymentOperator) KafkaVersion(io.strimzi.operator.cluster.model.KafkaVersion) Collectors(java.util.stream.Collectors) Future(io.vertx.core.Future) Serializable(java.io.Serializable) KafkaMirrorMaker2Resources(io.strimzi.api.kafka.model.KafkaMirrorMaker2Resources) KafkaClientAuthenticationScramSha256(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationScramSha256) KafkaMirrorMaker2List(io.strimzi.api.kafka.KafkaMirrorMaker2List) KafkaMirrorMaker2(io.strimzi.api.kafka.model.KafkaMirrorMaker2) KafkaMirrorMaker2Status(io.strimzi.api.kafka.model.status.KafkaMirrorMaker2Status) List(java.util.List) KafkaConnectCluster(io.strimzi.operator.cluster.model.KafkaConnectCluster) Stream(java.util.stream.Stream) Condition(io.strimzi.api.kafka.model.status.Condition) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN) ClusterOperatorConfig(io.strimzi.operator.cluster.ClusterOperatorConfig) CustomResource(io.fabric8.kubernetes.client.CustomResource) AuthenticationUtils(io.strimzi.operator.cluster.model.AuthenticationUtils) HashMap(java.util.HashMap) KafkaClientAuthenticationPlain(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationPlain) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK) CompositeFuture(io.vertx.core.CompositeFuture) KafkaClientAuthenticationOAuth(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationOAuth) KafkaClientAuthenticationTls(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationTls) SaslConfigs(org.apache.kafka.common.config.SaslConfigs) SslConfigs(org.apache.kafka.common.config.SslConfigs) ReconciliationLogger(io.strimzi.operator.common.ReconciliationLogger) Collections.emptyMap(java.util.Collections.emptyMap) KafkaMirrorMaker2ClusterSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec) InvalidResourceException(io.strimzi.operator.cluster.model.InvalidResourceException) AdminClientConfig(org.apache.kafka.clients.admin.AdminClientConfig) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) KafkaMirrorMaker2MirrorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec) KafkaMirrorMaker2Cluster(io.strimzi.operator.cluster.model.KafkaMirrorMaker2Cluster) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_CONNECTOR(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_CONNECTOR) KafkaClientAuthenticationScramSha512(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationScramSha512) Reconciliation(io.strimzi.operator.common.Reconciliation) Util(io.strimzi.operator.common.Util) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Comparator(java.util.Comparator) Collections(java.util.Collections) Deployment(io.fabric8.kubernetes.api.model.apps.Deployment) KafkaConnectorSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectorSpecBuilder) Function(java.util.function.Function) Future(io.vertx.core.Future) CompositeFuture(io.vertx.core.CompositeFuture) KafkaMirrorMaker2MirrorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec) Map(java.util.Map) HashMap(java.util.HashMap) Collections.emptyMap(java.util.Collections.emptyMap)

Example 4 with KafkaMirrorMaker2MirrorSpec

use of io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec in project strimzi-kafka-operator by strimzi.

the class KafkaMirrorMaker2AssemblyOperator method reconcileMirrorMaker2Connectors.

private Future<Void> reconcileMirrorMaker2Connectors(Reconciliation reconciliation, String host, KafkaConnectApi apiClient, KafkaMirrorMaker2 mirrorMaker2, KafkaMirrorMaker2MirrorSpec mirror, KafkaMirrorMaker2Cluster mirrorMaker2Cluster, KafkaMirrorMaker2Status mirrorMaker2Status, String desiredLogging) {
    String targetClusterAlias = mirror.getTargetCluster();
    String sourceClusterAlias = mirror.getSourceCluster();
    if (targetClusterAlias == null) {
        return maybeUpdateMirrorMaker2Status(reconciliation, mirrorMaker2, new InvalidResourceException("targetCluster property is required"));
    } else if (sourceClusterAlias == null) {
        return maybeUpdateMirrorMaker2Status(reconciliation, mirrorMaker2, new InvalidResourceException("sourceCluster property is required"));
    }
    List<KafkaMirrorMaker2ClusterSpec> clusters = ModelUtils.asListOrEmptyList(mirrorMaker2.getSpec().getClusters());
    Map<String, KafkaMirrorMaker2ClusterSpec> clusterMap = clusters.stream().filter(cluster -> targetClusterAlias.equals(cluster.getAlias()) || sourceClusterAlias.equals(cluster.getAlias())).collect(Collectors.toMap(KafkaMirrorMaker2ClusterSpec::getAlias, Function.identity()));
    if (!clusterMap.containsKey(targetClusterAlias)) {
        return maybeUpdateMirrorMaker2Status(reconciliation, mirrorMaker2, new InvalidResourceException("targetCluster with alias " + mirror.getTargetCluster() + " cannot be found in the list of clusters at spec.clusters"));
    } else if (!clusterMap.containsKey(sourceClusterAlias)) {
        return maybeUpdateMirrorMaker2Status(reconciliation, mirrorMaker2, new InvalidResourceException("sourceCluster with alias " + mirror.getSourceCluster() + " cannot be found in the list of clusters at spec.clusters"));
    }
    return CompositeFuture.join(MIRRORMAKER2_CONNECTORS.entrySet().stream().filter(// filter out non-existent connectors
    entry -> entry.getValue().apply(mirror) != null).map(entry -> {
        String connectorName = sourceClusterAlias + "->" + targetClusterAlias + entry.getKey();
        String className = MIRRORMAKER2_CONNECTOR_PACKAGE + entry.getKey();
        KafkaMirrorMaker2ConnectorSpec mm2ConnectorSpec = entry.getValue().apply(mirror);
        KafkaConnectorSpec connectorSpec = new KafkaConnectorSpecBuilder().withClassName(className).withConfig(mm2ConnectorSpec.getConfig()).withPause(mm2ConnectorSpec.getPause()).withTasksMax(mm2ConnectorSpec.getTasksMax()).build();
        prepareMirrorMaker2ConnectorConfig(reconciliation, mirror, clusterMap.get(sourceClusterAlias), clusterMap.get(targetClusterAlias), connectorSpec, mirrorMaker2Cluster);
        LOGGER.debugCr(reconciliation, "creating/updating connector {} config: {}", connectorName, connectorSpec.getConfig());
        return reconcileMirrorMaker2Connector(reconciliation, mirrorMaker2, apiClient, host, connectorName, connectorSpec, mirrorMaker2Status);
    }).collect(Collectors.toList())).map((Void) null).compose(i -> apiClient.updateConnectLoggers(reconciliation, host, KafkaConnectCluster.REST_API_PORT, desiredLogging, mirrorMaker2Cluster.getDefaultLogConfig())).compose(i -> {
        boolean failedConnector = mirrorMaker2Status.getConnectors().stream().anyMatch(connector -> {
            Object state = ((Map) connector.getOrDefault("connector", emptyMap())).get("state");
            return "FAILED".equalsIgnoreCase(state.toString());
        });
        if (failedConnector) {
            return Future.failedFuture("One or more connectors are in FAILED state");
        } else {
            return Future.succeededFuture();
        }
    }).map((Void) null);
}
Also used : InvalidResourceException(io.strimzi.operator.cluster.model.InvalidResourceException) KafkaMirrorMaker2Builder(io.strimzi.api.kafka.model.KafkaMirrorMaker2Builder) Annotations(io.strimzi.operator.common.Annotations) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_TASK(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_TASK) Resource(io.fabric8.kubernetes.client.dsl.Resource) Matcher(java.util.regex.Matcher) Map(java.util.Map) KafkaConnectorSpec(io.strimzi.api.kafka.model.KafkaConnectorSpec) ReconciliationException(io.strimzi.operator.common.ReconciliationException) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) AbstractModel(io.strimzi.operator.cluster.model.AbstractModel) ModelUtils(io.strimzi.operator.cluster.model.ModelUtils) StatusUtils(io.strimzi.operator.common.operator.resource.StatusUtils) ANNO_STRIMZI_IO_RESTART_CONNECTOR(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR) CertSecretSource(io.strimzi.api.kafka.model.CertSecretSource) KafkaMirrorMaker2ConnectorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ConnectorSpec) KafkaMirrorMaker2Spec(io.strimzi.api.kafka.model.KafkaMirrorMaker2Spec) DeploymentOperator(io.strimzi.operator.common.operator.resource.DeploymentOperator) KafkaVersion(io.strimzi.operator.cluster.model.KafkaVersion) Collectors(java.util.stream.Collectors) Future(io.vertx.core.Future) Serializable(java.io.Serializable) KafkaMirrorMaker2Resources(io.strimzi.api.kafka.model.KafkaMirrorMaker2Resources) KafkaClientAuthenticationScramSha256(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationScramSha256) KafkaMirrorMaker2List(io.strimzi.api.kafka.KafkaMirrorMaker2List) KafkaMirrorMaker2(io.strimzi.api.kafka.model.KafkaMirrorMaker2) KafkaMirrorMaker2Status(io.strimzi.api.kafka.model.status.KafkaMirrorMaker2Status) List(java.util.List) KafkaConnectCluster(io.strimzi.operator.cluster.model.KafkaConnectCluster) Stream(java.util.stream.Stream) Condition(io.strimzi.api.kafka.model.status.Condition) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN) ClusterOperatorConfig(io.strimzi.operator.cluster.ClusterOperatorConfig) CustomResource(io.fabric8.kubernetes.client.CustomResource) AuthenticationUtils(io.strimzi.operator.cluster.model.AuthenticationUtils) HashMap(java.util.HashMap) KafkaClientAuthenticationPlain(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationPlain) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK) CompositeFuture(io.vertx.core.CompositeFuture) KafkaClientAuthenticationOAuth(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationOAuth) KafkaClientAuthenticationTls(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationTls) SaslConfigs(org.apache.kafka.common.config.SaslConfigs) SslConfigs(org.apache.kafka.common.config.SslConfigs) ReconciliationLogger(io.strimzi.operator.common.ReconciliationLogger) Collections.emptyMap(java.util.Collections.emptyMap) KafkaMirrorMaker2ClusterSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec) InvalidResourceException(io.strimzi.operator.cluster.model.InvalidResourceException) AdminClientConfig(org.apache.kafka.clients.admin.AdminClientConfig) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) KafkaMirrorMaker2MirrorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec) KafkaMirrorMaker2Cluster(io.strimzi.operator.cluster.model.KafkaMirrorMaker2Cluster) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_CONNECTOR(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_CONNECTOR) KafkaClientAuthenticationScramSha512(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationScramSha512) Reconciliation(io.strimzi.operator.common.Reconciliation) Util(io.strimzi.operator.common.Util) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Comparator(java.util.Comparator) Collections(java.util.Collections) Deployment(io.fabric8.kubernetes.api.model.apps.Deployment) KafkaConnectorSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectorSpecBuilder) KafkaConnectorSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectorSpecBuilder) KafkaMirrorMaker2ClusterSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec) KafkaConnectorSpec(io.strimzi.api.kafka.model.KafkaConnectorSpec) KafkaMirrorMaker2ConnectorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ConnectorSpec)

Example 5 with KafkaMirrorMaker2MirrorSpec

use of io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec in project strimzi by strimzi.

the class KafkaMirrorMaker2AssemblyOperator method reconcileMirrorMaker2Connectors.

private Future<Void> reconcileMirrorMaker2Connectors(Reconciliation reconciliation, String host, KafkaConnectApi apiClient, KafkaMirrorMaker2 mirrorMaker2, KafkaMirrorMaker2MirrorSpec mirror, KafkaMirrorMaker2Cluster mirrorMaker2Cluster, KafkaMirrorMaker2Status mirrorMaker2Status, String desiredLogging) {
    String targetClusterAlias = mirror.getTargetCluster();
    String sourceClusterAlias = mirror.getSourceCluster();
    if (targetClusterAlias == null) {
        return maybeUpdateMirrorMaker2Status(reconciliation, mirrorMaker2, new InvalidResourceException("targetCluster property is required"));
    } else if (sourceClusterAlias == null) {
        return maybeUpdateMirrorMaker2Status(reconciliation, mirrorMaker2, new InvalidResourceException("sourceCluster property is required"));
    }
    List<KafkaMirrorMaker2ClusterSpec> clusters = ModelUtils.asListOrEmptyList(mirrorMaker2.getSpec().getClusters());
    Map<String, KafkaMirrorMaker2ClusterSpec> clusterMap = clusters.stream().filter(cluster -> targetClusterAlias.equals(cluster.getAlias()) || sourceClusterAlias.equals(cluster.getAlias())).collect(Collectors.toMap(KafkaMirrorMaker2ClusterSpec::getAlias, Function.identity()));
    if (!clusterMap.containsKey(targetClusterAlias)) {
        return maybeUpdateMirrorMaker2Status(reconciliation, mirrorMaker2, new InvalidResourceException("targetCluster with alias " + mirror.getTargetCluster() + " cannot be found in the list of clusters at spec.clusters"));
    } else if (!clusterMap.containsKey(sourceClusterAlias)) {
        return maybeUpdateMirrorMaker2Status(reconciliation, mirrorMaker2, new InvalidResourceException("sourceCluster with alias " + mirror.getSourceCluster() + " cannot be found in the list of clusters at spec.clusters"));
    }
    return CompositeFuture.join(MIRRORMAKER2_CONNECTORS.entrySet().stream().filter(// filter out non-existent connectors
    entry -> entry.getValue().apply(mirror) != null).map(entry -> {
        String connectorName = sourceClusterAlias + "->" + targetClusterAlias + entry.getKey();
        String className = MIRRORMAKER2_CONNECTOR_PACKAGE + entry.getKey();
        KafkaMirrorMaker2ConnectorSpec mm2ConnectorSpec = entry.getValue().apply(mirror);
        KafkaConnectorSpec connectorSpec = new KafkaConnectorSpecBuilder().withClassName(className).withConfig(mm2ConnectorSpec.getConfig()).withPause(mm2ConnectorSpec.getPause()).withTasksMax(mm2ConnectorSpec.getTasksMax()).build();
        prepareMirrorMaker2ConnectorConfig(reconciliation, mirror, clusterMap.get(sourceClusterAlias), clusterMap.get(targetClusterAlias), connectorSpec, mirrorMaker2Cluster);
        LOGGER.debugCr(reconciliation, "creating/updating connector {} config: {}", connectorName, connectorSpec.getConfig());
        return reconcileMirrorMaker2Connector(reconciliation, mirrorMaker2, apiClient, host, connectorName, connectorSpec, mirrorMaker2Status);
    }).collect(Collectors.toList())).map((Void) null).compose(i -> apiClient.updateConnectLoggers(reconciliation, host, KafkaConnectCluster.REST_API_PORT, desiredLogging, mirrorMaker2Cluster.getDefaultLogConfig())).compose(i -> {
        boolean failedConnector = mirrorMaker2Status.getConnectors().stream().anyMatch(connector -> {
            Object state = ((Map) connector.getOrDefault("connector", emptyMap())).get("state");
            return "FAILED".equalsIgnoreCase(state.toString());
        });
        if (failedConnector) {
            return Future.failedFuture("One or more connectors are in FAILED state");
        } else {
            return Future.succeededFuture();
        }
    }).map((Void) null);
}
Also used : InvalidResourceException(io.strimzi.operator.cluster.model.InvalidResourceException) KafkaMirrorMaker2Builder(io.strimzi.api.kafka.model.KafkaMirrorMaker2Builder) Annotations(io.strimzi.operator.common.Annotations) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_TASK(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_TASK) Resource(io.fabric8.kubernetes.client.dsl.Resource) Matcher(java.util.regex.Matcher) Map(java.util.Map) KafkaConnectorSpec(io.strimzi.api.kafka.model.KafkaConnectorSpec) ReconciliationException(io.strimzi.operator.common.ReconciliationException) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) AbstractModel(io.strimzi.operator.cluster.model.AbstractModel) ModelUtils(io.strimzi.operator.cluster.model.ModelUtils) StatusUtils(io.strimzi.operator.common.operator.resource.StatusUtils) ANNO_STRIMZI_IO_RESTART_CONNECTOR(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR) CertSecretSource(io.strimzi.api.kafka.model.CertSecretSource) KafkaMirrorMaker2ConnectorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ConnectorSpec) KafkaMirrorMaker2Spec(io.strimzi.api.kafka.model.KafkaMirrorMaker2Spec) DeploymentOperator(io.strimzi.operator.common.operator.resource.DeploymentOperator) KafkaVersion(io.strimzi.operator.cluster.model.KafkaVersion) Collectors(java.util.stream.Collectors) Future(io.vertx.core.Future) Serializable(java.io.Serializable) KafkaMirrorMaker2Resources(io.strimzi.api.kafka.model.KafkaMirrorMaker2Resources) KafkaClientAuthenticationScramSha256(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationScramSha256) KafkaMirrorMaker2List(io.strimzi.api.kafka.KafkaMirrorMaker2List) KafkaMirrorMaker2(io.strimzi.api.kafka.model.KafkaMirrorMaker2) KafkaMirrorMaker2Status(io.strimzi.api.kafka.model.status.KafkaMirrorMaker2Status) List(java.util.List) KafkaConnectCluster(io.strimzi.operator.cluster.model.KafkaConnectCluster) Stream(java.util.stream.Stream) Condition(io.strimzi.api.kafka.model.status.Condition) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN) ClusterOperatorConfig(io.strimzi.operator.cluster.ClusterOperatorConfig) CustomResource(io.fabric8.kubernetes.client.CustomResource) AuthenticationUtils(io.strimzi.operator.cluster.model.AuthenticationUtils) HashMap(java.util.HashMap) KafkaClientAuthenticationPlain(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationPlain) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK) CompositeFuture(io.vertx.core.CompositeFuture) KafkaClientAuthenticationOAuth(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationOAuth) KafkaClientAuthenticationTls(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationTls) SaslConfigs(org.apache.kafka.common.config.SaslConfigs) SslConfigs(org.apache.kafka.common.config.SslConfigs) ReconciliationLogger(io.strimzi.operator.common.ReconciliationLogger) Collections.emptyMap(java.util.Collections.emptyMap) KafkaMirrorMaker2ClusterSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec) InvalidResourceException(io.strimzi.operator.cluster.model.InvalidResourceException) AdminClientConfig(org.apache.kafka.clients.admin.AdminClientConfig) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) KafkaMirrorMaker2MirrorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec) KafkaMirrorMaker2Cluster(io.strimzi.operator.cluster.model.KafkaMirrorMaker2Cluster) ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_CONNECTOR(io.strimzi.operator.common.Annotations.ANNO_STRIMZI_IO_RESTART_CONNECTOR_TASK_PATTERN_CONNECTOR) KafkaClientAuthenticationScramSha512(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationScramSha512) Reconciliation(io.strimzi.operator.common.Reconciliation) Util(io.strimzi.operator.common.Util) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Comparator(java.util.Comparator) Collections(java.util.Collections) Deployment(io.fabric8.kubernetes.api.model.apps.Deployment) KafkaConnectorSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectorSpecBuilder) KafkaConnectorSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectorSpecBuilder) KafkaMirrorMaker2ClusterSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec) KafkaConnectorSpec(io.strimzi.api.kafka.model.KafkaConnectorSpec) KafkaMirrorMaker2ConnectorSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ConnectorSpec)

Aggregations

Deployment (io.fabric8.kubernetes.api.model.apps.Deployment)8 KafkaMirrorMaker2 (io.strimzi.api.kafka.model.KafkaMirrorMaker2)8 KafkaMirrorMaker2ClusterSpec (io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec)8 KafkaMirrorMaker2MirrorSpec (io.strimzi.api.kafka.model.KafkaMirrorMaker2MirrorSpec)8 KafkaMirrorMaker2Resources (io.strimzi.api.kafka.model.KafkaMirrorMaker2Resources)8 KafkaMirrorMaker2Status (io.strimzi.api.kafka.model.status.KafkaMirrorMaker2Status)8 PlatformFeaturesAvailability (io.strimzi.operator.PlatformFeaturesAvailability)8 AbstractModel (io.strimzi.operator.cluster.model.AbstractModel)8 KafkaMirrorMaker2Cluster (io.strimzi.operator.cluster.model.KafkaMirrorMaker2Cluster)8 KafkaVersion (io.strimzi.operator.cluster.model.KafkaVersion)8 ResourceOperatorSupplier (io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier)8 Annotations (io.strimzi.operator.common.Annotations)8 Reconciliation (io.strimzi.operator.common.Reconciliation)8 Util (io.strimzi.operator.common.Util)8 DeploymentOperator (io.strimzi.operator.common.operator.resource.DeploymentOperator)8 Future (io.vertx.core.Future)8 Vertx (io.vertx.core.Vertx)8 Collections (java.util.Collections)8 HashMap (java.util.HashMap)8 List (java.util.List)8