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 PropertySource
PropertySource.Origin, PropertySource.PropertyConvention -
Field Summary
FieldsFields inherited from interface Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEFields inherited from interface PropertySource
CONTEXT -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.KubernetesEnvironmentPropertySource(@Nullable List<String> includes, @Nullable List<String> excludes) Allows for control over which environment variables are included. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
NAME
-
-
Constructor Details
-
KubernetesEnvironmentPropertySource
public KubernetesEnvironmentPropertySource()Default constructor. -
KubernetesEnvironmentPropertySource
public KubernetesEnvironmentPropertySource(@Nullable List<String> includes, @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
-
getOrigin
- Returns:
- The origin of the property source.
-
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
-