Search in sources :

Example 1 with ManagedConnectorCluster

use of org.bf2.cos.fleetshard.api.ManagedConnectorCluster in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class ConnectorDeploymentProvisioner method provision.

public void provision(ConnectorDeployment deployment) {
    final String uow = uid();
    LOGGER.info("Got cluster_id: {}, connector_id: {}, deployment_id: {}, resource_version: {}, uow: {}", fleetShard.getClusterId(), deployment.getSpec().getConnectorId(), deployment.getId(), deployment.getMetadata().getResourceVersion(), uow);
    // TODO: cache cluster
    final ManagedConnectorCluster cluster = fleetShard.getOrCreateManagedConnectorCluster();
    final ManagedConnector connector = createManagedConnector(uow, deployment, cluster);
    final Secret secret = createManagedConnectorSecret(uow, deployment, connector);
    LOGGER.info("CreateOrReplace - uow: {}, managed_connector: {}/{}, managed_connector_secret: {}/{}", uow, connector.getMetadata().getNamespace(), connector.getMetadata().getName(), secret.getMetadata().getNamespace(), secret.getMetadata().getName());
}
Also used : Secret(io.fabric8.kubernetes.api.model.Secret) ManagedConnectorCluster(org.bf2.cos.fleetshard.api.ManagedConnectorCluster) ManagedConnector(org.bf2.cos.fleetshard.api.ManagedConnector)

Aggregations

Secret (io.fabric8.kubernetes.api.model.Secret)1 ManagedConnector (org.bf2.cos.fleetshard.api.ManagedConnector)1 ManagedConnectorCluster (org.bf2.cos.fleetshard.api.ManagedConnectorCluster)1