@Singleton
@Requires(env="k8s") @Requires(property="micronaut.config-client.enabled",value="true",defaultValue="false")
public class KubernetesConfigurationClient
extends java.lang.Object
implements io.micronaut.discovery.config.ConfigurationClient
ConfigurationClient implementation that provides PropertySources read from Kubernetes ConfigMap's.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONFIG_MAP_LIST_RESOURCE_VERSION |
static java.lang.String |
CONFIG_MAP_RESOURCE_VERSION |
static java.lang.String |
KUBERNETES_CONFIG_MAP_LIST_NAME |
static java.lang.String |
KUBERNETES_CONFIG_MAP_NAME_SUFFIX |
static java.lang.String |
KUBERNETES_SECRET_NAME_SUFFIX |
static java.lang.String |
OPAQUE_SECRET_TYPE |
| Constructor and Description |
|---|
KubernetesConfigurationClient(io.micronaut.kubernetes.client.reactor.CoreV1ApiReactorClient client,
KubernetesConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addPropertySourceToCache(io.micronaut.context.env.PropertySource propertySource)
Adds the given
PropertySource to the cache. |
java.lang.String |
getDescription()
A description that describes this object.
|
org.reactivestreams.Publisher<io.micronaut.context.env.PropertySource> |
getPropertySources(io.micronaut.context.env.Environment environment)
Retrieves all of the
PropertySource registrations for the given environment. |
public static final java.lang.String CONFIG_MAP_LIST_RESOURCE_VERSION
public static final java.lang.String CONFIG_MAP_RESOURCE_VERSION
public static final java.lang.String KUBERNETES_CONFIG_MAP_LIST_NAME
public static final java.lang.String KUBERNETES_CONFIG_MAP_NAME_SUFFIX
public static final java.lang.String KUBERNETES_SECRET_NAME_SUFFIX
public static final java.lang.String OPAQUE_SECRET_TYPE
public KubernetesConfigurationClient(io.micronaut.kubernetes.client.reactor.CoreV1ApiReactorClient client,
KubernetesConfiguration configuration)
client - An Core HTTP Client to query the Kubernetes API.configuration - The configuration propertiespublic org.reactivestreams.Publisher<io.micronaut.context.env.PropertySource> getPropertySources(io.micronaut.context.env.Environment environment)
PropertySource registrations for the given environment.getPropertySources in interface io.micronaut.discovery.config.ConfigurationClientenvironment - The environmentPublisher that emits zero or many PropertySource instances discovered for the given environment@NonNull public java.lang.String getDescription()
getDescription in interface io.micronaut.core.naming.Describedpublic static void addPropertySourceToCache(io.micronaut.context.env.PropertySource propertySource)
PropertySource to the cache.propertySource - The property source to add