Package com.nt.udc.kubernetes.probes
Class KubernetesProbeManager
java.lang.Object
com.nt.udc.kubernetes.probes.KubernetesProbeManager
Manages the liveness and readiness probes for a Kubernetes pod.
This class follows a singleton design pattern and interacts with
KubernetesProbeIfc
to handle the probes.-
Method Summary
Modifier and TypeMethodDescriptionstatic KubernetesProbeManager
void
updateLivenessStatus
(boolean isHealthy) Updates the liveness status by creating or deleting the liveness file.void
updateReadinessStatus
(boolean isReady) Updates the readiness status by creating or deleting the readiness file.
-
Method Details
-
getInstance
-
updateLivenessStatus
public void updateLivenessStatus(boolean isHealthy) Updates the liveness status by creating or deleting the liveness file.- Parameters:
isHealthy
- true if the application is healthy, false otherwise
-
updateReadinessStatus
public void updateReadinessStatus(boolean isReady) Updates the readiness status by creating or deleting the readiness file.- Parameters:
isReady
- true if the application is ready, false otherwise
-