Search in sources :

Example 11 with KafkaUserQuotas

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

the class KafkaUserOperatorTest method testReconcileTlsExternalUser.

@Test
public void testReconcileTlsExternalUser(VertxTestContext context) {
    KafkaUser user = new KafkaUserBuilder(ResourceUtils.createKafkaUserQuotas(1000000, 2000000, 55, 10.0)).editSpec().withNewKafkaUserTlsExternalClientAuthentication().endKafkaUserTlsExternalClientAuthentication().endSpec().build();
    CrdOperator mockCrdOps = mock(CrdOperator.class);
    SecretOperator mockSecretOps = mock(SecretOperator.class);
    SimpleAclOperator aclOps = mock(SimpleAclOperator.class);
    ScramCredentialsOperator scramOps = mock(ScramCredentialsOperator.class);
    QuotasOperator quotasOps = mock(QuotasOperator.class);
    KafkaUserOperator op = new KafkaUserOperator(vertx, mockCertManager, mockCrdOps, mockSecretOps, scramOps, quotasOps, aclOps, ResourceUtils.createUserOperatorConfig());
    Secret clientsCa = ResourceUtils.createClientsCaCertSecret();
    Secret clientsCaKey = ResourceUtils.createClientsCaKeySecret();
    ArgumentCaptor<String> secretNamespaceCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<String> secretNameCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<Secret> secretCaptor = ArgumentCaptor.forClass(Secret.class);
    when(mockSecretOps.reconcile(any(), secretNamespaceCaptor.capture(), secretNameCaptor.capture(), secretCaptor.capture())).thenReturn(Future.succeededFuture());
    ArgumentCaptor<String> aclNameCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<Set<SimpleAclRule>> aclRulesCaptor = ArgumentCaptor.forClass(Set.class);
    when(aclOps.reconcile(any(), aclNameCaptor.capture(), aclRulesCaptor.capture())).thenReturn(Future.succeededFuture());
    ArgumentCaptor<String> scramUserCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<String> scramPasswordCaptor = ArgumentCaptor.forClass(String.class);
    when(scramOps.reconcile(any(), scramUserCaptor.capture(), scramPasswordCaptor.capture())).thenReturn(Future.succeededFuture());
    when(mockSecretOps.getAsync(anyString(), eq(clientsCa.getMetadata().getName()))).thenReturn(Future.succeededFuture(clientsCa));
    when(mockSecretOps.getAsync(anyString(), eq(clientsCaKey.getMetadata().getName()))).thenReturn(Future.succeededFuture(clientsCaKey));
    when(mockSecretOps.getAsync(anyString(), eq(user.getMetadata().getName()))).thenReturn(Future.succeededFuture(null));
    when(mockCrdOps.get(eq(user.getMetadata().getNamespace()), eq(user.getMetadata().getName()))).thenReturn(user);
    when(mockCrdOps.getAsync(anyString(), anyString())).thenReturn(Future.succeededFuture(user));
    when(mockCrdOps.updateStatusAsync(any(), any(KafkaUser.class))).thenReturn(Future.succeededFuture());
    ArgumentCaptor<String> quotasUserNameCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<KafkaUserQuotas> quotasCaptor = ArgumentCaptor.forClass(KafkaUserQuotas.class);
    when(quotasOps.reconcile(any(), quotasUserNameCaptor.capture(), quotasCaptor.capture())).thenReturn(Future.succeededFuture());
    Checkpoint async = context.checkpoint();
    op.reconcile(new Reconciliation("test-trigger", KafkaUser.RESOURCE_KIND, ResourceUtils.NAMESPACE, ResourceUtils.NAME)).onComplete(context.succeeding(v -> context.verify(() -> {
        List<String> capturedNames = secretNameCaptor.getAllValues();
        assertThat(capturedNames, hasSize(1));
        assertThat(capturedNames.get(0), is(ResourceUtils.NAME));
        List<String> capturedNamespaces = secretNamespaceCaptor.getAllValues();
        assertThat(capturedNamespaces, hasSize(1));
        assertThat(capturedNamespaces.get(0), is(ResourceUtils.NAMESPACE));
        List<Secret> capturedSecrets = secretCaptor.getAllValues();
        assertThat(capturedSecrets, hasSize(1));
        assertThat(capturedSecrets.get(0), is(nullValue()));
        assertThat(scramUserCaptor.getValue(), is(KafkaUserModel.getScramUserName(ResourceUtils.NAME)));
        assertThat(scramPasswordCaptor.getValue(), is(nullValue()));
        List<String> capturedAclNames = aclNameCaptor.getAllValues();
        assertThat(capturedAclNames, hasSize(2));
        assertThat(capturedAclNames.get(0), is(KafkaUserModel.getTlsUserName(ResourceUtils.NAME)));
        assertThat(capturedAclNames.get(1), is(KafkaUserModel.getScramUserName(ResourceUtils.NAME)));
        List<Set<SimpleAclRule>> capturedAcls = aclRulesCaptor.getAllValues();
        assertThat(capturedAcls, hasSize(2));
        assertThat(capturedAcls.get(0), hasSize(ResourceUtils.createExpectedSimpleAclRules(user).size()));
        assertThat(capturedAcls.get(0), is(ResourceUtils.createExpectedSimpleAclRules(user)));
        assertThat(capturedAcls.get(1), is(nullValue()));
        List<String> capturedQuotasNames = quotasUserNameCaptor.getAllValues();
        assertThat(capturedQuotasNames, hasSize(2));
        assertThat(capturedQuotasNames.get(0), is(KafkaUserModel.getTlsUserName(ResourceUtils.NAME)));
        assertThat(capturedQuotasNames.get(1), is(KafkaUserModel.getScramUserName(ResourceUtils.NAME)));
        List<KafkaUserQuotas> capturedQuotas = quotasCaptor.getAllValues();
        assertThat(capturedQuotas, hasSize(2));
        assertThat(capturedQuotas.get(0), is(notNullValue()));
        assertThat(capturedQuotas.get(0).getConsumerByteRate(), is(1000000));
        assertThat(capturedQuotas.get(0).getProducerByteRate(), is(2000000));
        assertThat(capturedQuotas.get(0).getRequestPercentage(), is(55));
        assertThat(capturedQuotas.get(0).getControllerMutationRate(), is(10.0));
        assertThat(capturedQuotas.get(1), is(nullValue()));
        async.flag();
    })));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) Arrays(java.util.Arrays) LabelSelector(io.fabric8.kubernetes.api.model.LabelSelector) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) KafkaUser(io.strimzi.api.kafka.model.KafkaUser) Collections.singletonList(java.util.Collections.singletonList) CoreMatchers.notNullValue(org.hamcrest.CoreMatchers.notNullValue) AfterAll(org.junit.jupiter.api.AfterAll) MicrometerMetricsOptions(io.vertx.micrometer.MicrometerMetricsOptions) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) BeforeAll(org.junit.jupiter.api.BeforeAll) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) KafkaUserStatus(io.strimzi.api.kafka.model.status.KafkaUserStatus) SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) VertxOptions(io.vertx.core.VertxOptions) Set(java.util.Set) VertxPrometheusOptions(io.vertx.micrometer.VertxPrometheusOptions) VertxExtension(io.vertx.junit5.VertxExtension) CopyOnWriteArraySet(java.util.concurrent.CopyOnWriteArraySet) Future(io.vertx.core.Future) StandardCharsets(java.nio.charset.StandardCharsets) Test(org.junit.jupiter.api.Test) Base64(java.util.Base64) List(java.util.List) KafkaUserQuotas(io.strimzi.api.kafka.model.KafkaUserQuotas) Labels(io.strimzi.operator.common.model.Labels) Secret(io.fabric8.kubernetes.api.model.Secret) Optional(java.util.Optional) Checkpoint(io.vertx.junit5.Checkpoint) MockCertManager(io.strimzi.operator.common.operator.MockCertManager) Mockito.mock(org.mockito.Mockito.mock) VertxTestContext(io.vertx.junit5.VertxTestContext) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) CertManager(io.strimzi.certs.CertManager) HashSet(java.util.HashSet) ResourceUtils(io.strimzi.operator.user.ResourceUtils) ArgumentCaptor(org.mockito.ArgumentCaptor) CrdOperator(io.strimzi.operator.common.operator.resource.CrdOperator) Matchers.hasSize(org.hamcrest.Matchers.hasSize) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) ArgumentMatchers.isNull(org.mockito.ArgumentMatchers.isNull) SimpleAclRule(io.strimzi.operator.user.model.acl.SimpleAclRule) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) KafkaUserBuilder(io.strimzi.api.kafka.model.KafkaUserBuilder) Mockito.when(org.mockito.Mockito.when) KafkaUserModel(io.strimzi.operator.user.model.KafkaUserModel) Mockito.verify(org.mockito.Mockito.verify) Reconciliation(io.strimzi.operator.common.Reconciliation) Mockito.never(org.mockito.Mockito.never) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Set(java.util.Set) CopyOnWriteArraySet(java.util.concurrent.CopyOnWriteArraySet) HashSet(java.util.HashSet) KafkaUserQuotas(io.strimzi.api.kafka.model.KafkaUserQuotas) KafkaUserBuilder(io.strimzi.api.kafka.model.KafkaUserBuilder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) Secret(io.fabric8.kubernetes.api.model.Secret) Checkpoint(io.vertx.junit5.Checkpoint) CrdOperator(io.strimzi.operator.common.operator.resource.CrdOperator) Reconciliation(io.strimzi.operator.common.Reconciliation) KafkaUser(io.strimzi.api.kafka.model.KafkaUser) Test(org.junit.jupiter.api.Test)

Example 12 with KafkaUserQuotas

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

the class QuotasOperator method internalDelete.

/**
 * Delete the quotas for the given user.
 *
 * @param reconciliation The reconciliation
 * @param username Name of the user
 *
 * @return the Future with reconcile result
 */
public Future<ReconcileResult<KafkaUserQuotas>> internalDelete(Reconciliation reconciliation, String username) {
    LOGGER.debugCr(reconciliation, "Deleting quotas for user {}", username);
    KafkaUserQuotas emptyQuotas = new KafkaUserQuotas();
    emptyQuotas.setProducerByteRate(null);
    emptyQuotas.setConsumerByteRate(null);
    emptyQuotas.setRequestPercentage(null);
    emptyQuotas.setControllerMutationRate(null);
    return internalAlter(reconciliation, username, emptyQuotas).map(ReconcileResult.deleted());
}
Also used : KafkaUserQuotas(io.strimzi.api.kafka.model.KafkaUserQuotas)

Example 13 with KafkaUserQuotas

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

the class QuotasOperator method internalDelete.

/**
 * Delete the quotas for the given user.
 *
 * @param reconciliation The reconciliation
 * @param username Name of the user
 *
 * @return the Future with reconcile result
 */
public Future<ReconcileResult<KafkaUserQuotas>> internalDelete(Reconciliation reconciliation, String username) {
    LOGGER.debugCr(reconciliation, "Deleting quotas for user {}", username);
    KafkaUserQuotas emptyQuotas = new KafkaUserQuotas();
    emptyQuotas.setProducerByteRate(null);
    emptyQuotas.setConsumerByteRate(null);
    emptyQuotas.setRequestPercentage(null);
    emptyQuotas.setControllerMutationRate(null);
    return internalAlter(reconciliation, username, emptyQuotas).map(ReconcileResult.deleted());
}
Also used : KafkaUserQuotas(io.strimzi.api.kafka.model.KafkaUserQuotas)

Example 14 with KafkaUserQuotas

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

the class KafkaUserModelTest method testFromCrdQuotaUser.

@Test
public void testFromCrdQuotaUser() {
    KafkaUserModel model = KafkaUserModel.fromCrd(quotasUser, UserOperatorConfig.DEFAULT_SECRET_PREFIX, UserOperatorConfig.DEFAULT_STRIMZI_ACLS_ADMIN_API_SUPPORTED);
    assertThat(model.namespace, is(ResourceUtils.NAMESPACE));
    assertThat(model.name, is(ResourceUtils.NAME));
    assertThat(model.labels, is(Labels.fromMap(ResourceUtils.LABELS).withStrimziKind(KafkaUser.RESOURCE_KIND).withKubernetesName(KafkaUserModel.KAFKA_USER_OPERATOR_NAME).withKubernetesInstance(ResourceUtils.NAME).withKubernetesPartOf(ResourceUtils.NAME).withKubernetesManagedBy(KafkaUserModel.KAFKA_USER_OPERATOR_NAME)));
    KafkaUserQuotas quotas = quotasUser.getSpec().getQuotas();
    assertThat(model.getQuotas().getConsumerByteRate(), is(quotas.getConsumerByteRate()));
    assertThat(model.getQuotas().getProducerByteRate(), is(quotas.getProducerByteRate()));
    assertThat(model.getQuotas().getRequestPercentage(), is(quotas.getRequestPercentage()));
    assertThat(model.getQuotas().getControllerMutationRate(), is(quotas.getControllerMutationRate()));
}
Also used : KafkaUserQuotas(io.strimzi.api.kafka.model.KafkaUserQuotas) Test(org.junit.jupiter.api.Test)

Example 15 with KafkaUserQuotas

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

the class KafkaUserOperatorTest method testReconcileTlsExternalUser.

@Test
public void testReconcileTlsExternalUser(VertxTestContext context) {
    KafkaUser user = new KafkaUserBuilder(ResourceUtils.createKafkaUserQuotas(1000000, 2000000, 55, 10.0)).editSpec().withNewKafkaUserTlsExternalClientAuthentication().endKafkaUserTlsExternalClientAuthentication().endSpec().build();
    CrdOperator mockCrdOps = mock(CrdOperator.class);
    SecretOperator mockSecretOps = mock(SecretOperator.class);
    SimpleAclOperator aclOps = mock(SimpleAclOperator.class);
    ScramCredentialsOperator scramOps = mock(ScramCredentialsOperator.class);
    QuotasOperator quotasOps = mock(QuotasOperator.class);
    KafkaUserOperator op = new KafkaUserOperator(vertx, mockCertManager, mockCrdOps, mockSecretOps, scramOps, quotasOps, aclOps, ResourceUtils.createUserOperatorConfig());
    Secret clientsCa = ResourceUtils.createClientsCaCertSecret();
    Secret clientsCaKey = ResourceUtils.createClientsCaKeySecret();
    ArgumentCaptor<String> secretNamespaceCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<String> secretNameCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<Secret> secretCaptor = ArgumentCaptor.forClass(Secret.class);
    when(mockSecretOps.reconcile(any(), secretNamespaceCaptor.capture(), secretNameCaptor.capture(), secretCaptor.capture())).thenReturn(Future.succeededFuture());
    ArgumentCaptor<String> aclNameCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<Set<SimpleAclRule>> aclRulesCaptor = ArgumentCaptor.forClass(Set.class);
    when(aclOps.reconcile(any(), aclNameCaptor.capture(), aclRulesCaptor.capture())).thenReturn(Future.succeededFuture());
    ArgumentCaptor<String> scramUserCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<String> scramPasswordCaptor = ArgumentCaptor.forClass(String.class);
    when(scramOps.reconcile(any(), scramUserCaptor.capture(), scramPasswordCaptor.capture())).thenReturn(Future.succeededFuture());
    when(mockSecretOps.getAsync(anyString(), eq(clientsCa.getMetadata().getName()))).thenReturn(Future.succeededFuture(clientsCa));
    when(mockSecretOps.getAsync(anyString(), eq(clientsCaKey.getMetadata().getName()))).thenReturn(Future.succeededFuture(clientsCaKey));
    when(mockSecretOps.getAsync(anyString(), eq(user.getMetadata().getName()))).thenReturn(Future.succeededFuture(null));
    when(mockCrdOps.get(eq(user.getMetadata().getNamespace()), eq(user.getMetadata().getName()))).thenReturn(user);
    when(mockCrdOps.getAsync(anyString(), anyString())).thenReturn(Future.succeededFuture(user));
    when(mockCrdOps.updateStatusAsync(any(), any(KafkaUser.class))).thenReturn(Future.succeededFuture());
    ArgumentCaptor<String> quotasUserNameCaptor = ArgumentCaptor.forClass(String.class);
    ArgumentCaptor<KafkaUserQuotas> quotasCaptor = ArgumentCaptor.forClass(KafkaUserQuotas.class);
    when(quotasOps.reconcile(any(), quotasUserNameCaptor.capture(), quotasCaptor.capture())).thenReturn(Future.succeededFuture());
    Checkpoint async = context.checkpoint();
    op.reconcile(new Reconciliation("test-trigger", KafkaUser.RESOURCE_KIND, ResourceUtils.NAMESPACE, ResourceUtils.NAME)).onComplete(context.succeeding(v -> context.verify(() -> {
        List<String> capturedNames = secretNameCaptor.getAllValues();
        assertThat(capturedNames, hasSize(1));
        assertThat(capturedNames.get(0), is(ResourceUtils.NAME));
        List<String> capturedNamespaces = secretNamespaceCaptor.getAllValues();
        assertThat(capturedNamespaces, hasSize(1));
        assertThat(capturedNamespaces.get(0), is(ResourceUtils.NAMESPACE));
        List<Secret> capturedSecrets = secretCaptor.getAllValues();
        assertThat(capturedSecrets, hasSize(1));
        assertThat(capturedSecrets.get(0), is(nullValue()));
        assertThat(scramUserCaptor.getValue(), is(KafkaUserModel.getScramUserName(ResourceUtils.NAME)));
        assertThat(scramPasswordCaptor.getValue(), is(nullValue()));
        List<String> capturedAclNames = aclNameCaptor.getAllValues();
        assertThat(capturedAclNames, hasSize(2));
        assertThat(capturedAclNames.get(0), is(KafkaUserModel.getTlsUserName(ResourceUtils.NAME)));
        assertThat(capturedAclNames.get(1), is(KafkaUserModel.getScramUserName(ResourceUtils.NAME)));
        List<Set<SimpleAclRule>> capturedAcls = aclRulesCaptor.getAllValues();
        assertThat(capturedAcls, hasSize(2));
        assertThat(capturedAcls.get(0), hasSize(ResourceUtils.createExpectedSimpleAclRules(user).size()));
        assertThat(capturedAcls.get(0), is(ResourceUtils.createExpectedSimpleAclRules(user)));
        assertThat(capturedAcls.get(1), is(nullValue()));
        List<String> capturedQuotasNames = quotasUserNameCaptor.getAllValues();
        assertThat(capturedQuotasNames, hasSize(2));
        assertThat(capturedQuotasNames.get(0), is(KafkaUserModel.getTlsUserName(ResourceUtils.NAME)));
        assertThat(capturedQuotasNames.get(1), is(KafkaUserModel.getScramUserName(ResourceUtils.NAME)));
        List<KafkaUserQuotas> capturedQuotas = quotasCaptor.getAllValues();
        assertThat(capturedQuotas, hasSize(2));
        assertThat(capturedQuotas.get(0), is(notNullValue()));
        assertThat(capturedQuotas.get(0).getConsumerByteRate(), is(1000000));
        assertThat(capturedQuotas.get(0).getProducerByteRate(), is(2000000));
        assertThat(capturedQuotas.get(0).getRequestPercentage(), is(55));
        assertThat(capturedQuotas.get(0).getControllerMutationRate(), is(10.0));
        assertThat(capturedQuotas.get(1), is(nullValue()));
        async.flag();
    })));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) Arrays(java.util.Arrays) LabelSelector(io.fabric8.kubernetes.api.model.LabelSelector) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) KafkaUser(io.strimzi.api.kafka.model.KafkaUser) Collections.singletonList(java.util.Collections.singletonList) CoreMatchers.notNullValue(org.hamcrest.CoreMatchers.notNullValue) AfterAll(org.junit.jupiter.api.AfterAll) MicrometerMetricsOptions(io.vertx.micrometer.MicrometerMetricsOptions) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) BeforeAll(org.junit.jupiter.api.BeforeAll) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) KafkaUserStatus(io.strimzi.api.kafka.model.status.KafkaUserStatus) SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) VertxOptions(io.vertx.core.VertxOptions) Set(java.util.Set) VertxPrometheusOptions(io.vertx.micrometer.VertxPrometheusOptions) VertxExtension(io.vertx.junit5.VertxExtension) CopyOnWriteArraySet(java.util.concurrent.CopyOnWriteArraySet) Future(io.vertx.core.Future) StandardCharsets(java.nio.charset.StandardCharsets) Test(org.junit.jupiter.api.Test) Base64(java.util.Base64) List(java.util.List) KafkaUserQuotas(io.strimzi.api.kafka.model.KafkaUserQuotas) Labels(io.strimzi.operator.common.model.Labels) Secret(io.fabric8.kubernetes.api.model.Secret) Optional(java.util.Optional) Checkpoint(io.vertx.junit5.Checkpoint) MockCertManager(io.strimzi.operator.common.operator.MockCertManager) Mockito.mock(org.mockito.Mockito.mock) VertxTestContext(io.vertx.junit5.VertxTestContext) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) CertManager(io.strimzi.certs.CertManager) HashSet(java.util.HashSet) ResourceUtils(io.strimzi.operator.user.ResourceUtils) ArgumentCaptor(org.mockito.ArgumentCaptor) CrdOperator(io.strimzi.operator.common.operator.resource.CrdOperator) Matchers.hasSize(org.hamcrest.Matchers.hasSize) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) ArgumentMatchers.isNull(org.mockito.ArgumentMatchers.isNull) SimpleAclRule(io.strimzi.operator.user.model.acl.SimpleAclRule) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) KafkaUserBuilder(io.strimzi.api.kafka.model.KafkaUserBuilder) Mockito.when(org.mockito.Mockito.when) KafkaUserModel(io.strimzi.operator.user.model.KafkaUserModel) Mockito.verify(org.mockito.Mockito.verify) Reconciliation(io.strimzi.operator.common.Reconciliation) Mockito.never(org.mockito.Mockito.never) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Set(java.util.Set) CopyOnWriteArraySet(java.util.concurrent.CopyOnWriteArraySet) HashSet(java.util.HashSet) KafkaUserQuotas(io.strimzi.api.kafka.model.KafkaUserQuotas) KafkaUserBuilder(io.strimzi.api.kafka.model.KafkaUserBuilder) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) Secret(io.fabric8.kubernetes.api.model.Secret) Checkpoint(io.vertx.junit5.Checkpoint) CrdOperator(io.strimzi.operator.common.operator.resource.CrdOperator) Reconciliation(io.strimzi.operator.common.Reconciliation) KafkaUser(io.strimzi.api.kafka.model.KafkaUser) Test(org.junit.jupiter.api.Test)

Aggregations

KafkaUserQuotas (io.strimzi.api.kafka.model.KafkaUserQuotas)16 SimpleAclRule (io.strimzi.operator.user.model.acl.SimpleAclRule)4 Test (org.junit.jupiter.api.Test)4 LabelSelector (io.fabric8.kubernetes.api.model.LabelSelector)2 Secret (io.fabric8.kubernetes.api.model.Secret)2 SecretBuilder (io.fabric8.kubernetes.api.model.SecretBuilder)2 KafkaUser (io.strimzi.api.kafka.model.KafkaUser)2 KafkaUserBuilder (io.strimzi.api.kafka.model.KafkaUserBuilder)2 Condition (io.strimzi.api.kafka.model.status.Condition)2 KafkaUserStatus (io.strimzi.api.kafka.model.status.KafkaUserStatus)2 CertManager (io.strimzi.certs.CertManager)2 Reconciliation (io.strimzi.operator.common.Reconciliation)2 Labels (io.strimzi.operator.common.model.Labels)2 MockCertManager (io.strimzi.operator.common.operator.MockCertManager)2 CrdOperator (io.strimzi.operator.common.operator.resource.CrdOperator)2 ReconcileResult (io.strimzi.operator.common.operator.resource.ReconcileResult)2 SecretOperator (io.strimzi.operator.common.operator.resource.SecretOperator)2 ResourceUtils (io.strimzi.operator.user.ResourceUtils)2 KafkaUserModel (io.strimzi.operator.user.model.KafkaUserModel)2 Future (io.vertx.core.Future)2