From 2a6326b4f481833a843c2b5943377eb90ef4dde9 Mon Sep 17 00:00:00 2001 From: Bart Jeukendrup Date: Thu, 20 Jul 2023 10:09:47 +0200 Subject: [PATCH] Add liveness probe for Celery worker --- charts/backend/templates/deployment-celery-worker.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/charts/backend/templates/deployment-celery-worker.yaml b/charts/backend/templates/deployment-celery-worker.yaml index 6998e59..b57e7f1 100644 --- a/charts/backend/templates/deployment-celery-worker.yaml +++ b/charts/backend/templates/deployment-celery-worker.yaml @@ -39,6 +39,16 @@ spec: - 'worker' - '--loglevel={{ .Values.celery.loglevel }}' - '--concurrency={{ .Values.celery.concurrency }}' + livenessProbe: + exec: + command: [ + "bash", + "-c", + "celery --app=signals inspect ping -d celery@$HOSTNAME" + ] + initialDelaySeconds: 60 + periodSeconds: 120 + timeoutSeconds: 10 env: {{- range $key, $value := .Values.env }} - name: {{ $key }}