use of org.bf2.cos.fleetshard.api.ManagedConnectorOperator in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class ManagedConnectorOperatorSteps method a_managedConnectorOperator.
@Given("^a ManagedConnectorOperator with:$")
public void a_managedConnectorOperator(Map<String, String> entry) {
final String operatorId = entry.getOrDefault("operator.id", uid());
final String operatorType = entry.get("operator.type");
final String operatorVersion = entry.get("operator.version");
final String operatorRuntime = entry.get("operator.runtime");
var connector = new ManagedConnectorOperatorBuilder().withMetadata(new ObjectMetaBuilder().withName(operatorId).addToLabels(Resources.LABEL_OPERATOR_TYPE, operatorType).addToLabels(Resources.LABEL_OPERATOR_VERSION, operatorVersion).build()).withSpec(new ManagedConnectorOperatorSpecBuilder().withVersion(operatorVersion).withType(operatorType).withRuntime(operatorRuntime).build()).build();
ctx.managedConnectorOperator(connector);
}
use of org.bf2.cos.fleetshard.api.ManagedConnectorOperator in project cos-fleetshard by bf2fc6cc711aee1a0c2a.
the class ConnectorController method prepareEventSources.
@Override
public List<EventSource> prepareEventSources(EventSourceContext context) {
var eventSources = new ArrayList<EventSource>();
eventSources.add(new ConnectorSecretEventSource(kubernetesClient, managedConnectorOperator, MetricsRecorder.of(registry, config.metrics().baseName() + ".controller.event.secrets", tags)));
eventSources.add(new ConnectorOperatorEventSource(kubernetesClient, managedConnectorOperator, fleetShard.getNamespace(), MetricsRecorder.of(registry, config.metrics().baseName() + ".controller.event.operators", tags)));
for (ResourceDefinitionContext res : operandController.getResourceTypes()) {
final String id = res.getGroup() + "-" + res.getVersion() + "-" + res.getKind();
eventSources.add(new OperandResourceWatcher(id, kubernetesClient, managedConnectorOperator, res, MetricsRecorder.of(registry, id, tags)));
}
return eventSources;
}
Aggregations