Package io.micronaut.context.env
Class KubernetesEnvironmentPropertySource
java.lang.Object
io.micronaut.context.env.MapPropertySource
io.micronaut.context.env.KubernetesEnvironmentPropertySource
- All Implemented Interfaces:
PropertySource
,Ordered
,Iterable<String>
A property source specific for the Kubernetes environment.
It excludes Kubernetes-specific environment variables (like FOO_SERVICE_HOST, FOO_SERVICE_PORT, etc.) since they would
slow down application startup
- Since:
- 2.3.0
- Author:
- Nilson Pontello, Álvaro Sánchez-Mariscal
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.context.env.PropertySource
PropertySource.PropertyConvention
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Fields inherited from interface io.micronaut.context.env.PropertySource
CONTEXT
-
Constructor Summary
-
Method Summary
Methods inherited from class io.micronaut.context.env.MapPropertySource
asMap, get, getName, iterator, of, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
NAME
The name of this property source.- See Also:
-
-
Constructor Details
-
KubernetesEnvironmentPropertySource
public KubernetesEnvironmentPropertySource()Default constructor. -
KubernetesEnvironmentPropertySource
public KubernetesEnvironmentPropertySource(@Nullable @Nullable List<String> includes, @Nullable @Nullable List<String> excludes) Allows for control over which environment variables are included.- Parameters:
includes
- The environment variables to include in configurationexcludes
- The environment variables to exclude from configuration
-
-
Method Details
-
getOrder
public int getOrder()- Returns:
- The order of the object. Defaults to zero (no order).
-
getConvention
- Returns:
- Whether the property source has upper case underscore separated keys
-