Search in sources :

Example 1 with OperandResourceWatcher

use of org.bf2.cos.fleetshard.operator.operand.OperandResourceWatcher 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;
}
Also used : ResourceDefinitionContext(io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext) OperandResourceWatcher(org.bf2.cos.fleetshard.operator.operand.OperandResourceWatcher) ArrayList(java.util.ArrayList)

Aggregations

ResourceDefinitionContext (io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext)1 ArrayList (java.util.ArrayList)1 OperandResourceWatcher (org.bf2.cos.fleetshard.operator.operand.OperandResourceWatcher)1