use of io.strimzi.operator.user.operator.SimpleAclOperator in project strimzi by strimzi.
the class Main method run.
static Future<String> run(Vertx vertx, KubernetesClient client, AdminClientProvider adminClientProvider, UserOperatorConfig config) {
Util.printEnvInfo();
String dnsCacheTtl = System.getenv("STRIMZI_DNS_CACHE_TTL") == null ? "30" : System.getenv("STRIMZI_DNS_CACHE_TTL");
Security.setProperty("networkaddress.cache.ttl", dnsCacheTtl);
OpenSslCertManager certManager = new OpenSslCertManager();
SecretOperator secretOperations = new SecretOperator(vertx, client);
CrdOperator<KubernetesClient, KafkaUser, KafkaUserList> crdOperations = new CrdOperator<>(vertx, client, KafkaUser.class, KafkaUserList.class, KafkaUser.RESOURCE_KIND);
return createAdminClient(adminClientProvider, config, secretOperations).compose(adminClient -> {
SimpleAclOperator aclOperations = new SimpleAclOperator(vertx, adminClient);
ScramCredentialsOperator scramCredentialsOperator = new ScramCredentialsOperator(vertx, adminClient);
QuotasOperator quotasOperator = new QuotasOperator(vertx, adminClient);
KafkaUserOperator kafkaUserOperations = new KafkaUserOperator(vertx, certManager, crdOperations, secretOperations, scramCredentialsOperator, quotasOperator, aclOperations, config);
Promise<String> promise = Promise.promise();
UserOperator operator = new UserOperator(config.getNamespace(), config, client, kafkaUserOperations);
vertx.deployVerticle(operator, res -> {
if (res.succeeded()) {
LOGGER.info("User Operator verticle started in namespace {}", config.getNamespace());
} else {
LOGGER.error("User Operator verticle in namespace {} failed to start", config.getNamespace(), res.cause());
System.exit(1);
}
promise.handle(res);
});
return promise.future();
});
}
use of io.strimzi.operator.user.operator.SimpleAclOperator in project strimzi-kafka-operator by strimzi.
the class Main method run.
static Future<String> run(Vertx vertx, KubernetesClient client, AdminClientProvider adminClientProvider, UserOperatorConfig config) {
Util.printEnvInfo();
String dnsCacheTtl = System.getenv("STRIMZI_DNS_CACHE_TTL") == null ? "30" : System.getenv("STRIMZI_DNS_CACHE_TTL");
Security.setProperty("networkaddress.cache.ttl", dnsCacheTtl);
OpenSslCertManager certManager = new OpenSslCertManager();
SecretOperator secretOperations = new SecretOperator(vertx, client);
CrdOperator<KubernetesClient, KafkaUser, KafkaUserList> crdOperations = new CrdOperator<>(vertx, client, KafkaUser.class, KafkaUserList.class, KafkaUser.RESOURCE_KIND);
return createAdminClient(adminClientProvider, config, secretOperations).compose(adminClient -> {
SimpleAclOperator aclOperations = new SimpleAclOperator(vertx, adminClient);
ScramCredentialsOperator scramCredentialsOperator = new ScramCredentialsOperator(vertx, adminClient);
QuotasOperator quotasOperator = new QuotasOperator(vertx, adminClient);
KafkaUserOperator kafkaUserOperations = new KafkaUserOperator(vertx, certManager, crdOperations, secretOperations, scramCredentialsOperator, quotasOperator, aclOperations, config);
Promise<String> promise = Promise.promise();
UserOperator operator = new UserOperator(config.getNamespace(), config, client, kafkaUserOperations);
vertx.deployVerticle(operator, res -> {
if (res.succeeded()) {
LOGGER.info("User Operator verticle started in namespace {}", config.getNamespace());
} else {
LOGGER.error("User Operator verticle in namespace {} failed to start", config.getNamespace(), res.cause());
System.exit(1);
}
promise.handle(res);
});
return promise.future();
});
}
Aggregations