Class KubernetesConfigMapWatcher

java.lang.Object
io.micronaut.kubernetes.configuration.AbstractKubernetesConfigWatcher<io.kubernetes.client.openapi.models.V1ConfigMap>
io.micronaut.kubernetes.configuration.KubernetesConfigMapWatcher
All Implemented Interfaces:
io.kubernetes.client.informer.ResourceEventHandler<io.kubernetes.client.openapi.models.V1ConfigMap>

@Context @Requires(env="k8s") @Requires(beans=io.micronaut.kubernetes.client.reactor.CoreV1ApiReactorClient.class) @Requires(property="micronaut.config-client.enabled",value="true",defaultValue="false") @Requires(condition=KubernetesConfigMapWatcherCondition.class) public final class KubernetesConfigMapWatcher extends AbstractKubernetesConfigWatcher<io.kubernetes.client.openapi.models.V1ConfigMap>
Watches for ConfigMap changes and makes the appropriate changes to the Environment by adding or removing PropertySources.
Since:
1.0.0
Author:
Álvaro Sánchez-Mariscal
  • Constructor Details

    • KubernetesConfigMapWatcher

      @Inject public KubernetesConfigMapWatcher(io.micronaut.context.env.Environment environment, KubernetesConfiguration configuration, io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.runtime.context.scope.refresh.RefreshEvent> eventPublisher)
  • Method Details

    • onApplicationEvent

      @EventListener public void onApplicationEvent(io.micronaut.discovery.event.ServiceReadyEvent event)