From b6092f6d5ce2ff93ff66170566641e719a9c780f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juris=20Pav=C4=BCu=C4=8Denkovs?= Date: Wed, 5 Oct 2022 11:11:08 +0300 Subject: [PATCH] fix helm celery healthcheck --- helm/oncall/templates/celery/_deployment.tpl | 10 ++++++---- helm/oncall/values.yaml | 5 +++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/helm/oncall/templates/celery/_deployment.tpl b/helm/oncall/templates/celery/_deployment.tpl index 45e50a0d..5378c834 100644 --- a/helm/oncall/templates/celery/_deployment.tpl +++ b/helm/oncall/templates/celery/_deployment.tpl @@ -47,16 +47,18 @@ spec: {{- if .Values.env }} {{- toYaml .Values.env | nindent 12 }} {{- end }} + {{- if .Values.celery.livenessProbe.enabled }} livenessProbe: exec: command: [ "bash", "-c", - "celery inspect ping -A engine -d celery@$HOSTNAME" + "celery -A engine inspect ping -d celery@$HOSTNAME" ] - initialDelaySeconds: 30 - periodSeconds: 300 - timeoutSeconds: 10 + initialDelaySeconds: {{ .Values.celery.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.celery.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.celery.livenessProbe.timeoutSeconds }} + {{- end }} resources: {{- toYaml .Values.celery.resources | nindent 12 }} {{- end}} \ No newline at end of file diff --git a/helm/oncall/values.yaml b/helm/oncall/values.yaml index f0a02773..700bccb8 100644 --- a/helm/oncall/values.yaml +++ b/helm/oncall/values.yaml @@ -44,6 +44,11 @@ engine: # Celery workers pods configuration celery: replicaCount: 1 + livenessProbe: + enabled: false + initialDelaySeconds: 30 + periodSeconds: 300 + timeoutSeconds: 10 resources: {} # limits: # cpu: 100m