Search in sources :

Example 6 with ConnectorConfiguration

use of org.bf2.cos.fleetshard.operator.connector.ConnectorConfiguration in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class DebeziumOperandController method doReify.

@Override
protected List<HasMetadata> doReify(ManagedConnector connector, DebeziumShardMetadata shardMetadata, ConnectorConfiguration<ObjectNode, DebeziumDataShape> connectorConfiguration, ServiceAccountSpec serviceAccountSpec) {
    final Map<String, String> secretsData = createSecretsData(connectorConfiguration.getConnectorSpec());
    final Secret secret = new SecretBuilder().withMetadata(new ObjectMetaBuilder().withName(connector.getMetadata().getName() + Resources.CONNECTOR_SECRET_SUFFIX).build()).addToData(EXTERNAL_CONFIG_FILE, asBytesBase64(secretsData)).addToData(KAFKA_CLIENT_SECRET_KEY, serviceAccountSpec.getClientSecret()).build();
    ConfigMap kafkaConnectMetricsConfigMap = new ConfigMapBuilder().withNewMetadata().withName(connector.getMetadata().getName() + KAFKA_CONNECT_METRICS_CONFIGMAP_NAME_SUFFIX).endMetadata().addToData(METRICS_CONFIG_FILENAME, METRICS_CONFIG).build();
    final KafkaConnectSpecBuilder kcsb = new KafkaConnectSpecBuilder().withReplicas(1).withBootstrapServers(connector.getSpec().getDeployment().getKafka().getUrl()).withKafkaClientAuthenticationPlain(new KafkaClientAuthenticationPlainBuilder().withUsername(serviceAccountSpec.getClientId()).withPasswordSecret(new PasswordSecretSourceBuilder().withSecretName(secret.getMetadata().getName()).withPassword(KAFKA_CLIENT_SECRET_KEY).build()).build()).addToConfig(DebeziumConstants.DEFAULT_CONFIG_OPTIONS).addToConfig(new TreeMap<>(configuration.kafkaConnect().config())).addToConfig("group.id", connector.getMetadata().getName()).addToConfig(KeyAndValueConverters.getConfig(connectorConfiguration.getDataShapeSpec(), connector, serviceAccountSpec)).addToConfig("offset.storage.topic", connector.getMetadata().getName() + "-offset").addToConfig("config.storage.topic", connector.getMetadata().getName() + "-config").addToConfig("status.storage.topic", connector.getMetadata().getName() + "-status").addToConfig("topic.creation.enable", "true").addToConfig("connector.secret.name", secret.getMetadata().getName()).addToConfig("connector.secret.checksum", Secrets.computeChecksum(secret)).withTls(new ClientTlsBuilder().withTrustedCertificates(Collections.emptyList()).build()).withTemplate(new KafkaConnectTemplateBuilder().withPod(new PodTemplateBuilder().withImagePullSecrets(configuration.imagePullSecretsName()).build()).build()).withJmxPrometheusExporterMetricsConfig(new JmxPrometheusExporterMetricsBuilder().withValueFrom(new ExternalConfigurationReferenceBuilder().withNewConfigMapKeyRef(METRICS_CONFIG_FILENAME, kafkaConnectMetricsConfigMap.getMetadata().getName(), false).build()).build()).withExternalConfiguration(new ExternalConfigurationBuilder().addToVolumes(new ExternalConfigurationVolumeSourceBuilder().withName(EXTERNAL_CONFIG_DIRECTORY).withSecret(new SecretVolumeSourceBuilder().withSecretName(secret.getMetadata().getName()).build()).build()).build()).withResources(new ResourceRequirementsBuilder().addToRequests("cpu", new Quantity("10m")).addToRequests("memory", new Quantity("256Mi")).addToLimits("cpu", new Quantity("500m")).addToLimits("memory", new Quantity("1Gi")).build());
    kcsb.withImage(shardMetadata.getContainerImage());
    final KafkaConnect kc = new KafkaConnectBuilder().withApiVersion(Constants.RESOURCE_GROUP_NAME + "/" + KafkaConnect.CONSUMED_VERSION).withMetadata(new ObjectMetaBuilder().withName(connector.getMetadata().getName()).addToAnnotations(STRIMZI_IO_USE_CONNECTOR_RESOURCES, "true").build()).withSpec(kcsb.build()).build();
    Map<String, Object> connectorConfig = createConfig(configuration, connectorConfiguration.getConnectorSpec());
    // handle connector config defaults
    switch(shardMetadata.getConnectorClass()) {
        case CLASS_NAME_POSTGRES_CONNECTOR:
            if (!connectorConfig.containsKey(CONFIG_OPTION_POSTGRES_PLUGIN_NAME)) {
                connectorConfig.put(CONFIG_OPTION_POSTGRES_PLUGIN_NAME, PLUGIN_NAME_PGOUTPUT);
            }
            break;
        default:
            break;
    }
    if (isDatabaseHistorySupported(shardMetadata)) {
        final Map<String, Object> databaseHistoryConfigs = new LinkedHashMap<>();
        databaseHistoryConfigs.put("database.history.kafka.bootstrap.servers", connector.getSpec().getDeployment().getKafka().getUrl());
        databaseHistoryConfigs.put("database.history.kafka.topic", connector.getMetadata().getName() + "-database-history");
        databaseHistoryConfigs.put("database.history.producer.security.protocol", "SASL_SSL");
        databaseHistoryConfigs.put("database.history.consumer.security.protocol", "SASL_SSL");
        databaseHistoryConfigs.put("database.history.producer.sasl.mechanism", "PLAIN");
        databaseHistoryConfigs.put("database.history.consumer.sasl.mechanism", "PLAIN");
        databaseHistoryConfigs.put("database.history.producer.sasl.jaas.config", "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"" + serviceAccountSpec.getClientId() + "\" password=\"" + "${dir:/opt/kafka/external-configuration/" + EXTERNAL_CONFIG_DIRECTORY + ":" + KAFKA_CLIENT_SECRET_KEY + "}\";");
        databaseHistoryConfigs.put("database.history.consumer.sasl.jaas.config", "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"" + serviceAccountSpec.getClientId() + "\" password=\"" + "${dir:/opt/kafka/external-configuration/" + EXTERNAL_CONFIG_DIRECTORY + ":" + KAFKA_CLIENT_SECRET_KEY + "}\";");
        connectorConfig.putAll(databaseHistoryConfigs);
    }
    final KafkaConnector kctr = new KafkaConnectorBuilder().withApiVersion(Constants.RESOURCE_GROUP_NAME + "/" + KafkaConnector.CONSUMED_VERSION).withMetadata(new ObjectMetaBuilder().withName(connector.getMetadata().getName()).addToLabels(STRIMZI_DOMAIN + "cluster", connector.getMetadata().getName()).build()).withSpec(new KafkaConnectorSpecBuilder().withClassName(shardMetadata.getConnectorClass()).withTasksMax(1).withPause(false).withConfig(connectorConfig).addToConfig("topic.creation.default.replication.factor", -1).addToConfig("topic.creation.default.partitions", -1).addToConfig("topic.creation.default.cleanup.policy", "compact").addToConfig("topic.creation.default.compression.type", "lz4").addToConfig("topic.creation.default.delete.retention.ms", 2_678_400_000L).build()).build();
    return List.of(secret, kafkaConnectMetricsConfigMap, kc, kctr);
}
Also used : PodTemplateBuilder(io.strimzi.api.kafka.model.template.PodTemplateBuilder) KafkaConnectTemplateBuilder(io.strimzi.api.kafka.model.template.KafkaConnectTemplateBuilder) ResourceRequirementsBuilder(io.fabric8.kubernetes.api.model.ResourceRequirementsBuilder) KafkaConnect(io.strimzi.api.kafka.model.KafkaConnect) DebeziumOperandSupport.lookupKafkaConnect(org.bf2.cos.fleetshard.operator.debezium.DebeziumOperandSupport.lookupKafkaConnect) PasswordSecretSourceBuilder(io.strimzi.api.kafka.model.PasswordSecretSourceBuilder) LinkedHashMap(java.util.LinkedHashMap) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) KafkaConnectBuilder(io.strimzi.api.kafka.model.KafkaConnectBuilder) ClientTlsBuilder(io.strimzi.api.kafka.model.ClientTlsBuilder) KafkaConnectorSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectorSpecBuilder) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) KafkaClientAuthenticationPlainBuilder(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationPlainBuilder) KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) KafkaConnectSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectSpecBuilder) SecretVolumeSourceBuilder(io.fabric8.kubernetes.api.model.SecretVolumeSourceBuilder) ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) ExternalConfigurationBuilder(io.strimzi.api.kafka.model.connect.ExternalConfigurationBuilder) ExternalConfigurationVolumeSourceBuilder(io.strimzi.api.kafka.model.connect.ExternalConfigurationVolumeSourceBuilder) Quantity(io.fabric8.kubernetes.api.model.Quantity) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) TreeMap(java.util.TreeMap) Secret(io.fabric8.kubernetes.api.model.Secret) ExternalConfigurationReferenceBuilder(io.strimzi.api.kafka.model.ExternalConfigurationReferenceBuilder) JmxPrometheusExporterMetricsBuilder(io.strimzi.api.kafka.model.JmxPrometheusExporterMetricsBuilder) KafkaConnectorBuilder(io.strimzi.api.kafka.model.KafkaConnectorBuilder)

Example 7 with ConnectorConfiguration

use of org.bf2.cos.fleetshard.operator.connector.ConnectorConfiguration in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class DebeziumOperandControllerTest method reify.

void reify(String connectorClass, ObjectNode connectorConfig, Consumer<KafkaConnect> kafkaConnectChecks) {
    KubernetesClient kubernetesClient = Mockito.mock(KubernetesClient.class);
    DebeziumOperandController controller = new DebeziumOperandController(kubernetesClient, CONFIGURATION);
    var resources = controller.doReify(new ManagedConnectorBuilder().withMetadata(new ObjectMetaBuilder().withName(DEFAULT_MANAGED_CONNECTOR_ID).withUid(MANAGED_CONNECTOR_UID).build()).withSpec(new ManagedConnectorSpecBuilder().withConnectorId(DEFAULT_MANAGED_CONNECTOR_ID).withDeploymentId(DEFAULT_DEPLOYMENT_ID).withDeployment(new DeploymentSpecBuilder().withConnectorTypeId(DEFAULT_CONNECTOR_TYPE_ID).withSecret("secret").withKafka(new KafkaSpecBuilder().withUrl(DEFAULT_KAFKA_SERVER).build()).withNewSchemaRegistry(SCHEMA_REGISTRY_ID, SCHEMA_REGISTRY_URL).withConnectorResourceVersion(DEFAULT_CONNECTOR_REVISION).withDeploymentResourceVersion(DEFAULT_DEPLOYMENT_REVISION).withDesiredState(DESIRED_STATE_READY).build()).build()).build(), new org.bf2.cos.fleetshard.operator.debezium.DebeziumShardMetadataBuilder().withContainerImage(DEFAULT_CONNECTOR_IMAGE).withConnectorClass(connectorClass).build(), new ConnectorConfiguration<>(connectorConfig, ObjectNode.class, DebeziumDataShape.class), new ServiceAccountSpecBuilder().withClientId(CLIENT_ID).withClientSecret(CLIENT_SECRET).build());
    assertThat(resources).anyMatch(DebeziumOperandSupport::isKafkaConnect).anyMatch(DebeziumOperandSupport::isKafkaConnector).anyMatch(DebeziumOperandSupport::isSecret).anyMatch(DebeziumOperandSupport::isConfigMap);
    assertThat(resources).filteredOn(DebeziumOperandSupport::isKafkaConnect).hasSize(1).first().isInstanceOfSatisfying(KafkaConnect.class, kc -> {
        assertThat(kc.getSpec().getImage()).isEqualTo(DEFAULT_CONNECTOR_IMAGE);
        assertThat(kc.getSpec().getTemplate().getPod().getImagePullSecrets()).contains(CONFIGURATION.imagePullSecretsName());
        assertThat(kc.getSpec().getMetricsConfig().getType()).isEqualTo("jmxPrometheusExporter");
        assertThat(kc.getSpec().getMetricsConfig()).isInstanceOfSatisfying(JmxPrometheusExporterMetrics.class, jmxMetricsConfig -> {
            assertThat(jmxMetricsConfig.getValueFrom().getConfigMapKeyRef().getKey()).isEqualTo(DebeziumOperandController.METRICS_CONFIG_FILENAME);
            assertThat(jmxMetricsConfig.getValueFrom().getConfigMapKeyRef().getName()).isEqualTo(DEFAULT_MANAGED_CONNECTOR_ID + DebeziumOperandController.KAFKA_CONNECT_METRICS_CONFIGMAP_NAME_SUFFIX);
        });
    });
    assertThat(resources).filteredOn(DebeziumOperandSupport::isConfigMap).hasSize(1).first().isInstanceOfSatisfying(ConfigMap.class, configMap -> {
        assertThat(configMap.getData()).containsKey(DebeziumOperandController.METRICS_CONFIG_FILENAME);
        assertThat(configMap.getData().get(DebeziumOperandController.METRICS_CONFIG_FILENAME)).isEqualTo(DebeziumOperandController.METRICS_CONFIG);
    });
    assertThat(resources).filteredOn(DebeziumOperandSupport::isKafkaConnector).hasSize(1).first().isInstanceOfSatisfying(KafkaConnector.class, kctr -> {
        assertThat(kctr.getSpec().getConfig()).containsEntry("database.password", "${file:/opt/kafka/external-configuration/" + DebeziumConstants.EXTERNAL_CONFIG_DIRECTORY + "/" + EXTERNAL_CONFIG_FILE + ":database.password}");
        if (PG_CLASS.equals(connectorClass)) {
            // Specifically test the plugin name for PostgreSQL
            assertThat(kctr.getSpec().getConfig().get(DebeziumOperandController.CONFIG_OPTION_POSTGRES_PLUGIN_NAME)).isEqualTo(DebeziumOperandController.PLUGIN_NAME_PGOUTPUT);
        }
        if (MYSQL_CLASS.equals(connectorClass)) {
            // Specifically test database history does not pass secrets directly
            assertThat(kctr.getSpec().getConfig().get("database.history.consumer.sasl.jaas.config")).isEqualTo("org.apache.kafka.common.security.plain.PlainLoginModule required username=\"" + CLIENT_ID + "\" password=\"${dir:/opt/kafka/external-configuration/" + DebeziumConstants.EXTERNAL_CONFIG_DIRECTORY + ":" + KAFKA_CLIENT_SECRET_KEY + "}\";");
            assertThat(kctr.getSpec().getConfig().get("database.history.producer.sasl.jaas.config")).isEqualTo("org.apache.kafka.common.security.plain.PlainLoginModule required username=\"" + CLIENT_ID + "\" password=\"${dir:/opt/kafka/external-configuration/" + DebeziumConstants.EXTERNAL_CONFIG_DIRECTORY + ":" + KAFKA_CLIENT_SECRET_KEY + "}\";");
        }
    });
    assertThat(resources).filteredOn(DebeziumOperandSupport::isKafkaConnect).hasSize(1).first().isInstanceOfSatisfying(KafkaConnect.class, kafkaConnectChecks);
}
Also used : DeploymentSpecBuilder(org.bf2.cos.fleetshard.api.DeploymentSpecBuilder) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) ManagedConnectorSpecBuilder(org.bf2.cos.fleetshard.api.ManagedConnectorSpecBuilder) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) ManagedConnectorBuilder(org.bf2.cos.fleetshard.api.ManagedConnectorBuilder) DebeziumDataShape(org.bf2.cos.fleetshard.operator.debezium.model.DebeziumDataShape) KafkaSpecBuilder(org.bf2.cos.fleetshard.api.KafkaSpecBuilder) ServiceAccountSpecBuilder(org.bf2.cos.fleetshard.api.ServiceAccountSpecBuilder)

Example 8 with ConnectorConfiguration

use of org.bf2.cos.fleetshard.operator.connector.ConnectorConfiguration in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class CamelOperandController method doReify.

@Override
protected List<HasMetadata> doReify(ManagedConnector connector, CamelShardMetadata shardMetadata, ConnectorConfiguration<ObjectNode> connectorConfiguration, ServiceAccountSpec serviceAccountSpec) {
    final Map<String, String> properties = createSecretsData(connector, shardMetadata, connectorConfiguration, serviceAccountSpec, configuration, new TreeMap<>());
    final List<ProcessorKamelet> stepDefinitions = createSteps(connector, connectorConfiguration, shardMetadata, properties);
    final String source;
    final String sink;
    switch(shardMetadata.getConnectorType()) {
        case CONNECTOR_TYPE_SOURCE:
            source = shardMetadata.getKamelets().getAdapter().getName();
            sink = shardMetadata.getKamelets().getKafka().getName();
            break;
        case CONNECTOR_TYPE_SINK:
            source = shardMetadata.getKamelets().getKafka().getName();
            sink = shardMetadata.getKamelets().getAdapter().getName();
            break;
        default:
            throw new IllegalArgumentException("Unknown connector type: " + shardMetadata.getConnectorType());
    }
    final Secret secret = new SecretBuilder().withMetadata(new ObjectMetaBuilder().withName(connector.getMetadata().getName() + Resources.CONNECTOR_SECRET_SUFFIX).build()).addToData(APPLICATION_PROPERTIES, asBytesBase64(properties)).build();
    final KameletBinding binding = new KameletBindingBuilder().withMetadata(new ObjectMetaBuilder().withName(connector.getMetadata().getName()).build()).withSpec(new KameletBindingSpecBuilder().withIntegration(createIntegrationSpec(secret.getMetadata().getName(), configuration, Map.of("CONNECTOR_SECRET_NAME", secret.getMetadata().getName(), "CONNECTOR_SECRET_CHECKSUM", Secrets.computeChecksum(secret), "CONNECTOR_ID", connector.getSpec().getConnectorId(), "CONNECTOR_DEPLOYMENT_ID", connector.getSpec().getDeploymentId()))).withSource(KameletEndpoint.kamelet(source, Map.of("id", connector.getSpec().getDeploymentId() + "-source"))).withSink(KameletEndpoint.kamelet(sink, Map.of("id", connector.getSpec().getDeploymentId() + "-sink"))).withErrorHandler(createErrorHandler(connectorConfiguration.getErrorHandlerSpec())).withSteps(stepDefinitions.stream().map(s -> KameletEndpoint.kamelet(s.getTemplateId(), Map.of("id", s.getId()))).collect(Collectors.toList())).build()).build();
    Map<String, String> annotations = KubernetesResourceUtil.getOrCreateAnnotations(binding);
    if (shardMetadata.getAnnotations() != null) {
        annotations.putAll(shardMetadata.getAnnotations());
    }
    annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_CONTAINER_IMAGE, shardMetadata.getConnectorImage());
    annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_KAMELETS_ENABLED, "false");
    annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_JVM_ENABLED, "false");
    annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_LOGGING_JSON, "false");
    annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_OWNER_TARGET_LABELS, LABELS_TO_TRANSFER);
    // health check annotations
    annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_ENABLED, "true");
    annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_PROBE_ENABLED, "true");
    annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_PROBE_ENABLED, "true");
    Health health = configuration.health();
    if (health != null) {
        annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_SUCCESS_THRESHOLD, health.readinessSuccessThreshold());
        annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_FAILURE_THRESHOLD, health.readinessFailureThreshold());
        annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_PERIOD, health.readinessPeriodSeconds());
        annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_TIMEOUT, health.readinessTimeoutSeconds());
        annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_SUCCESS_THRESHOLD, health.livenessSuccessThreshold());
        annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_FAILURE_THRESHOLD, health.livenessFailureThreshold());
        annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_PERIOD, health.livenessPeriodSeconds());
        annotations.putIfAbsent(TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_TIMEOUT, health.livenessTimeoutSeconds());
    }
    return List.of(secret, binding);
}
Also used : KameletBindingSpecBuilder(org.bf2.cos.fleetshard.operator.camel.model.KameletBindingSpecBuilder) Secrets(org.bf2.cos.fleetshard.support.resources.Secrets) CamelOperandSupport.createSteps(org.bf2.cos.fleetshard.operator.camel.CamelOperandSupport.createSteps) CamelOperandSupport.createIntegrationSpec(org.bf2.cos.fleetshard.operator.camel.CamelOperandSupport.createIntegrationSpec) LoggerFactory(org.slf4j.LoggerFactory) KameletEndpoint(org.bf2.cos.fleetshard.operator.camel.model.KameletEndpoint) TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_PERIOD(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_PERIOD) TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_SUCCESS_THRESHOLD(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_SUCCESS_THRESHOLD) CamelOperandSupport.computeStatus(org.bf2.cos.fleetshard.operator.camel.CamelOperandSupport.computeStatus) TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_TIMEOUT(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_TIMEOUT) Map(java.util.Map) CollectionUtils.asBytesBase64(org.bf2.cos.fleetshard.support.CollectionUtils.asBytesBase64) KameletBindingBuilder(org.bf2.cos.fleetshard.operator.camel.model.KameletBindingBuilder) CamelOperandSupport.createErrorHandler(org.bf2.cos.fleetshard.operator.camel.CamelOperandSupport.createErrorHandler) ManagedConnector(org.bf2.cos.fleetshard.api.ManagedConnector) ConnectorConfiguration(org.bf2.cos.fleetshard.operator.connector.ConnectorConfiguration) CamelShardMetadata(org.bf2.cos.fleetshard.operator.camel.model.CamelShardMetadata) Health(org.bf2.cos.fleetshard.operator.camel.CamelOperandConfiguration.Health) ProcessorKamelet(org.bf2.cos.fleetshard.operator.camel.model.ProcessorKamelet) TRAIT_CAMEL_APACHE_ORG_OWNER_TARGET_LABELS(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_OWNER_TARGET_LABELS) CamelOperandSupport.createSecretsData(org.bf2.cos.fleetshard.operator.camel.CamelOperandSupport.createSecretsData) Collectors(java.util.stream.Collectors) ServiceAccountSpec(org.bf2.cos.fleetshard.api.ServiceAccountSpec) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_TIMEOUT(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_TIMEOUT) TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_PERIOD(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_PERIOD) List(java.util.List) Secret(io.fabric8.kubernetes.api.model.Secret) CONNECTOR_TYPE_SINK(org.bf2.cos.fleetshard.operator.camel.CamelConstants.CONNECTOR_TYPE_SINK) TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_PROBE_ENABLED(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_PROBE_ENABLED) TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_FAILURE_THRESHOLD(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_FAILURE_THRESHOLD) TRAIT_CAMEL_APACHE_ORG_LOGGING_JSON(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_LOGGING_JSON) TRAIT_CAMEL_APACHE_ORG_KAMELETS_ENABLED(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_KAMELETS_ENABLED) Singleton(javax.inject.Singleton) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_FAILURE_THRESHOLD(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_READINESS_FAILURE_THRESHOLD) APPLICATION_PROPERTIES(org.bf2.cos.fleetshard.operator.camel.CamelConstants.APPLICATION_PROPERTIES) TRAIT_CAMEL_APACHE_ORG_JVM_ENABLED(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_JVM_ENABLED) TRAIT_CAMEL_APACHE_ORG_CONTAINER_IMAGE(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_CONTAINER_IMAGE) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) CamelOperandSupport.lookupBinding(org.bf2.cos.fleetshard.operator.camel.CamelOperandSupport.lookupBinding) LABELS_TO_TRANSFER(org.bf2.cos.fleetshard.operator.camel.CamelConstants.LABELS_TO_TRANSFER) Logger(org.slf4j.Logger) AbstractOperandController(org.bf2.cos.fleetshard.operator.operand.AbstractOperandController) TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_SUCCESS_THRESHOLD(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_SUCCESS_THRESHOLD) KubernetesResourceUtil(io.fabric8.kubernetes.client.utils.KubernetesResourceUtil) KameletBinding(org.bf2.cos.fleetshard.operator.camel.model.KameletBinding) CONNECTOR_TYPE_SOURCE(org.bf2.cos.fleetshard.operator.camel.CamelConstants.CONNECTOR_TYPE_SOURCE) TRAIT_CAMEL_APACHE_ORG_HEALTH_ENABLED(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_ENABLED) TreeMap(java.util.TreeMap) TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_PROBE_ENABLED(org.bf2.cos.fleetshard.operator.camel.CamelConstants.TRAIT_CAMEL_APACHE_ORG_HEALTH_LIVENESS_PROBE_ENABLED) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) ResourceDefinitionContext(io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) Resources(org.bf2.cos.fleetshard.support.resources.Resources) Health(org.bf2.cos.fleetshard.operator.camel.CamelOperandConfiguration.Health) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) Secret(io.fabric8.kubernetes.api.model.Secret) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) KameletBindingBuilder(org.bf2.cos.fleetshard.operator.camel.model.KameletBindingBuilder) ProcessorKamelet(org.bf2.cos.fleetshard.operator.camel.model.ProcessorKamelet) KameletBindingSpecBuilder(org.bf2.cos.fleetshard.operator.camel.model.KameletBindingSpecBuilder) KameletBinding(org.bf2.cos.fleetshard.operator.camel.model.KameletBinding)

Aggregations

ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)6 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)5 ObjectMetaBuilder (io.fabric8.kubernetes.api.model.ObjectMetaBuilder)4 ServiceAccountSpec (org.bf2.cos.fleetshard.api.ServiceAccountSpec)4 KameletBinding (org.bf2.cos.fleetshard.operator.camel.model.KameletBinding)4 Secret (io.fabric8.kubernetes.api.model.Secret)3 List (java.util.List)3 Map (java.util.Map)3 TreeMap (java.util.TreeMap)3 ManagedConnector (org.bf2.cos.fleetshard.api.ManagedConnector)3 CONNECTOR_TYPE_SINK (org.bf2.cos.fleetshard.operator.camel.CamelConstants.CONNECTOR_TYPE_SINK)3 CONNECTOR_TYPE_SOURCE (org.bf2.cos.fleetshard.operator.camel.CamelConstants.CONNECTOR_TYPE_SOURCE)3 CamelShardMetadata (org.bf2.cos.fleetshard.operator.camel.model.CamelShardMetadata)3 KameletEndpoint (org.bf2.cos.fleetshard.operator.camel.model.KameletEndpoint)3 ConnectorConfiguration (org.bf2.cos.fleetshard.operator.connector.ConnectorConfiguration)3 JsonNode (com.fasterxml.jackson.databind.JsonNode)2 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)2 Condition (io.fabric8.kubernetes.api.model.Condition)2 SecretBuilder (io.fabric8.kubernetes.api.model.SecretBuilder)2 Serialization (io.fabric8.kubernetes.client.utils.Serialization)2