Search in sources :

Example 1 with KafkaClusterSpecBuilder

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

the class KRaftUtilsTest method testJbodStorageWithMultipleDisks.

@ParallelTest
public void testJbodStorageWithMultipleDisks() {
    Set<String> errors = new HashSet<>(0);
    KafkaClusterSpec kcs = new KafkaClusterSpecBuilder().withNewJbodStorage().withVolumes(new PersistentClaimStorageBuilder().withId(0).withSize("100Gi").build(), new PersistentClaimStorageBuilder().withId(1).withSize("100Gi").build()).endJbodStorage().build();
    KRaftUtils.validateKafkaSpec(errors, kcs);
    assertThat(errors, is(Set.of("Using more than one disk in a JBOD storage is currently not supported when the UseKRaft feature gate is enabled")));
}
Also used : KafkaClusterSpec(io.strimzi.api.kafka.model.KafkaClusterSpec) PersistentClaimStorageBuilder(io.strimzi.api.kafka.model.storage.PersistentClaimStorageBuilder) KafkaClusterSpecBuilder(io.strimzi.api.kafka.model.KafkaClusterSpecBuilder) HashSet(java.util.HashSet) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Example 2 with KafkaClusterSpecBuilder

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

the class KRaftUtilsTest method testJbodStorageWithOneDisk.

@ParallelTest
public void testJbodStorageWithOneDisk() {
    Set<String> errors = new HashSet<>(0);
    KafkaClusterSpec kcs = new KafkaClusterSpecBuilder().withNewJbodStorage().withVolumes(new PersistentClaimStorageBuilder().withId(0).withSize("100Gi").build()).endJbodStorage().build();
    KRaftUtils.validateKafkaSpec(errors, kcs);
    assertThat(errors, is(Set.of()));
}
Also used : KafkaClusterSpec(io.strimzi.api.kafka.model.KafkaClusterSpec) PersistentClaimStorageBuilder(io.strimzi.api.kafka.model.storage.PersistentClaimStorageBuilder) KafkaClusterSpecBuilder(io.strimzi.api.kafka.model.KafkaClusterSpecBuilder) HashSet(java.util.HashSet) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Example 3 with KafkaClusterSpecBuilder

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

the class KRaftUtilsTest method testKafkaScramSha512Listener.

@ParallelTest
public void testKafkaScramSha512Listener() {
    Set<String> errors = new HashSet<>(0);
    KafkaClusterSpec kcs = new KafkaClusterSpecBuilder().withListeners(new GenericKafkaListenerBuilder().withName("listener").withPort(9092).withTls(true).withType(KafkaListenerType.INTERNAL).withNewKafkaListenerAuthenticationScramSha512Auth().endKafkaListenerAuthenticationScramSha512Auth().build()).build();
    KRaftUtils.validateKafkaSpec(errors, kcs);
    assertThat(errors, is(Set.of("Authentication of type 'scram-sha-512` is currently not supported when the UseKRaft feature gate is enabled")));
}
Also used : KafkaClusterSpec(io.strimzi.api.kafka.model.KafkaClusterSpec) GenericKafkaListenerBuilder(io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListenerBuilder) KafkaClusterSpecBuilder(io.strimzi.api.kafka.model.KafkaClusterSpecBuilder) HashSet(java.util.HashSet) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Example 4 with KafkaClusterSpecBuilder

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

the class KRaftUtilsTest method testKafkaScramSha512Listener.

@ParallelTest
public void testKafkaScramSha512Listener() {
    Set<String> errors = new HashSet<>(0);
    KafkaClusterSpec kcs = new KafkaClusterSpecBuilder().withListeners(new GenericKafkaListenerBuilder().withName("listener").withPort(9092).withTls(true).withType(KafkaListenerType.INTERNAL).withNewKafkaListenerAuthenticationScramSha512Auth().endKafkaListenerAuthenticationScramSha512Auth().build()).build();
    KRaftUtils.validateKafkaSpec(errors, kcs);
    assertThat(errors, is(Set.of("Authentication of type 'scram-sha-512` is currently not supported when the UseKRaft feature gate is enabled")));
}
Also used : KafkaClusterSpec(io.strimzi.api.kafka.model.KafkaClusterSpec) GenericKafkaListenerBuilder(io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListenerBuilder) KafkaClusterSpecBuilder(io.strimzi.api.kafka.model.KafkaClusterSpecBuilder) HashSet(java.util.HashSet) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Example 5 with KafkaClusterSpecBuilder

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

the class KRaftUtilsTest method testJbodStorageWithMultipleDisks.

@ParallelTest
public void testJbodStorageWithMultipleDisks() {
    Set<String> errors = new HashSet<>(0);
    KafkaClusterSpec kcs = new KafkaClusterSpecBuilder().withNewJbodStorage().withVolumes(new PersistentClaimStorageBuilder().withId(0).withSize("100Gi").build(), new PersistentClaimStorageBuilder().withId(1).withSize("100Gi").build()).endJbodStorage().build();
    KRaftUtils.validateKafkaSpec(errors, kcs);
    assertThat(errors, is(Set.of("Using more than one disk in a JBOD storage is currently not supported when the UseKRaft feature gate is enabled")));
}
Also used : KafkaClusterSpec(io.strimzi.api.kafka.model.KafkaClusterSpec) PersistentClaimStorageBuilder(io.strimzi.api.kafka.model.storage.PersistentClaimStorageBuilder) KafkaClusterSpecBuilder(io.strimzi.api.kafka.model.KafkaClusterSpecBuilder) HashSet(java.util.HashSet) ParallelTest(io.strimzi.test.annotations.ParallelTest)

Aggregations

KafkaClusterSpec (io.strimzi.api.kafka.model.KafkaClusterSpec)6 KafkaClusterSpecBuilder (io.strimzi.api.kafka.model.KafkaClusterSpecBuilder)6 ParallelTest (io.strimzi.test.annotations.ParallelTest)6 HashSet (java.util.HashSet)6 PersistentClaimStorageBuilder (io.strimzi.api.kafka.model.storage.PersistentClaimStorageBuilder)4 GenericKafkaListenerBuilder (io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListenerBuilder)2