Search in sources :

Example 16 with Condition

use of io.fabric8.kubernetes.api.model.Condition in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class ManagedConnectorConditionsTest method conditionAdd.

@Test
void conditionAdd() {
    ManagedConnector connector = new ManagedConnector();
    Condition condition = new Condition();
    condition.setType("Ready");
    condition.setStatus("True");
    condition.setReason("reason");
    condition.setMessage("message");
    condition.setLastTransitionTime(ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT));
    connector.getStatus().setConditions(List.of(condition));
    assertThat(ManagedConnectorConditions.setCondition(connector, ManagedConnectorConditions.Type.Ready, ManagedConnectorConditions.Status.True, "new reason", "new message")).isTrue();
    assertThat(connector.getStatus().getConditions()).hasSize(1).allMatch(c -> {
        return Objects.equals(c.getType(), "Ready") && Objects.equals(c.getStatus(), "True") && Objects.equals(c.getReason(), "new reason") && Objects.equals(c.getMessage(), "new message") && !Objects.equals(c.getLastTransitionTime(), condition.getLastTransitionTime());
    });
    assertThat(ManagedConnectorConditions.setCondition(connector, ManagedConnectorConditions.Type.Ready, ManagedConnectorConditions.Status.True, "new reason", "new message")).isFalse();
}
Also used : Condition(io.fabric8.kubernetes.api.model.Condition) Test(org.junit.jupiter.api.Test)

Example 17 with Condition

use of io.fabric8.kubernetes.api.model.Condition in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class KameletBindingSteps method klb_phase_and_conditions.

@SuppressWarnings("unchecked")
@When("the klb phase is {string} with conditions:")
public void klb_phase_and_conditions(String phase, DataTable table) {
    // TODO: investigate using KubernetesClient.resources(KameletBinding.class) result in a bad patch
    kubernetesClient.genericKubernetesResources(KameletBinding.RESOURCE_DEFINITION).inNamespace(ctx.connector().getMetadata().getNamespace()).withName(ctx.connector().getMetadata().getName()).editStatus(binding -> {
        Map<String, Object> status = (Map<String, Object>) binding.getAdditionalProperties().get("status");
        if (status == null) {
            status = new HashMap<>();
        }
        List<Map<String, String>> rows = table.asMaps(String.class, String.class);
        List<Condition> conditions = new ArrayList<>(rows.size());
        for (Map<String, String> columns : rows) {
            conditions.add(new ConditionBuilder().withMessage(columns.get("message")).withReason(columns.get("reason")).withStatus(columns.get("status")).withType(columns.get("type")).withLastTransitionTime(columns.get("lastTransitionTime")).build());
        }
        status.put("phase", phase);
        status.put("conditions", conditions);
        binding.getAdditionalProperties().put("status", status);
        return binding;
    });
// kubernetesClient.resources(KameletBinding.class)
// .inNamespace(ctx.connector().getMetadata().getNamespace())
// .withName(ctx.connector().getMetadata().getName())
// .editStatus(binding -> {
// if (binding.getStatus() == null) {
// binding.setStatus(new KameletBindingStatus());
// }
// 
// List<Map<String, String>> rows = table.asMaps(String.class, String.class);
// List<Condition> conditions = new ArrayList<>(rows.size());
// 
// for (Map<String, String> columns : rows) {
// conditions.add(new ConditionBuilder()
// .withMessage(columns.get("message"))
// .withReason(columns.get("reason"))
// .withStatus(columns.get("status"))
// .withType(columns.get("type"))
// .withLastTransitionTime(columns.get("lastTransitionTime"))
// .build());
// }
// 
// binding.getStatus().setPhase(phase);
// binding.getStatus().setConditions(conditions);
// 
// return binding;
// });
}
Also used : Condition(io.fabric8.kubernetes.api.model.Condition) ConditionBuilder(io.fabric8.kubernetes.api.model.ConditionBuilder) ArrayList(java.util.ArrayList) HashMap(java.util.HashMap) Map(java.util.Map) When(io.cucumber.java.en.When)

Example 18 with Condition

use of io.fabric8.kubernetes.api.model.Condition in project strimzi-kafka-operator by strimzi.

the class MirrorMaker2IsolatedST method testKafkaMirrorMaker2ReflectsConnectorsState.

@ParallelNamespaceTest
void testKafkaMirrorMaker2ReflectsConnectorsState(ExtensionContext extensionContext) {
    final String namespaceName = StUtils.getNamespaceBasedOnRbac(INFRA_NAMESPACE, extensionContext);
    String clusterName = mapWithClusterNames.get(extensionContext.getDisplayName());
    String kafkaClusterSourceName = clusterName + "-source";
    String kafkaClusterTargetName = clusterName + "-target";
    String errorMessage = "One or more connectors are in FAILED state";
    resourceManager.createResource(extensionContext, KafkaTemplates.kafkaEphemeral(kafkaClusterSourceName, 1, 1).build(), KafkaTemplates.kafkaEphemeral(kafkaClusterTargetName, 1, 1).build());
    resourceManager.createResource(extensionContext, false, KafkaMirrorMaker2Templates.kafkaMirrorMaker2(clusterName, kafkaClusterTargetName, kafkaClusterSourceName, 1, false).editSpec().editMatchingCluster(spec -> spec.getAlias().equals(kafkaClusterSourceName)).withBootstrapServers(KafkaResources.bootstrapServiceName(kafkaClusterSourceName) + ".:9092").endCluster().endSpec().build());
    KafkaMirrorMaker2Utils.waitForKafkaMirrorMaker2StatusMessage(namespaceName, clusterName, errorMessage);
    KafkaMirrorMaker2Resource.replaceKafkaMirrorMaker2ResourceInSpecificNamespace(clusterName, mm2 -> mm2.getSpec().getClusters().stream().filter(mm2ClusterSpec -> mm2ClusterSpec.getAlias().equals(kafkaClusterSourceName)).findFirst().get().setBootstrapServers(KafkaUtils.namespacedPlainBootstrapAddress(kafkaClusterSourceName, namespaceName)), namespaceName);
    KafkaMirrorMaker2Utils.waitForKafkaMirrorMaker2Ready(namespaceName, clusterName);
    KafkaMirrorMaker2Status kmm2Status = KafkaMirrorMaker2Resource.kafkaMirrorMaker2Client().inNamespace(namespaceName).withName(clusterName).get().getStatus();
    assertFalse(kmm2Status.getConditions().stream().anyMatch(condition -> condition.getMessage() != null && condition.getMessage().contains(errorMessage)));
}
Also used : LabelSelector(io.fabric8.kubernetes.api.model.LabelSelector) KafkaResource(io.strimzi.systemtest.resources.crd.KafkaResource) GLOBAL_TIMEOUT(io.strimzi.systemtest.Constants.GLOBAL_TIMEOUT) KubeClusterResource.cmdKubeClient(io.strimzi.test.k8s.KubeClusterResource.cmdKubeClient) Random(java.util.Random) KafkaTopicUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaTopicUtils) INFRA_NAMESPACE(io.strimzi.systemtest.Constants.INFRA_NAMESPACE) KafkaUser(io.strimzi.api.kafka.model.KafkaUser) KafkaListenerAuthenticationTls(io.strimzi.api.kafka.model.listener.KafkaListenerAuthenticationTls) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) KafkaResources(io.strimzi.api.kafka.model.KafkaResources) Ca(io.strimzi.operator.cluster.model.Ca) BeforeAll(org.junit.jupiter.api.BeforeAll) Map(java.util.Map) Matchers.nullValue(org.hamcrest.Matchers.nullValue) Tag(org.junit.jupiter.api.Tag) StUtils(io.strimzi.systemtest.utils.StUtils) BeforeAllOnce(io.strimzi.systemtest.BeforeAllOnce) RollingUpdateUtils(io.strimzi.systemtest.utils.RollingUpdateUtils) ACCEPTANCE(io.strimzi.systemtest.Constants.ACCEPTANCE) CertSecretSource(io.strimzi.api.kafka.model.CertSecretSource) IsolatedSuite(io.strimzi.systemtest.annotations.IsolatedSuite) KafkaClients(io.strimzi.systemtest.kafkaclients.internalClients.KafkaClients) KafkaMirrorMaker2Templates(io.strimzi.systemtest.templates.crd.KafkaMirrorMaker2Templates) INTERNAL_CLIENTS_USED(io.strimzi.systemtest.Constants.INTERNAL_CLIENTS_USED) GenericKafkaListenerBuilder(io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListenerBuilder) PasswordSecretSource(io.strimzi.api.kafka.model.PasswordSecretSource) ClientUtils(io.strimzi.systemtest.utils.ClientUtils) KafkaMirrorMaker2Resources(io.strimzi.api.kafka.model.KafkaMirrorMaker2Resources) 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) Logger(org.apache.logging.log4j.Logger) KafkaTopicTemplates(io.strimzi.systemtest.templates.crd.KafkaTopicTemplates) KafkaMirrorMaker2Utils(io.strimzi.systemtest.utils.kafkaUtils.KafkaMirrorMaker2Utils) Secret(io.fabric8.kubernetes.api.model.Secret) GLOBAL_POLL_INTERVAL(io.strimzi.systemtest.Constants.GLOBAL_POLL_INTERVAL) Matchers.is(org.hamcrest.Matchers.is) KafkaTopicResource(io.strimzi.systemtest.resources.crd.KafkaTopicResource) SCALABILITY(io.strimzi.systemtest.Constants.SCALABILITY) Matchers.containsString(org.hamcrest.Matchers.containsString) Assertions.assertDoesNotThrow(org.junit.jupiter.api.Assertions.assertDoesNotThrow) AbstractST(io.strimzi.systemtest.AbstractST) Environment(io.strimzi.systemtest.Environment) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) KafkaClientsTemplates(io.strimzi.systemtest.templates.crd.KafkaClientsTemplates) CoreMatchers.equalTo(org.hamcrest.CoreMatchers.equalTo) CoreMatchers.not(org.hamcrest.CoreMatchers.not) ExtensionContext(org.junit.jupiter.api.extension.ExtensionContext) TestStorage(io.strimzi.systemtest.storage.TestStorage) SecretUtils(io.strimzi.systemtest.utils.kubeUtils.objects.SecretUtils) PodUtils(io.strimzi.systemtest.utils.kubeUtils.objects.PodUtils) JsonPathMatchers.hasJsonPath(org.valid4j.matchers.jsonpath.JsonPathMatchers.hasJsonPath) DeploymentStrategy(io.strimzi.api.kafka.model.template.DeploymentStrategy) TestUtils(io.strimzi.test.TestUtils) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) KafkaListenerAuthenticationScramSha512(io.strimzi.api.kafka.model.listener.KafkaListenerAuthenticationScramSha512) MIRROR_MAKER2(io.strimzi.systemtest.Constants.MIRROR_MAKER2) KafkaTemplates(io.strimzi.systemtest.templates.crd.KafkaTemplates) Ready(io.strimzi.systemtest.enums.CustomResourceStatus.Ready) KafkaUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaUtils) JobBuilder(io.fabric8.kubernetes.api.model.batch.v1.JobBuilder) KafkaMirrorMaker2ClusterSpec(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpec) InternalKafkaClient(io.strimzi.systemtest.kafkaclients.clients.InternalKafkaClient) JobUtils(io.strimzi.systemtest.utils.kubeUtils.controllers.JobUtils) Constants(io.strimzi.systemtest.Constants) KafkaClientsBuilder(io.strimzi.systemtest.kafkaclients.internalClients.KafkaClientsBuilder) ParallelNamespaceTest(io.strimzi.systemtest.annotations.ParallelNamespaceTest) SetupClusterOperator(io.strimzi.systemtest.resources.operator.SetupClusterOperator) KafkaCmdClient(io.strimzi.systemtest.cli.KafkaCmdClient) KubeClusterResource.kubeClient(io.strimzi.test.k8s.KubeClusterResource.kubeClient) KafkaTopic(io.strimzi.api.kafka.model.KafkaTopic) DeploymentUtils(io.strimzi.systemtest.utils.kubeUtils.controllers.DeploymentUtils) Matchers.hasItem(org.hamcrest.Matchers.hasItem) KafkaMirrorMaker2ClusterSpecBuilder(io.strimzi.api.kafka.model.KafkaMirrorMaker2ClusterSpecBuilder) KafkaListenerType(io.strimzi.api.kafka.model.listener.arraylistener.KafkaListenerType) KafkaUserTemplates(io.strimzi.systemtest.templates.crd.KafkaUserTemplates) CONNECT_COMPONENTS(io.strimzi.systemtest.Constants.CONNECT_COMPONENTS) KafkaMirrorMaker2Resource(io.strimzi.systemtest.resources.crd.KafkaMirrorMaker2Resource) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) LogManager(org.apache.logging.log4j.LogManager) Collections(java.util.Collections) REGRESSION(io.strimzi.systemtest.Constants.REGRESSION) KafkaMirrorMaker2Status(io.strimzi.api.kafka.model.status.KafkaMirrorMaker2Status) Matchers.containsString(org.hamcrest.Matchers.containsString) ParallelNamespaceTest(io.strimzi.systemtest.annotations.ParallelNamespaceTest)

Example 19 with Condition

use of io.fabric8.kubernetes.api.model.Condition in project strimzi-kafka-operator by strimzi.

the class CustomResourceStatusIsolatedST method assertKafkaTopicWrongMinInSyncReplicasStatus.

void assertKafkaTopicWrongMinInSyncReplicasStatus(String topicName, String invalidValue) {
    KafkaTopicStatus kafkaTopicStatus = KafkaTopicResource.kafkaTopicClient().inNamespace(Constants.INFRA_NAMESPACE).withName(topicName).get().getStatus();
    assertThat(kafkaTopicStatus.getConditions().stream().anyMatch(condition -> condition.getType().equals(NotReady.toString())), is(true));
    assertThat(kafkaTopicStatus.getConditions().stream().anyMatch(condition -> condition.getReason().equals("InvalidRequestException")), is(true));
    assertThat(kafkaTopicStatus.getConditions().stream().anyMatch(condition -> condition.getMessage().contains(String.format("Invalid value %s for configuration min.insync.replicas", invalidValue))), is(true));
}
Also used : KafkaTopicStatus(io.strimzi.api.kafka.model.status.KafkaTopicStatus) Quantity(io.fabric8.kubernetes.api.model.Quantity) ParallelTest(io.strimzi.systemtest.annotations.ParallelTest) CoreMatchers.is(org.hamcrest.CoreMatchers.is) DeletionPropagation(io.fabric8.kubernetes.api.model.DeletionPropagation) KafkaResource(io.strimzi.systemtest.resources.crd.KafkaResource) KubeClusterResource.cmdKubeClient(io.strimzi.test.k8s.KubeClusterResource.cmdKubeClient) Annotations(io.strimzi.operator.common.Annotations) KafkaTopicUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaTopicUtils) KafkaConnectResource(io.strimzi.systemtest.resources.crd.KafkaConnectResource) CoreMatchers.notNullValue(org.hamcrest.CoreMatchers.notNullValue) KafkaUtils.getKafkaSecretCertificates(io.strimzi.systemtest.utils.kafkaUtils.KafkaUtils.getKafkaSecretCertificates) KafkaResources(io.strimzi.api.kafka.model.KafkaResources) KafkaConnectUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaConnectUtils) BeforeAll(org.junit.jupiter.api.BeforeAll) Arrays.asList(java.util.Arrays.asList) KafkaConnectStatus(io.strimzi.api.kafka.model.status.KafkaConnectStatus) Map(java.util.Map) Tag(org.junit.jupiter.api.Tag) KafkaTopicStatus(io.strimzi.api.kafka.model.status.KafkaTopicStatus) BeforeAllOnce(io.strimzi.systemtest.BeforeAllOnce) IsolatedSuite(io.strimzi.systemtest.annotations.IsolatedSuite) KafkaMirrorMaker2Templates(io.strimzi.systemtest.templates.crd.KafkaMirrorMaker2Templates) GenericKafkaListenerBuilder(io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListenerBuilder) KafkaMirrorMakerUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaMirrorMakerUtils) Collectors(java.util.stream.Collectors) ClientUtils(io.strimzi.systemtest.utils.ClientUtils) KafkaMirrorMaker2Resources(io.strimzi.api.kafka.model.KafkaMirrorMaker2Resources) ListenerStatus(io.strimzi.api.kafka.model.status.ListenerStatus) 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) KafkaBridgeResource(io.strimzi.systemtest.resources.crd.KafkaBridgeResource) Logger(org.apache.logging.log4j.Logger) KafkaUtils.getKafkaStatusCertificates(io.strimzi.systemtest.utils.kafkaUtils.KafkaUtils.getKafkaStatusCertificates) KafkaTopicTemplates(io.strimzi.systemtest.templates.crd.KafkaTopicTemplates) BRIDGE(io.strimzi.systemtest.Constants.BRIDGE) KafkaConnectorStatus(io.strimzi.api.kafka.model.status.KafkaConnectorStatus) KafkaConnectorTemplates(io.strimzi.systemtest.templates.crd.KafkaConnectorTemplates) KafkaMirrorMaker2Utils(io.strimzi.systemtest.utils.kafkaUtils.KafkaMirrorMaker2Utils) Condition(io.strimzi.api.kafka.model.status.Condition) KafkaMirrorMakerStatus(io.strimzi.api.kafka.model.status.KafkaMirrorMakerStatus) KafkaTopicResource(io.strimzi.systemtest.resources.crd.KafkaTopicResource) AbstractST(io.strimzi.systemtest.AbstractST) Environment(io.strimzi.systemtest.Environment) KafkaStatus(io.strimzi.api.kafka.model.status.KafkaStatus) GenericKafkaListener(io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListener) KafkaClientsTemplates(io.strimzi.systemtest.templates.crd.KafkaClientsTemplates) KafkaConnectTemplates(io.strimzi.systemtest.templates.crd.KafkaConnectTemplates) KafkaMirrorMakerTemplates(io.strimzi.systemtest.templates.crd.KafkaMirrorMakerTemplates) CONNECT(io.strimzi.systemtest.Constants.CONNECT) ResourceRequirementsBuilder(io.fabric8.kubernetes.api.model.ResourceRequirementsBuilder) ExternalKafkaClient(io.strimzi.systemtest.kafkaclients.externalClients.ExternalKafkaClient) ExtensionContext(org.junit.jupiter.api.extension.ExtensionContext) MIRROR_MAKER(io.strimzi.systemtest.Constants.MIRROR_MAKER) KafkaUserResource(io.strimzi.systemtest.resources.crd.KafkaUserResource) KafkaBuilder(io.strimzi.api.kafka.model.KafkaBuilder) LinkedHashMap(java.util.LinkedHashMap) KafkaConnectorResource(io.strimzi.systemtest.resources.crd.KafkaConnectorResource) StringContains.containsString(org.hamcrest.core.StringContains.containsString) PodUtils(io.strimzi.systemtest.utils.kubeUtils.objects.PodUtils) NotReady(io.strimzi.systemtest.enums.CustomResourceStatus.NotReady) Service(io.fabric8.kubernetes.api.model.Service) KafkaBridgeUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaBridgeUtils) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) NODEPORT_SUPPORTED(io.strimzi.systemtest.Constants.NODEPORT_SUPPORTED) MIRROR_MAKER2(io.strimzi.systemtest.Constants.MIRROR_MAKER2) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) KafkaBridgeResources(io.strimzi.api.kafka.model.KafkaBridgeResources) KafkaTemplates(io.strimzi.systemtest.templates.crd.KafkaTemplates) Ready(io.strimzi.systemtest.enums.CustomResourceStatus.Ready) KafkaUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaUtils) CoreMatchers.hasItems(org.hamcrest.CoreMatchers.hasItems) Constants(io.strimzi.systemtest.Constants) ConnectorPlugin(io.strimzi.api.kafka.model.connect.ConnectorPlugin) EXTERNAL_CLIENTS_USED(io.strimzi.systemtest.Constants.EXTERNAL_CLIENTS_USED) SetupClusterOperator(io.strimzi.systemtest.resources.operator.SetupClusterOperator) KubeClusterResource.kubeClient(io.strimzi.test.k8s.KubeClusterResource.kubeClient) KafkaBridgeStatus(io.strimzi.api.kafka.model.status.KafkaBridgeStatus) KafkaMirrorMakerResource(io.strimzi.systemtest.resources.crd.KafkaMirrorMakerResource) KafkaTopic(io.strimzi.api.kafka.model.KafkaTopic) KafkaConnectorUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaConnectorUtils) DeploymentUtils(io.strimzi.systemtest.utils.kubeUtils.controllers.DeploymentUtils) KafkaListenerType(io.strimzi.api.kafka.model.listener.arraylistener.KafkaListenerType) ResourceManager(io.strimzi.systemtest.resources.ResourceManager) KafkaUserTemplates(io.strimzi.systemtest.templates.crd.KafkaUserTemplates) KafkaUserUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaUserUtils) CONNECTOR_OPERATOR(io.strimzi.systemtest.Constants.CONNECTOR_OPERATOR) CONNECT_COMPONENTS(io.strimzi.systemtest.Constants.CONNECT_COMPONENTS) KafkaResources.externalBootstrapServiceName(io.strimzi.api.kafka.model.KafkaResources.externalBootstrapServiceName) KafkaMirrorMaker2Resource(io.strimzi.systemtest.resources.crd.KafkaMirrorMaker2Resource) KafkaBridgeTemplates(io.strimzi.systemtest.templates.crd.KafkaBridgeTemplates) LogManager(org.apache.logging.log4j.LogManager) Collections(java.util.Collections) REGRESSION(io.strimzi.systemtest.Constants.REGRESSION) KafkaConnectResources(io.strimzi.api.kafka.model.KafkaConnectResources)

Example 20 with Condition

use of io.fabric8.kubernetes.api.model.Condition in project strimzi-kafka-operator by strimzi.

the class CustomResourceStatusIsolatedST method assertKafkaTopicDecreasePartitionsStatus.

void assertKafkaTopicDecreasePartitionsStatus(String topicName) {
    KafkaTopicStatus kafkaTopicStatus = KafkaTopicResource.kafkaTopicClient().inNamespace(Constants.INFRA_NAMESPACE).withName(topicName).get().getStatus();
    assertThat(kafkaTopicStatus.getConditions().stream().anyMatch(condition -> condition.getType().equals(NotReady.toString())), is(true));
    assertThat(kafkaTopicStatus.getConditions().stream().anyMatch(condition -> condition.getReason().equals("PartitionDecreaseException")), is(true));
    assertThat(kafkaTopicStatus.getConditions().stream().anyMatch(condition -> condition.getMessage().contains("Number of partitions cannot be decreased")), is(true));
}
Also used : KafkaTopicStatus(io.strimzi.api.kafka.model.status.KafkaTopicStatus) Quantity(io.fabric8.kubernetes.api.model.Quantity) ParallelTest(io.strimzi.systemtest.annotations.ParallelTest) CoreMatchers.is(org.hamcrest.CoreMatchers.is) DeletionPropagation(io.fabric8.kubernetes.api.model.DeletionPropagation) KafkaResource(io.strimzi.systemtest.resources.crd.KafkaResource) KubeClusterResource.cmdKubeClient(io.strimzi.test.k8s.KubeClusterResource.cmdKubeClient) Annotations(io.strimzi.operator.common.Annotations) KafkaTopicUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaTopicUtils) KafkaConnectResource(io.strimzi.systemtest.resources.crd.KafkaConnectResource) CoreMatchers.notNullValue(org.hamcrest.CoreMatchers.notNullValue) KafkaUtils.getKafkaSecretCertificates(io.strimzi.systemtest.utils.kafkaUtils.KafkaUtils.getKafkaSecretCertificates) KafkaResources(io.strimzi.api.kafka.model.KafkaResources) KafkaConnectUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaConnectUtils) BeforeAll(org.junit.jupiter.api.BeforeAll) Arrays.asList(java.util.Arrays.asList) KafkaConnectStatus(io.strimzi.api.kafka.model.status.KafkaConnectStatus) Map(java.util.Map) Tag(org.junit.jupiter.api.Tag) KafkaTopicStatus(io.strimzi.api.kafka.model.status.KafkaTopicStatus) BeforeAllOnce(io.strimzi.systemtest.BeforeAllOnce) IsolatedSuite(io.strimzi.systemtest.annotations.IsolatedSuite) KafkaMirrorMaker2Templates(io.strimzi.systemtest.templates.crd.KafkaMirrorMaker2Templates) GenericKafkaListenerBuilder(io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListenerBuilder) KafkaMirrorMakerUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaMirrorMakerUtils) Collectors(java.util.stream.Collectors) ClientUtils(io.strimzi.systemtest.utils.ClientUtils) KafkaMirrorMaker2Resources(io.strimzi.api.kafka.model.KafkaMirrorMaker2Resources) ListenerStatus(io.strimzi.api.kafka.model.status.ListenerStatus) 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) KafkaBridgeResource(io.strimzi.systemtest.resources.crd.KafkaBridgeResource) Logger(org.apache.logging.log4j.Logger) KafkaUtils.getKafkaStatusCertificates(io.strimzi.systemtest.utils.kafkaUtils.KafkaUtils.getKafkaStatusCertificates) KafkaTopicTemplates(io.strimzi.systemtest.templates.crd.KafkaTopicTemplates) BRIDGE(io.strimzi.systemtest.Constants.BRIDGE) KafkaConnectorStatus(io.strimzi.api.kafka.model.status.KafkaConnectorStatus) KafkaConnectorTemplates(io.strimzi.systemtest.templates.crd.KafkaConnectorTemplates) KafkaMirrorMaker2Utils(io.strimzi.systemtest.utils.kafkaUtils.KafkaMirrorMaker2Utils) Condition(io.strimzi.api.kafka.model.status.Condition) KafkaMirrorMakerStatus(io.strimzi.api.kafka.model.status.KafkaMirrorMakerStatus) KafkaTopicResource(io.strimzi.systemtest.resources.crd.KafkaTopicResource) AbstractST(io.strimzi.systemtest.AbstractST) Environment(io.strimzi.systemtest.Environment) KafkaStatus(io.strimzi.api.kafka.model.status.KafkaStatus) GenericKafkaListener(io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListener) KafkaClientsTemplates(io.strimzi.systemtest.templates.crd.KafkaClientsTemplates) KafkaConnectTemplates(io.strimzi.systemtest.templates.crd.KafkaConnectTemplates) KafkaMirrorMakerTemplates(io.strimzi.systemtest.templates.crd.KafkaMirrorMakerTemplates) CONNECT(io.strimzi.systemtest.Constants.CONNECT) ResourceRequirementsBuilder(io.fabric8.kubernetes.api.model.ResourceRequirementsBuilder) ExternalKafkaClient(io.strimzi.systemtest.kafkaclients.externalClients.ExternalKafkaClient) ExtensionContext(org.junit.jupiter.api.extension.ExtensionContext) MIRROR_MAKER(io.strimzi.systemtest.Constants.MIRROR_MAKER) KafkaUserResource(io.strimzi.systemtest.resources.crd.KafkaUserResource) KafkaBuilder(io.strimzi.api.kafka.model.KafkaBuilder) LinkedHashMap(java.util.LinkedHashMap) KafkaConnectorResource(io.strimzi.systemtest.resources.crd.KafkaConnectorResource) StringContains.containsString(org.hamcrest.core.StringContains.containsString) PodUtils(io.strimzi.systemtest.utils.kubeUtils.objects.PodUtils) NotReady(io.strimzi.systemtest.enums.CustomResourceStatus.NotReady) Service(io.fabric8.kubernetes.api.model.Service) KafkaBridgeUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaBridgeUtils) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) NODEPORT_SUPPORTED(io.strimzi.systemtest.Constants.NODEPORT_SUPPORTED) MIRROR_MAKER2(io.strimzi.systemtest.Constants.MIRROR_MAKER2) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) KafkaBridgeResources(io.strimzi.api.kafka.model.KafkaBridgeResources) KafkaTemplates(io.strimzi.systemtest.templates.crd.KafkaTemplates) Ready(io.strimzi.systemtest.enums.CustomResourceStatus.Ready) KafkaUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaUtils) CoreMatchers.hasItems(org.hamcrest.CoreMatchers.hasItems) Constants(io.strimzi.systemtest.Constants) ConnectorPlugin(io.strimzi.api.kafka.model.connect.ConnectorPlugin) EXTERNAL_CLIENTS_USED(io.strimzi.systemtest.Constants.EXTERNAL_CLIENTS_USED) SetupClusterOperator(io.strimzi.systemtest.resources.operator.SetupClusterOperator) KubeClusterResource.kubeClient(io.strimzi.test.k8s.KubeClusterResource.kubeClient) KafkaBridgeStatus(io.strimzi.api.kafka.model.status.KafkaBridgeStatus) KafkaMirrorMakerResource(io.strimzi.systemtest.resources.crd.KafkaMirrorMakerResource) KafkaTopic(io.strimzi.api.kafka.model.KafkaTopic) KafkaConnectorUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaConnectorUtils) DeploymentUtils(io.strimzi.systemtest.utils.kubeUtils.controllers.DeploymentUtils) KafkaListenerType(io.strimzi.api.kafka.model.listener.arraylistener.KafkaListenerType) ResourceManager(io.strimzi.systemtest.resources.ResourceManager) KafkaUserTemplates(io.strimzi.systemtest.templates.crd.KafkaUserTemplates) KafkaUserUtils(io.strimzi.systemtest.utils.kafkaUtils.KafkaUserUtils) CONNECTOR_OPERATOR(io.strimzi.systemtest.Constants.CONNECTOR_OPERATOR) CONNECT_COMPONENTS(io.strimzi.systemtest.Constants.CONNECT_COMPONENTS) KafkaResources.externalBootstrapServiceName(io.strimzi.api.kafka.model.KafkaResources.externalBootstrapServiceName) KafkaMirrorMaker2Resource(io.strimzi.systemtest.resources.crd.KafkaMirrorMaker2Resource) KafkaBridgeTemplates(io.strimzi.systemtest.templates.crd.KafkaBridgeTemplates) LogManager(org.apache.logging.log4j.LogManager) Collections(java.util.Collections) REGRESSION(io.strimzi.systemtest.Constants.REGRESSION) KafkaConnectResources(io.strimzi.api.kafka.model.KafkaConnectResources)

Aggregations

Condition (io.strimzi.api.kafka.model.status.Condition)46 Collections (java.util.Collections)36 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)32 Vertx (io.vertx.core.Vertx)30 Labels (io.strimzi.operator.common.model.Labels)28 Future (io.vertx.core.Future)28 BeforeAll (org.junit.jupiter.api.BeforeAll)28 Map (java.util.Map)27 Test (org.junit.jupiter.api.Test)25 Promise (io.vertx.core.Promise)22 List (java.util.List)21 Checkpoint (io.vertx.junit5.Checkpoint)20 VertxExtension (io.vertx.junit5.VertxExtension)20 VertxTestContext (io.vertx.junit5.VertxTestContext)20 CoreMatchers.is (org.hamcrest.CoreMatchers.is)20 AfterAll (org.junit.jupiter.api.AfterAll)20 ExtendWith (org.junit.jupiter.api.extension.ExtendWith)20 Annotations (io.strimzi.operator.common.Annotations)18 HasMetadata (io.fabric8.kubernetes.api.model.HasMetadata)16 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)16