Class AbstractKubernetesConfigWatcher<T extends io.kubernetes.client.common.KubernetesObject>

java.lang.Object
io.micronaut.kubernetes.configuration.AbstractKubernetesConfigWatcher<T>
Type Parameters:
T - the type of Kubernetes object to watch
All Implemented Interfaces:
io.kubernetes.client.informer.ResourceEventHandler<T>
Direct Known Subclasses:
KubernetesConfigMapWatcher, KubernetesSecretWatcher

public abstract class AbstractKubernetesConfigWatcher<T extends io.kubernetes.client.common.KubernetesObject> extends Object implements io.kubernetes.client.informer.ResourceEventHandler<T>
Watches for ConfigMap/Secret changes and makes the appropriate changes to the Environment by adding or removing PropertySources.
Since:
1.0.0
Author:
Álvaro Sánchez-Mariscal
  • Method Details

    • onAdd

      public void onAdd(T config)
      Specified by:
      onAdd in interface io.kubernetes.client.informer.ResourceEventHandler<T extends io.kubernetes.client.common.KubernetesObject>
    • onUpdate

      public void onUpdate(T oldConfig, T newConfig)
      Specified by:
      onUpdate in interface io.kubernetes.client.informer.ResourceEventHandler<T extends io.kubernetes.client.common.KubernetesObject>
    • onDelete

      public void onDelete(T config, boolean deletedFinalStateUnknown)
      Specified by:
      onDelete in interface io.kubernetes.client.informer.ResourceEventHandler<T extends io.kubernetes.client.common.KubernetesObject>