maintain-kubeusers: adjust k8s probes
Before this patch, it was observed that a long lasting initial LDAP query could result in the container missing the first livenessProbe, therefore marking the container as failed by k8s.
This patch adjusts probes to better accomodate how this daemon operates.
-
introduce a startupProbe, which checks the same file as the livenessProbe this allows k8s to know when the daemon starts operations. This also serves as a start time for the livenessProbe
-
relax livenessProbe, given some operations to external endpoints (like LDAP, NFS, or k8s itself) may take some time. Being flexible with the probe means the daemon has time to recover for normal operations without the k8s scheduler killing it.
This patch also moves the checks to earlier in the loop, and more often (before the LDAP query).
Signed-off-by: Arturo Borrero Gonzalez aborrero@wikimedia.org