Health check
Health Check
The following examples shows a health check being executed every 1 minute as configured in the helm chart under livenessProbe
, and triggered by /healthz
endpoint:
livenessProbe:
httpGet:
path: /healthz
port: 8080
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 10
periodSeconds: 60
successThreshold: 1
failureThreshold: 4
The mechanism for checking the health of Piper is:
-
Piper set health status of all webhooks to not-healthy.
-
Piper requests ping from all the webhooks configured.
-
Git Provider send ping to
/webhook
endpoint, this will set the health status tohealthy
with timeout of 5 seconds. -
Piper check the status of all webhooks configured.
Therefore, the criteria for health checking are:
- The registered webhook exists.
- The webhook send a ping in 5 seconds.