From 3099e678fcf3c32e7218e6fcf9ecbfe3203a5411 Mon Sep 17 00:00:00 2001 From: David Burke Date: Fri, 19 May 2023 10:40:39 -0400 Subject: [PATCH] Allow more configuration of celery liveness probe --- templates/worker/deployment.yaml | 8 ++------ values.yaml | 16 +++++++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/templates/worker/deployment.yaml b/templates/worker/deployment.yaml index 905231d..35fe4d4 100644 --- a/templates/worker/deployment.yaml +++ b/templates/worker/deployment.yaml @@ -41,13 +41,9 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.worker.livenessProbe.enabled }} + {{- if .Values.worker.livenessProbe }} livenessProbe: - initialDelaySeconds: {{ .Values.worker.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.worker.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.worker.livenessProbe.timeoutSeconds }} - exec: - command: {{- toYaml .Values.worker.livenessProbe.command | nindent 14 }} + {{- .Values.worker.livenessProbe | toYaml | nindent 12 }} {{- end }} resources: {{- toYaml .Values.worker.resources | nindent 12 }} diff --git a/values.yaml b/values.yaml index 947014e..1e28c58 100644 --- a/values.yaml +++ b/values.yaml @@ -97,13 +97,15 @@ worker: maxReplicas: 100 targetCPUUtilizationPercentage: 90 # targetMemoryUtilizationPercentage: 80 - livenessProbe: - enabled: false - initialDelaySeconds: 30 - periodSeconds: 300 - timeoutSeconds: 30 - command: - - "celery -A django inspect ping -d celery@$HOSTNAME" + livenessProbe: {} + # initialDelaySeconds: 10 + # periodSeconds: 60 + # timeoutSeconds: 30 + # exec: + # command: + # - "bash" + # - "-c" + # - "celery -A django inspect ping -d celery@$HOSTNAME | grep -q OK" resources: limits: cpu: 900m