@Singleton
@Requires(beans=io.micronaut.management.endpoint.health.HealthEndpoint.class) @Requires(env="k8s") @Requires(property="hostname") @Requires(resources="file:/var/run/secrets/kubernetes.io/serviceaccount/token")
public class KubernetesHealthIndicator
extends io.micronaut.management.health.indicator.AbstractHealthIndicator<java.util.Map<java.lang.String,java.lang.Object>>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HOSTNAME_ENV_VARIABLE |
static java.lang.String |
HOSTNAME_ENV_VARIABLE_IN_PROPERTY_FORMAT |
static java.lang.String |
NAME |
Constructor and Description |
---|
KubernetesHealthIndicator(java.util.concurrent.ExecutorService executorService,
KubernetesClient client,
KubernetesConfiguration configuration)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getHealthInformation() |
protected java.lang.String |
getName() |
getHealthResult, getResult, setExecutorService
public static final java.lang.String NAME
public static final java.lang.String HOSTNAME_ENV_VARIABLE
public static final java.lang.String HOSTNAME_ENV_VARIABLE_IN_PROPERTY_FORMAT
public KubernetesHealthIndicator(@Named(value="io") java.util.concurrent.ExecutorService executorService, KubernetesClient client, KubernetesConfiguration configuration)
executorService
- The IO ExecutorService
client
- The Kubernetes clientconfiguration
- The Kubernetes configurationprotected java.util.Map<java.lang.String,java.lang.Object> getHealthInformation()
getHealthInformation
in class io.micronaut.management.health.indicator.AbstractHealthIndicator<java.util.Map<java.lang.String,java.lang.Object>>
protected java.lang.String getName()
getName
in class io.micronaut.management.health.indicator.AbstractHealthIndicator<java.util.Map<java.lang.String,java.lang.Object>>