@Singleton @Requires(env="k8s") @Requires(beans=KubernetesClient.class) @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 PropertySource
s read from Kubernetes ConfigMap's.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_MAP_RESOURCE_VERSION |
static java.lang.String |
KUBERNETES_CONFIG_MAP_NAME_SUFFIX |
static java.lang.String |
KUBERNETES_SECRET_NAME_SUFFIX |
Constructor and Description |
---|
KubernetesConfigurationClient(KubernetesClient client,
KubernetesConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
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_RESOURCE_VERSION
public static final java.lang.String KUBERNETES_CONFIG_MAP_NAME_SUFFIX
public static final java.lang.String KUBERNETES_SECRET_NAME_SUFFIX
public KubernetesConfigurationClient(KubernetesClient client, KubernetesConfiguration configuration)
client
- An 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.ConfigurationClient
environment
- The environmentPublisher
that emits zero or many PropertySource
instances discovered for the given environmentpublic java.lang.String getDescription()
getDescription
in interface io.micronaut.core.naming.Described