Search in sources :

Example 1 with InformerEventSource

use of io.javaoperatorsdk.operator.processing.event.source.informer.InformerEventSource in project keycloak by keycloak.

the class KeycloakController method prepareEventSources.

@Override
public List<EventSource> prepareEventSources(EventSourceContext<Keycloak> context) {
    SharedIndexInformer<Deployment> deploymentInformer = client.apps().deployments().inNamespace(context.getConfigurationService().getClientConfiguration().getNamespace()).withLabels(Constants.DEFAULT_LABELS).runnableInformer(0);
    EventSource deploymentEvent = new InformerEventSource<>(deploymentInformer, Mappers.fromOwnerReference());
    return List.of(deploymentEvent);
}
Also used : InformerEventSource(io.javaoperatorsdk.operator.processing.event.source.informer.InformerEventSource) EventSource(io.javaoperatorsdk.operator.processing.event.source.EventSource) InformerEventSource(io.javaoperatorsdk.operator.processing.event.source.informer.InformerEventSource) Deployment(io.fabric8.kubernetes.api.model.apps.Deployment)

Aggregations

Deployment (io.fabric8.kubernetes.api.model.apps.Deployment)1 EventSource (io.javaoperatorsdk.operator.processing.event.source.EventSource)1 InformerEventSource (io.javaoperatorsdk.operator.processing.event.source.informer.InformerEventSource)1