Class KubernetesEnvironmentPropertySource

java.lang.Object
io.micronaut.context.env.MapPropertySource
io.micronaut.context.env.KubernetesEnvironmentPropertySource
All Implemented Interfaces:
PropertySource, Ordered, Iterable<String>

public class KubernetesEnvironmentPropertySource extends MapPropertySource
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
  • Field Details

  • 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 configuration
      excludes - 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

      public PropertySource.PropertyConvention getConvention()
      Returns:
      Whether the property source has upper case underscore separated keys