Class KubernetesConfiguration.AbstractConfigConfiguration
java.lang.Object
io.micronaut.discovery.DiscoveryConfiguration
io.micronaut.kubernetes.KubernetesConfiguration.AbstractConfigConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
- Direct Known Subclasses:
KubernetesConfiguration.KubernetesConfigMapsConfiguration, KubernetesConfiguration.KubernetesSecretsConfiguration
- Enclosing class:
KubernetesConfiguration
public abstract static class KubernetesConfiguration.AbstractConfigConfiguration
extends io.micronaut.discovery.DiscoveryConfiguration
Base class for config-maps and secrets.
- Since:
- 1.0.0
- Author:
- Sergio del Amo, Álvaro Sánchez-Mariscal
-
Field Summary
Fields inherited from class io.micronaut.discovery.DiscoveryConfiguration
DEFAULT_ENABLED, PREFIX -
Method Summary
Modifier and TypeMethodDescriptiongetPaths()booleanbooleanisUseApi()booleanisWatch()voidsetExceptionOnPodLabelsMissing(boolean exceptionOnPodLabelsMissing) If set to true an exception will be thrown if at least one of the configured pod labels is not found among the application's pod labels.voidsetExcludes(Collection<String> excludes) voidsetIncludes(Collection<String> includes) voidvoidsetPaths(Collection<String> paths) voidsetPodLabels(List<String> podLabels) voidsetUseApi(boolean useApi) voidsetWatch(boolean watch) Methods inherited from class io.micronaut.discovery.DiscoveryConfiguration
isEnabled, setEnabled
-
Method Details
-
getPaths
- Returns:
- paths where secrets are mounted
-
setPaths
- Parameters:
paths- where secrets are mounted
-
isUseApi
public boolean isUseApi()- Returns:
- whether to use the API to read secrets when
pathsis used.
-
setUseApi
public void setUseApi(boolean useApi) - Parameters:
useApi- whether to use the API to read secrets whenpathsis used.
-
isWatch
public boolean isWatch()- Returns:
- whether to enable watching for the ConfigMap changes.
-
setWatch
public void setWatch(boolean watch) - Parameters:
watch- flag to watch for the ConfigMap changes.
-
getIncludes
- Returns:
- the names to include
-
setIncludes
- Parameters:
includes- the names to include
-
getExcludes
- Returns:
- the names to exclude
-
setExcludes
- Parameters:
excludes- the names to exclude
-
getLabels
-
setLabels
-
getPodLabels
-
setPodLabels
-
isExceptionOnPodLabelsMissing
public boolean isExceptionOnPodLabelsMissing()- Returns:
- Flag to indicate that failure to find configured pod label is fatal (default
KubernetesConfiguration.AbstractKubernetesConfiguration.DEFAULT_EXCEPTION_ON_POD_LABELS_MISSING).
-
setExceptionOnPodLabelsMissing
public void setExceptionOnPodLabelsMissing(boolean exceptionOnPodLabelsMissing) If set to true an exception will be thrown if at least one of the configured pod labels is not found among the application's pod labels. Default value (KubernetesConfiguration.AbstractKubernetesConfiguration.DEFAULT_EXCEPTION_ON_POD_LABELS_MISSING).- Parameters:
exceptionOnPodLabelsMissing- flag to throw exception on pod labels missing
-