Class FileBasedKubernetesProbe
java.lang.Object
com.nt.udc.kubernetes.probes.providers.FileBasedKubernetesProbe
- All Implemented Interfaces:
KubernetesProbeIfc
Implementation of
KubernetesProbeIfc that manages Kubernetes probes using files.
The status of a probe is tracked by the presence or absence of a file on the filesystem.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanupdateProbe(boolean status) Updates the probe status by creating or deleting the probe file based on the input status.
-
Constructor Details
-
FileBasedKubernetesProbe
-
-
Method Details
-
updateProbe
public boolean updateProbe(boolean status) Updates the probe status by creating or deleting the probe file based on the input status. If the status istrue, the file is created if it doesn't exist. If the status isfalse, the file is deleted if it exists.- Specified by:
updateProbein interfaceKubernetesProbeIfc- Parameters:
status- The new status for the probe. Iftrue, the probe is healthy and the file is created. Iffalse, the file is deleted.- Returns:
trueif the probe status was successfully updated,falseotherwise.
-