Class KubernetesPodRestartsCheck

java.lang.Object
com.kingsrook.qqq.backend.core.health.KubernetesPodRestartsCheck
All Implemented Interfaces:
HealthCheck

public class KubernetesPodRestartsCheck extends Object implements HealthCheck
Container restarts of this application's pods, read from the Kubernetes API, so a crash (OutOfMemoryError, OOMKilled) or a crash loop shows on the System Health page and raises the standard health.check.* alerts. Opt-in: registered only when QQQ_HEALTH_POD_RESTARTS_SELECTOR (a label selector such as "app in (website-backend,website-backend-worker)") is set and a service account token is mounted. The pod's service account needs get/list on pods in its namespace. DOWN: a container is in CrashLoopBackOff. DEGRADED: a container's last termination finished inside the window (QQQ_HEALTH_POD_RESTARTS_WINDOW_MINUTES, default 60), with its cause: JVM out of memory (exit 3), OOMKilled, or the exit code. A DEPENDENCY check: it never affects /ready or /live.