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);
}
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);
}
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);
}
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);
}
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));
}
Aggregations