Search in sources :

Example 6 with ManagedKafka

use of org.bf2.operator.resources.v1alpha1.ManagedKafka in project kas-fleetshard by bf2fc6cc711aee1a0c2a.

the class KafkaCluster method addKafkaAuthorizerConfig.

private void addKafkaAuthorizerConfig(ManagedKafka managedKafka, Map<String, Object> config) {
    List<String> owners = managedKafka.getSpec().getOwners();
    AtomicInteger aclCount = new AtomicInteger(0);
    AtomicInteger aclLoggingCount = new AtomicInteger(0);
    AccessControl aclConfig = getAclConfig(managedKafka);
    final String configPrefix = aclConfig.getConfigPrefix();
    final String allowedListenersKey = configPrefix + "allowed-listeners";
    final String resourceOperationsKey = configPrefix + "resource-operations";
    final String aclKeyPrefix = configPrefix + "acl";
    final String aclLoggingKeyPrefix = aclKeyPrefix + ".logging";
    final String aclKeyTemplate = aclKeyPrefix + ".%03d";
    final String aclLoggingKeyTemplate = aclLoggingKeyPrefix + ".%03d";
    // Deprecated option: Remove when canary, must-gather, and SRE are configured via ManagedKafka CR
    if (aclConfig.allowedListeners != null) {
        config.put(allowedListenersKey, aclConfig.allowedListeners);
    }
    if (aclConfig.getLoggingSuppressionWindow() != null) {
        String key = aclLoggingKeyPrefix + ".suppressionWindow";
        if (aclConfig.getLoggingSuppressionWindow().getDuration() != null) {
            config.put(key + ".duration", aclConfig.getLoggingSuppressionWindow().getDuration());
        }
        if (aclConfig.getLoggingSuppressionWindow().getApis() != null) {
            config.put(key + ".apis", aclConfig.getLoggingSuppressionWindow().getApis());
        }
        if (aclConfig.getLoggingSuppressionWindow().getEventCount() != null) {
            config.put(key + ".eventCount", aclConfig.getLoggingSuppressionWindow().getEventCount());
        }
    }
    addAcl(aclConfig.getGlobal(), "", aclKeyTemplate, aclCount, config);
    addAcl(aclConfig.getLogging(), "", aclLoggingKeyTemplate, aclLoggingCount, config);
    config.put(resourceOperationsKey, aclConfig.getResourceOperations());
    for (String owner : owners) {
        addAcl(aclConfig.getOwner(), owner, aclKeyTemplate, aclCount, config);
    }
    Objects.requireNonNullElse(managedKafka.getSpec().getServiceAccounts(), Collections.<ServiceAccount>emptyList()).stream().forEach(account -> {
        String aclKey = String.format(SERVICE_ACCOUNT_KEY, account.getName());
        applicationConfig.getOptionalValue(aclKey, String.class).ifPresent(acl -> addAcl(acl, account.getPrincipal(), aclKeyTemplate, aclCount, config));
    });
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) AccessControl(org.bf2.operator.operands.KafkaInstanceConfiguration.AccessControl)

Example 7 with ManagedKafka

use of org.bf2.operator.resources.v1alpha1.ManagedKafka in project kas-fleetshard by bf2fc6cc711aee1a0c2a.

the class KafkaCluster method calculateRetentionSize.

/**
 * Get the current sum of storage as reported by the pvcs.
 * This may not match the requested amount ephemerally, or due to rounding
 */
@Override
public Quantity calculateRetentionSize(ManagedKafka managedKafka) {
    Kafka current = cachedKafka(managedKafka);
    long storageInGbs = informerManager.getPvcsInNamespace(managedKafka.getMetadata().getNamespace()).stream().map(pvc -> {
        if (pvc.getStatus() == null) {
            return 0L;
        }
        PersistentVolumeClaimStatus status = pvc.getStatus();
        Quantity q = OperandUtils.getOrDefault(status.getCapacity(), "storage", (Quantity) null);
        if (q == null) {
            return 0L;
        }
        long value = Quantity.getAmountInBytes(q).longValue();
        // round down to the nearest GB - the PVC request is automatically rounded up
        return (long) Math.floor(((double) unpadBrokerStorage(managedKafka, current, value)) / (1L << 30));
    }).collect(Collectors.summingLong(Long::longValue));
    Quantity capacity = managedKafka.getSpec().getCapacity().getMaxDataRetentionSize();
    // try to correct for the overall rounding
    if (storageInGbs > 0 && (capacity == null || ("Gi".equals(capacity.getFormat()) && (Quantity.getAmountInBytes(capacity).longValue() / (1L << 30)) % getBrokerReplicas(managedKafka, current) != 0))) {
        storageInGbs++;
    }
    return Quantity.parse(String.format("%sGi", storageInGbs));
}
Also used : Quantity(io.fabric8.kubernetes.api.model.Quantity) KafkaClusterSpec(io.strimzi.api.kafka.model.KafkaClusterSpec) PodAffinityTerm(io.fabric8.kubernetes.api.model.PodAffinityTerm) LabelSelector(io.fabric8.kubernetes.api.model.LabelSelector) ImagePullSecretManager(org.bf2.operator.managers.ImagePullSecretManager) Storage(io.strimzi.api.kafka.model.storage.Storage) Rack(io.strimzi.api.kafka.model.Rack) StrimziManager(org.bf2.operator.managers.StrimziManager) Resource(io.fabric8.kubernetes.client.dsl.Resource) JvmOptionsBuilder(io.strimzi.api.kafka.model.JvmOptionsBuilder) PersistentClaimStorage(io.strimzi.api.kafka.model.storage.PersistentClaimStorage) ResourceRequirements(io.fabric8.kubernetes.api.model.ResourceRequirements) ConfigMapKeySelector(io.fabric8.kubernetes.api.model.ConfigMapKeySelector) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) KafkaClusterTemplate(io.strimzi.api.kafka.model.template.KafkaClusterTemplate) SystemProperty(io.strimzi.api.kafka.model.SystemProperty) Map(java.util.Map) KafkaExporterSpec(io.strimzi.api.kafka.model.KafkaExporterSpec) KafkaSpec(io.strimzi.api.kafka.model.KafkaSpec) KafkaManager(org.bf2.operator.managers.KafkaManager) Instance(javax.enterprise.inject.Instance) ExternalLogging(io.strimzi.api.kafka.model.ExternalLogging) ZookeeperClusterTemplateBuilder(io.strimzi.api.kafka.model.template.ZookeeperClusterTemplateBuilder) JvmOptions(io.strimzi.api.kafka.model.JvmOptions) JbodStorageBuilder(io.strimzi.api.kafka.model.storage.JbodStorageBuilder) OperandUtils(org.bf2.common.OperandUtils) DrainCleanerManager(org.bf2.operator.managers.DrainCleanerManager) Config(org.eclipse.microprofile.config.Config) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) PodAffinityTermBuilder(io.fabric8.kubernetes.api.model.PodAffinityTermBuilder) Startup(io.quarkus.runtime.Startup) List(java.util.List) RackBuilder(io.strimzi.api.kafka.model.RackBuilder) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) Optional(java.util.Optional) ApplicationScoped(javax.enterprise.context.ApplicationScoped) TopologySpreadConstraintBuilder(io.fabric8.kubernetes.api.model.TopologySpreadConstraintBuilder) ManagedKafka(org.bf2.operator.resources.v1alpha1.ManagedKafka) DatatypeConverter(javax.xml.bind.DatatypeConverter) ZookeeperClusterTemplate(io.strimzi.api.kafka.model.template.ZookeeperClusterTemplate) PersistentVolumeClaimStatus(io.fabric8.kubernetes.api.model.PersistentVolumeClaimStatus) Context(io.javaoperatorsdk.operator.api.Context) ZookeeperClusterSpec(io.strimzi.api.kafka.model.ZookeeperClusterSpec) ExternalLoggingBuilder(io.strimzi.api.kafka.model.ExternalLoggingBuilder) MessageDigest(java.security.MessageDigest) Logger(org.jboss.logging.Logger) ResourceRequirementsBuilder(io.fabric8.kubernetes.api.model.ResourceRequirementsBuilder) KafkaAuthorizationCustomBuilder(io.strimzi.api.kafka.model.KafkaAuthorizationCustomBuilder) SingleVolumeStorage(io.strimzi.api.kafka.model.storage.SingleVolumeStorage) HashMap(java.util.HashMap) Supplier(java.util.function.Supplier) KafkaBuilder(io.strimzi.api.kafka.model.KafkaBuilder) Inject(javax.inject.Inject) PodDisruptionBudgetTemplateBuilder(io.strimzi.api.kafka.model.template.PodDisruptionBudgetTemplateBuilder) DefaultBean(io.quarkus.arc.DefaultBean) PersistentClaimStorageBuilder(io.strimzi.api.kafka.model.storage.PersistentClaimStorageBuilder) PodAntiAffinity(io.fabric8.kubernetes.api.model.PodAntiAffinity) ExternalConfigurationReferenceBuilder(io.strimzi.api.kafka.model.ExternalConfigurationReferenceBuilder) JmxPrometheusExporterMetricsBuilder(io.strimzi.api.kafka.model.JmxPrometheusExporterMetricsBuilder) KafkaAuthorization(io.strimzi.api.kafka.model.KafkaAuthorization) KafkaClusterTemplateBuilder(io.strimzi.api.kafka.model.template.KafkaClusterTemplateBuilder) MetricsConfig(io.strimzi.api.kafka.model.MetricsConfig) SecuritySecretManager(org.bf2.operator.managers.SecuritySecretManager) PodAffinity(io.fabric8.kubernetes.api.model.PodAffinity) PodAntiAffinityBuilder(io.fabric8.kubernetes.api.model.PodAntiAffinityBuilder) Versions(org.bf2.operator.resources.v1alpha1.Versions) JbodStorage(io.strimzi.api.kafka.model.storage.JbodStorage) TopologySpreadConstraint(io.fabric8.kubernetes.api.model.TopologySpreadConstraint) IngressControllerManager(org.bf2.operator.managers.IngressControllerManager) Toleration(io.fabric8.kubernetes.api.model.Toleration) IOException(java.io.IOException) PodTemplateBuilder(io.strimzi.api.kafka.model.template.PodTemplateBuilder) ServiceAccount(org.bf2.operator.resources.v1alpha1.ServiceAccount) TolerationBuilder(io.fabric8.kubernetes.api.model.TolerationBuilder) ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) AffinityBuilder(io.fabric8.kubernetes.api.model.AffinityBuilder) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) ManagedKafkaAuthenticationOAuth(org.bf2.operator.resources.v1alpha1.ManagedKafkaAuthenticationOAuth) KafkaExporterSpecBuilder(io.strimzi.api.kafka.model.KafkaExporterSpecBuilder) AccessControl(org.bf2.operator.operands.KafkaInstanceConfiguration.AccessControl) SystemPropertyBuilder(io.strimzi.api.kafka.model.SystemPropertyBuilder) ConfigMapKeySelectorBuilder(io.fabric8.kubernetes.api.model.ConfigMapKeySelectorBuilder) DigestInputStream(java.security.DigestInputStream) PodNested(io.strimzi.api.kafka.model.template.ZookeeperClusterTemplateFluent.PodNested) ConfigProperty(org.eclipse.microprofile.config.inject.ConfigProperty) Kafka(io.strimzi.api.kafka.model.Kafka) Collections(java.util.Collections) InputStream(java.io.InputStream) ManagedKafka(org.bf2.operator.resources.v1alpha1.ManagedKafka) Kafka(io.strimzi.api.kafka.model.Kafka) PersistentVolumeClaimStatus(io.fabric8.kubernetes.api.model.PersistentVolumeClaimStatus) Quantity(io.fabric8.kubernetes.api.model.Quantity)

Example 8 with ManagedKafka

use of org.bf2.operator.resources.v1alpha1.ManagedKafka in project kas-fleetshard by bf2fc6cc711aee1a0c2a.

the class KafkaInstance method getReadiness.

@Override
public OperandReadiness getReadiness(ManagedKafka managedKafka) {
    if (managedKafka.getSpec().isDeleted()) {
        // TODO: it may be a good idea to offer a message here as well
        return new OperandReadiness(isDeleted(managedKafka) ? Status.False : Status.Unknown, Reason.Deleted, null);
    }
    List<OperandReadiness> readiness = operands.stream().map(o -> o.getReadiness(managedKafka)).filter(Objects::nonNull).collect(Collectors.toList());
    // default to the first reason, with can come from the kafka by the order of the operands
    Reason reason = readiness.stream().map(OperandReadiness::getReason).filter(Objects::nonNull).findFirst().orElse(null);
    // default the status to false or unknown if any are unknown
    Status status = readiness.stream().anyMatch(r -> Status.Unknown.equals(r.getStatus())) ? Status.Unknown : Status.False;
    // combine all the messages
    String message = readiness.stream().map(OperandReadiness::getMessage).filter(Objects::nonNull).collect(Collectors.joining("; "));
    // override in particular scenarios
    if (readiness.stream().allMatch(r -> Status.True.equals(r.getStatus()))) {
        status = Status.True;
    } else if (readiness.stream().anyMatch(r -> Reason.Installing.equals(r.getReason()))) {
        // may mask other error states
        reason = Reason.Installing;
    } else if (readiness.stream().anyMatch(r -> Reason.Error.equals(r.getReason()))) {
        reason = Reason.Error;
    }
    return new OperandReadiness(status, reason, message);
}
Also used : Status(org.bf2.operator.resources.v1alpha1.ManagedKafkaCondition.Status) Context(io.javaoperatorsdk.operator.api.Context) Arrays(java.util.Arrays) ImagePullSecretManager(org.bf2.operator.managers.ImagePullSecretManager) Status(org.bf2.operator.resources.v1alpha1.ManagedKafkaCondition.Status) Reason(org.bf2.operator.resources.v1alpha1.ManagedKafkaCondition.Reason) Deque(java.util.Deque) Collectors(java.util.stream.Collectors) Inject(javax.inject.Inject) Objects(java.util.Objects) List(java.util.List) PostConstruct(javax.annotation.PostConstruct) ApplicationScoped(javax.enterprise.context.ApplicationScoped) ArrayDeque(java.util.ArrayDeque) ManagedKafka(org.bf2.operator.resources.v1alpha1.ManagedKafka) Objects(java.util.Objects) Reason(org.bf2.operator.resources.v1alpha1.ManagedKafkaCondition.Reason)

Example 9 with ManagedKafka

use of org.bf2.operator.resources.v1alpha1.ManagedKafka in project kas-fleetshard by bf2fc6cc711aee1a0c2a.

the class IngressControllerManagerTest method testGetManagedKafkaRoutesFor.

@Test
public void testGetManagedKafkaRoutesFor() {
    final String mkName = "my-managedkafka";
    ManagedKafka mk = new ManagedKafkaBuilder().withNewMetadata().withName(mkName).withNamespace(mkName).endMetadata().withSpec(new ManagedKafkaSpecBuilder().withNewEndpoint().withBootstrapServerHost("bs.bf2.example.tld").endEndpoint().build()).build();
    final Function<? super String, ? extends Route> makeRoute = broker -> new RouteBuilder().editOrNewMetadata().withName(mkName + "-" + broker.replace("broker", "kafka")).withNamespace(mkName).addNewOwnerReference().withApiVersion(Kafka.V1BETA2).withKind(Kafka.RESOURCE_KIND).withName(AbstractKafkaCluster.kafkaClusterName(mk)).endOwnerReference().endMetadata().editOrNewSpec().withHost(broker + "-bs.bf2.example.tld").withTo(new RouteTargetReferenceBuilder().withKind("Service").withName(mkName + "-" + broker).withWeight(100).build()).endSpec().build();
    final Function<? super String, ? extends Service> suffixToService = suffix -> new ServiceBuilder().editOrNewMetadata().withName(mkName + "-" + suffix).withNamespace(mkName).endMetadata().editOrNewSpec().withSelector(Map.of("dummy-label", mkName + "-" + suffix)).endSpec().build();
    final Function<? super String, ? extends Pod> suffixToPod = suffix -> new PodBuilder().editOrNewMetadata().withName(mkName + "-" + suffix).withNamespace(mkName).addToLabels(Map.of("dummy-label", mkName + "-" + suffix, "app.kubernetes.io/name", "kafka", OperandUtils.MANAGED_BY_LABEL, OperandUtils.STRIMZI_OPERATOR_NAME)).endMetadata().editOrNewSpec().withNodeName("zone" + "-" + suffix).endSpec().build();
    final Function<? super String, ? extends Node> suffixToNode = suffix -> new NodeBuilder().editOrNewMetadata().withName("zone" + "-" + suffix).withLabels(Map.of(IngressControllerManager.TOPOLOGY_KEY, "zone" + "-" + suffix, IngressControllerManager.WORKER_NODE_LABEL, "true")).endMetadata().build();
    List<String> suffixes = List.of("broker-0", "broker-1", "broker-2");
    suffixes.stream().map(makeRoute).forEach(route -> openShiftClient.routes().inNamespace(mkName).createOrReplace(route));
    suffixes.stream().map(suffixToService).forEach(svc -> openShiftClient.services().inNamespace(mkName).createOrReplace(svc));
    suffixes.stream().map(suffixToPod).forEach(pod -> openShiftClient.pods().inNamespace(mkName).createOrReplace(pod));
    suffixes.stream().map(suffixToNode).forEach(node -> openShiftClient.nodes().createOrReplace(node));
    ingressControllerManager.reconcileIngressControllers();
    List<ManagedKafkaRoute> managedKafkaRoutes = ingressControllerManager.getManagedKafkaRoutesFor(mk);
    assertEquals(5, managedKafkaRoutes.size());
    assertEquals(managedKafkaRoutes.stream().sorted(Comparator.comparing(ManagedKafkaRoute::getName)).collect(Collectors.toList()), managedKafkaRoutes, "Expected list of ManagedKafkaRoutes to be sorted by name");
    assertEquals("admin-server", managedKafkaRoutes.get(0).getName());
    assertEquals("admin-server", managedKafkaRoutes.get(0).getPrefix());
    assertEquals("ingresscontroller.kas.testing.domain.tld", managedKafkaRoutes.get(0).getRouter());
    assertEquals("bootstrap", managedKafkaRoutes.get(1).getName());
    assertEquals("", managedKafkaRoutes.get(1).getPrefix());
    assertEquals("ingresscontroller.kas.testing.domain.tld", managedKafkaRoutes.get(1).getRouter());
    assertEquals("broker-0", managedKafkaRoutes.get(2).getName());
    assertEquals("broker-0", managedKafkaRoutes.get(2).getPrefix());
    assertEquals("ingresscontroller.kas-zone-broker-0.testing.domain.tld", managedKafkaRoutes.get(2).getRouter());
    assertEquals("broker-1", managedKafkaRoutes.get(3).getName());
    assertEquals("broker-1", managedKafkaRoutes.get(3).getPrefix());
    assertEquals("ingresscontroller.kas-zone-broker-1.testing.domain.tld", managedKafkaRoutes.get(3).getRouter());
    assertEquals("broker-2", managedKafkaRoutes.get(4).getName());
    assertEquals("broker-2", managedKafkaRoutes.get(4).getPrefix());
    assertEquals("ingresscontroller.kas-zone-broker-2.testing.domain.tld", managedKafkaRoutes.get(4).getRouter());
}
Also used : Quantity(io.fabric8.kubernetes.api.model.Quantity) IntStream(java.util.stream.IntStream) BeforeEach(org.junit.jupiter.api.BeforeEach) KubernetesServerTestResource(io.quarkus.test.kubernetes.client.KubernetesServerTestResource) QuarkusMock(io.quarkus.test.junit.QuarkusMock) KubernetesCrudDispatcher(io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher) ManagedKafkaRoute(org.bf2.operator.resources.v1alpha1.ManagedKafkaRoute) Function(java.util.function.Function) QuarkusTest(io.quarkus.test.junit.QuarkusTest) Inject(javax.inject.Inject) Route(io.fabric8.openshift.api.model.Route) NodeBuilder(io.fabric8.kubernetes.api.model.NodeBuilder) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) Map(java.util.Map) AbstractKafkaCluster(org.bf2.operator.operands.AbstractKafkaCluster) Service(io.fabric8.kubernetes.api.model.Service) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Node(io.fabric8.kubernetes.api.model.Node) ServiceBuilder(io.fabric8.kubernetes.api.model.ServiceBuilder) LongSummaryStatistics(java.util.LongSummaryStatistics) QuarkusTestResource(io.quarkus.test.common.QuarkusTestResource) KubernetesServer(io.fabric8.kubernetes.client.server.mock.KubernetesServer) OperandUtils(org.bf2.common.OperandUtils) RouteBuilder(io.fabric8.openshift.api.model.RouteBuilder) ManagedKafkaSpecBuilder(org.bf2.operator.resources.v1alpha1.ManagedKafkaSpecBuilder) Pod(io.fabric8.kubernetes.api.model.Pod) OpenShiftClient(io.fabric8.openshift.client.OpenShiftClient) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) Mockito(org.mockito.Mockito) AfterEach(org.junit.jupiter.api.AfterEach) List(java.util.List) KafkaCluster(org.bf2.operator.operands.KafkaCluster) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) KubernetesTestServer(io.quarkus.test.kubernetes.client.KubernetesTestServer) Kafka(io.strimzi.api.kafka.model.Kafka) Comparator(java.util.Comparator) RouteTargetReferenceBuilder(io.fabric8.openshift.api.model.RouteTargetReferenceBuilder) IngressController(io.fabric8.openshift.api.model.operator.v1.IngressController) ManagedKafka(org.bf2.operator.resources.v1alpha1.ManagedKafka) Collections(java.util.Collections) ManagedKafkaBuilder(org.bf2.operator.resources.v1alpha1.ManagedKafkaBuilder) RouteBuilder(io.fabric8.openshift.api.model.RouteBuilder) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) ManagedKafkaBuilder(org.bf2.operator.resources.v1alpha1.ManagedKafkaBuilder) NodeBuilder(io.fabric8.kubernetes.api.model.NodeBuilder) ServiceBuilder(io.fabric8.kubernetes.api.model.ServiceBuilder) ManagedKafka(org.bf2.operator.resources.v1alpha1.ManagedKafka) ManagedKafkaRoute(org.bf2.operator.resources.v1alpha1.ManagedKafkaRoute) ManagedKafkaSpecBuilder(org.bf2.operator.resources.v1alpha1.ManagedKafkaSpecBuilder) RouteTargetReferenceBuilder(io.fabric8.openshift.api.model.RouteTargetReferenceBuilder) QuarkusTest(io.quarkus.test.junit.QuarkusTest) Test(org.junit.jupiter.api.Test)

Example 10 with ManagedKafka

use of org.bf2.operator.resources.v1alpha1.ManagedKafka in project kas-fleetshard by bf2fc6cc711aee1a0c2a.

the class ConditionUtilsTest method testFindManagedKafkaCondition.

@Test
void testFindManagedKafkaCondition() {
    ManagedKafka mk = new ManagedKafkaBuilder().withMetadata(new ObjectMetaBuilder().withNamespace("test").withName("my-managed-kafka").build()).withSpec(new ManagedKafkaSpecBuilder().withNewVersions().withKafka("2.6.0").withStrimzi("0.21.1").endVersions().build()).withStatus(new ManagedKafkaStatusBuilder().addNewCondition().withStatus(Status.True.name()).withType(ManagedKafkaCondition.Type.Ready.name()).endCondition().build()).build();
    assertNotNull(ConditionUtils.findManagedKafkaCondition(mk.getStatus().getConditions(), ManagedKafkaCondition.Type.Ready).get());
}
Also used : ManagedKafka(org.bf2.operator.resources.v1alpha1.ManagedKafka) ManagedKafkaStatusBuilder(org.bf2.operator.resources.v1alpha1.ManagedKafkaStatusBuilder) ManagedKafkaSpecBuilder(org.bf2.operator.resources.v1alpha1.ManagedKafkaSpecBuilder) ManagedKafkaBuilder(org.bf2.operator.resources.v1alpha1.ManagedKafkaBuilder) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

ManagedKafka (org.bf2.operator.resources.v1alpha1.ManagedKafka)67 Kafka (io.strimzi.api.kafka.model.Kafka)30 Test (org.junit.jupiter.api.Test)24 QuarkusTest (io.quarkus.test.junit.QuarkusTest)23 List (java.util.List)16 Map (java.util.Map)15 Inject (javax.inject.Inject)15 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)15 Objects (java.util.Objects)14 Quantity (io.fabric8.kubernetes.api.model.Quantity)11 Optional (java.util.Optional)11 Collectors (java.util.stream.Collectors)10 ApplicationScoped (javax.enterprise.context.ApplicationScoped)9 StrimziManager (org.bf2.operator.managers.StrimziManager)9 Logger (org.jboss.logging.Logger)9 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)8 ArrayList (java.util.ArrayList)8 Reason (org.bf2.operator.resources.v1alpha1.ManagedKafkaCondition.Reason)8 Status (org.bf2.operator.resources.v1alpha1.ManagedKafkaCondition.Status)8 ManagedKafkaUtils.exampleManagedKafka (org.bf2.operator.utils.ManagedKafkaUtils.exampleManagedKafka)8