flanksource / is-healthy

Apache License 2.0
0 stars 1 forks source link

Mark pods with high restart count in warning #70

Closed moshloop closed 1 month ago

moshloop commented 2 months ago

If restartCount >= 2 and finishedAt < 30m => Error, FinishedAt > 30h < 6h = Warning

  containerStatuses:
    - name: config-db
      image: public.ecr.aws/k4y9r6y5/config-db:v0.0.400
      ready: true
      state:
        running:
          startedAt: 2024-07-17T07:04:40Z
      imageID: public.ecr.aws/k4y9r6y5/config-db@sha256:b8803113097931662bda448b53c6ca256957957d74d5e8fd1fc442cec197b025
      started: true
      lastState:
        terminated:
          reason: OOMKilled
          exitCode: 137
          startedAt: 2024-07-17T06:48:16Z
          finishedAt: 2024-07-17T07:04:39Z
          containerID: containerd://c48ce37162661fe774202f30368a4811b20b3b04161a860d9143b1dbe0886162
      containerID: containerd://f3931a855990a70a509148875126c382370317fa3065223e3530cd142c67702a
      restartCount: 71