Search in sources :

Example 21 with MetricsAndLogging

use of io.strimzi.operator.common.MetricsAndLogging in project strimzi-kafka-operator by strimzi.

the class KafkaConnectClusterTest method testMetricsConfigMap.

@ParallelTest
public void testMetricsConfigMap() {
    ConfigMap metricsCm = kc.generateMetricsAndLogConfigMap(new MetricsAndLogging(metricsCM, null));
    checkMetricsConfigMap(metricsCm);
}
Also used : ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) MetricsAndLogging(io.strimzi.operator.common.MetricsAndLogging) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Example 22 with MetricsAndLogging

use of io.strimzi.operator.common.MetricsAndLogging in project strimzi-kafka-operator by strimzi.

the class KafkaClusterTest method testMetricsConfigMap.

@ParallelTest
public void testMetricsConfigMap() {
    ConfigMap metricsCm = kc.generateMetricsAndLogConfigMap(new MetricsAndLogging(metricsCM, null));
    checkMetricsConfigMap(metricsCm);
    checkOwnerReference(kc.createOwnerReference(), metricsCm);
}
Also used : ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) MetricsAndLogging(io.strimzi.operator.common.MetricsAndLogging) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Example 23 with MetricsAndLogging

use of io.strimzi.operator.common.MetricsAndLogging in project strimzi-kafka-operator by strimzi.

the class KafkaMirrorMakerClusterTest method testMetricsConfigMap.

@ParallelTest
public void testMetricsConfigMap() {
    ConfigMap metricsCm = mm.generateMetricsAndLogConfigMap(new MetricsAndLogging(metricsCM, null));
    checkMetricsConfigMap(metricsCm);
}
Also used : ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) MetricsAndLogging(io.strimzi.operator.common.MetricsAndLogging) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Example 24 with MetricsAndLogging

use of io.strimzi.operator.common.MetricsAndLogging in project strimzi-kafka-operator by strimzi.

the class KafkaMirrorMaker2ClusterTest method testMetricsConfigMap.

@ParallelTest
public void testMetricsConfigMap() {
    ConfigMap metricsCm = kmm2.generateMetricsAndLogConfigMap(new MetricsAndLogging(metricsCM, null));
    checkMetricsConfigMap(metricsCm);
}
Also used : ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) MetricsAndLogging(io.strimzi.operator.common.MetricsAndLogging) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Example 25 with MetricsAndLogging

use of io.strimzi.operator.common.MetricsAndLogging in project strimzi-kafka-operator by strimzi.

the class KafkaMirrorMaker2ClusterTest method testNetworkPolicy.

@ParallelTest
public void testNetworkPolicy() {
    KafkaMirrorMaker2 resource = new KafkaMirrorMaker2Builder(this.resourceWithMetrics).build();
    KafkaMirrorMaker2Cluster kc = KafkaMirrorMaker2Cluster.fromCrd(Reconciliation.DUMMY_RECONCILIATION, resource, VERSIONS);
    kc.generateMetricsAndLogConfigMap(new MetricsAndLogging(metricsCM, null));
    NetworkPolicy np = kc.generateNetworkPolicy(true, "operator-namespace", null);
    assertThat(np.getMetadata().getName(), is(kc.getName()));
    assertThat(np.getSpec().getPodSelector().getMatchLabels(), is(kc.getSelectorLabels().toMap()));
    assertThat(np.getSpec().getIngress().size(), is(2));
    assertThat(np.getSpec().getIngress().get(0).getPorts().size(), is(1));
    assertThat(np.getSpec().getIngress().get(0).getPorts().get(0).getPort().getIntVal(), is(KafkaConnectCluster.REST_API_PORT));
    assertThat(np.getSpec().getIngress().get(0).getFrom().size(), is(2));
    assertThat(np.getSpec().getIngress().get(0).getFrom().get(0).getPodSelector().getMatchLabels(), is(kc.getSelectorLabels().toMap()));
    assertThat(np.getSpec().getIngress().get(0).getFrom().get(0).getNamespaceSelector(), is(nullValue()));
    assertThat(np.getSpec().getIngress().get(0).getFrom().get(1).getPodSelector().getMatchLabels(), is(singletonMap(Labels.STRIMZI_KIND_LABEL, "cluster-operator")));
    assertThat(np.getSpec().getIngress().get(0).getFrom().get(1).getNamespaceSelector().getMatchLabels(), is(nullValue()));
    assertThat(np.getSpec().getIngress().get(1).getPorts().size(), is(1));
    assertThat(np.getSpec().getIngress().get(1).getPorts().get(0).getPort().getIntVal(), is(KafkaConnectCluster.METRICS_PORT));
}
Also used : KafkaMirrorMaker2Builder(io.strimzi.api.kafka.model.KafkaMirrorMaker2Builder) NetworkPolicy(io.fabric8.kubernetes.api.model.networking.v1.NetworkPolicy) MetricsAndLogging(io.strimzi.operator.common.MetricsAndLogging) KafkaMirrorMaker2(io.strimzi.api.kafka.model.KafkaMirrorMaker2) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Aggregations

MetricsAndLogging (io.strimzi.operator.common.MetricsAndLogging)32 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)16 StrimziPodSetList (io.strimzi.api.kafka.StrimziPodSetList)16 Kafka (io.strimzi.api.kafka.model.Kafka)16 KafkaBuilder (io.strimzi.api.kafka.model.KafkaBuilder)16 StrimziPodSet (io.strimzi.api.kafka.model.StrimziPodSet)16 GenericKafkaListenerBuilder (io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListenerBuilder)16 KafkaStatus (io.strimzi.api.kafka.model.status.KafkaStatus)16 PlatformFeaturesAvailability (io.strimzi.operator.PlatformFeaturesAvailability)16 KafkaCluster (io.strimzi.operator.cluster.model.KafkaCluster)16 ResourceOperatorSupplier (io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier)16 StatefulSetOperator (io.strimzi.operator.cluster.operator.resource.StatefulSetOperator)16 Reconciliation (io.strimzi.operator.common.Reconciliation)16 Labels (io.strimzi.operator.common.model.Labels)16 ConfigMapOperator (io.strimzi.operator.common.operator.resource.ConfigMapOperator)16 CrdOperator (io.strimzi.operator.common.operator.resource.CrdOperator)16 NodeOperator (io.strimzi.operator.common.operator.resource.NodeOperator)16 PodOperator (io.strimzi.operator.common.operator.resource.PodOperator)16 ParallelTest (io.strimzi.test.annotations.ParallelTest)16 Checkpoint (io.vertx.junit5.Checkpoint)16