Search in sources :

Example 1 with KafkaJmxOptions

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

the class KafkaAssemblyOperatorTest method testCreateClusterWithJmxEnabled.

@ParameterizedTest
@MethodSource("data")
public void testCreateClusterWithJmxEnabled(Params params, VertxTestContext context) {
    setFields(params);
    Kafka kafka = getKafkaAssembly("foo");
    KafkaJmxOptions jmxOptions = new KafkaJmxOptionsBuilder().withAuthentication(new KafkaJmxAuthenticationPasswordBuilder().build()).build();
    kafka.getSpec().getKafka().setJmxOptions(jmxOptions);
    kafka.getSpec().getZookeeper().setJmxOptions(jmxOptions);
    Secret kafkaJmxSecret = new SecretBuilder().withNewMetadata().withName(KafkaCluster.jmxSecretName("foo")).withNamespace("test").endMetadata().withData(singletonMap("foo", "bar")).build();
    Secret zookeeperJmxSecret = new SecretBuilder().withNewMetadata().withName(ZookeeperCluster.jmxSecretName("foo")).withNamespace("test").endMetadata().withData(singletonMap("foo", "bar")).build();
    createCluster(context, kafka, List.of(kafkaJmxSecret, zookeeperJmxSecret));
// getInitialCertificates(getKafkaAssembly("foo").getMetadata().getName()));
}
Also used : Secret(io.fabric8.kubernetes.api.model.Secret) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) KafkaJmxOptionsBuilder(io.strimzi.api.kafka.model.KafkaJmxOptionsBuilder) KafkaJmxOptions(io.strimzi.api.kafka.model.KafkaJmxOptions) Kafka(io.strimzi.api.kafka.model.Kafka) KafkaJmxAuthenticationPasswordBuilder(io.strimzi.api.kafka.model.KafkaJmxAuthenticationPasswordBuilder) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 2 with KafkaJmxOptions

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

the class KafkaAssemblyOperatorTest method testUpdateClusterAuthenticationTrue.

@ParameterizedTest
@MethodSource("data")
public void testUpdateClusterAuthenticationTrue(Params params, VertxTestContext context) {
    setFields(params);
    Kafka kafkaAssembly = getKafkaAssembly("bar");
    KafkaJmxOptions kafkaJmxOptions = new KafkaJmxOptionsBuilder().withAuthentication(new KafkaJmxAuthenticationPasswordBuilder().build()).build();
    kafkaAssembly.getSpec().getKafka().setJmxOptions(kafkaJmxOptions);
    kafkaAssembly.getSpec().getZookeeper().setJmxOptions(kafkaJmxOptions);
    updateCluster(context, getKafkaAssembly("bar"), kafkaAssembly);
}
Also used : KafkaJmxOptionsBuilder(io.strimzi.api.kafka.model.KafkaJmxOptionsBuilder) KafkaJmxOptions(io.strimzi.api.kafka.model.KafkaJmxOptions) Kafka(io.strimzi.api.kafka.model.Kafka) KafkaJmxAuthenticationPasswordBuilder(io.strimzi.api.kafka.model.KafkaJmxAuthenticationPasswordBuilder) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 3 with KafkaJmxOptions

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

the class KafkaAssemblyOperatorTest method testUpdateClusterAuthenticationTrue.

@ParameterizedTest
@MethodSource("data")
public void testUpdateClusterAuthenticationTrue(Params params, VertxTestContext context) {
    setFields(params);
    Kafka kafkaAssembly = getKafkaAssembly("bar");
    KafkaJmxOptions kafkaJmxOptions = new KafkaJmxOptionsBuilder().withAuthentication(new KafkaJmxAuthenticationPasswordBuilder().build()).build();
    kafkaAssembly.getSpec().getKafka().setJmxOptions(kafkaJmxOptions);
    kafkaAssembly.getSpec().getZookeeper().setJmxOptions(kafkaJmxOptions);
    updateCluster(context, getKafkaAssembly("bar"), kafkaAssembly);
}
Also used : KafkaJmxOptionsBuilder(io.strimzi.api.kafka.model.KafkaJmxOptionsBuilder) KafkaJmxOptions(io.strimzi.api.kafka.model.KafkaJmxOptions) Kafka(io.strimzi.api.kafka.model.Kafka) KafkaJmxAuthenticationPasswordBuilder(io.strimzi.api.kafka.model.KafkaJmxAuthenticationPasswordBuilder) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 4 with KafkaJmxOptions

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

the class KafkaAssemblyOperatorTest method testCreateClusterWithJmxEnabled.

@ParameterizedTest
@MethodSource("data")
public void testCreateClusterWithJmxEnabled(Params params, VertxTestContext context) {
    setFields(params);
    Kafka kafka = getKafkaAssembly("foo");
    KafkaJmxOptions jmxOptions = new KafkaJmxOptionsBuilder().withAuthentication(new KafkaJmxAuthenticationPasswordBuilder().build()).build();
    kafka.getSpec().getKafka().setJmxOptions(jmxOptions);
    kafka.getSpec().getZookeeper().setJmxOptions(jmxOptions);
    Secret kafkaJmxSecret = new SecretBuilder().withNewMetadata().withName(KafkaCluster.jmxSecretName("foo")).withNamespace("test").endMetadata().withData(singletonMap("foo", "bar")).build();
    Secret zookeeperJmxSecret = new SecretBuilder().withNewMetadata().withName(ZookeeperCluster.jmxSecretName("foo")).withNamespace("test").endMetadata().withData(singletonMap("foo", "bar")).build();
    createCluster(context, kafka, List.of(kafkaJmxSecret, zookeeperJmxSecret));
// getInitialCertificates(getKafkaAssembly("foo").getMetadata().getName()));
}
Also used : Secret(io.fabric8.kubernetes.api.model.Secret) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) KafkaJmxOptionsBuilder(io.strimzi.api.kafka.model.KafkaJmxOptionsBuilder) KafkaJmxOptions(io.strimzi.api.kafka.model.KafkaJmxOptions) Kafka(io.strimzi.api.kafka.model.Kafka) KafkaJmxAuthenticationPasswordBuilder(io.strimzi.api.kafka.model.KafkaJmxAuthenticationPasswordBuilder) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Aggregations

Kafka (io.strimzi.api.kafka.model.Kafka)4 KafkaJmxAuthenticationPasswordBuilder (io.strimzi.api.kafka.model.KafkaJmxAuthenticationPasswordBuilder)4 KafkaJmxOptions (io.strimzi.api.kafka.model.KafkaJmxOptions)4 KafkaJmxOptionsBuilder (io.strimzi.api.kafka.model.KafkaJmxOptionsBuilder)4 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)4 MethodSource (org.junit.jupiter.params.provider.MethodSource)4 Secret (io.fabric8.kubernetes.api.model.Secret)2 SecretBuilder (io.fabric8.kubernetes.api.model.SecretBuilder)2