From 29c380b697769ea840f44a02ae3c937b35955e77 Mon Sep 17 00:00:00 2001 From: SilviaAmAm Date: Fri, 10 Jan 2025 13:55:11 +0100 Subject: [PATCH] :sparkles: [#148] Update livenessProbe Open Zaak Open Zaak has one long running tasks of which we don't know how long it will take, so no ping probe was added. The task: https://github.com/open-zaak/open-zaak/blob/70449f11a31a0e8a06d9e47d49e095b31d1068f6/src/openzaak/components/documenten/tasks.py#L333 --- charts/openzaak/Chart.yaml | 2 +- charts/openzaak/README.md | 12 +++++++----- charts/openzaak/templates/deployment.yaml | 12 +++++++++--- charts/openzaak/values.yaml | 10 ++++++---- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/charts/openzaak/Chart.yaml b/charts/openzaak/Chart.yaml index 64b76c2..e54f5e6 100644 --- a/charts/openzaak/Chart.yaml +++ b/charts/openzaak/Chart.yaml @@ -3,7 +3,7 @@ name: openzaak description: Productiewaardige API's voor Zaakgericht Werken type: application -version: 1.6.0-beta.3 +version: 1.7.0-beta.0 appVersion: latest dependencies: diff --git a/charts/openzaak/README.md b/charts/openzaak/README.md index d5d9f61..bc1e25f 100644 --- a/charts/openzaak/README.md +++ b/charts/openzaak/README.md @@ -1,6 +1,6 @@ # openzaak -![Version: 1.6.0-beta.1](https://img.shields.io/badge/Version-1.6.0--beta.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 1.7.0-beta.0](https://img.shields.io/badge/Version-1.7.0--beta.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) Productiewaardige API's voor Zaakgericht Werken @@ -226,13 +226,15 @@ Productiewaardige API's voor Zaakgericht Werken | worker.autoscaling.targetCPUUtilizationPercentage | int | `80` | | | worker.autoscaling.targetMemoryUtilizationPercentage | int | `80` | | | worker.concurrency | int | `4` | | -| worker.livenessProbe.exec.command[0] | string | `"python"` | | -| worker.livenessProbe.exec.command[1] | string | `"/app/bin/check_celery_worker_liveness.py"` | | -| worker.livenessProbe.failureThreshold | int | `10` | | +| worker.livenessProbe.enabled | bool | `false` | | +| worker.livenessProbe.exec.command[0] | string | `"/bin/sh"` | | +| worker.livenessProbe.exec.command[1] | string | `"-c"` | | +| worker.livenessProbe.exec.command[2] | string | `"celery --workdir src --app openzaak.celery inspect --destination celery@${HOSTNAME} active"` | | +| worker.livenessProbe.failureThreshold | int | `3` | | | worker.livenessProbe.initialDelaySeconds | int | `60` | | | worker.livenessProbe.periodSeconds | int | `50` | | | worker.livenessProbe.successThreshold | int | `1` | | -| worker.livenessProbe.timeoutSeconds | int | `15` | | +| worker.livenessProbe.timeoutSeconds | int | `10` | | | worker.maxWorkerLivenessDelta | string | `""` | | | worker.podLabels | object | `{}` | | | worker.replicaCount | int | `1` | | diff --git a/charts/openzaak/templates/deployment.yaml b/charts/openzaak/templates/deployment.yaml index 499d21a..5df9e3d 100644 --- a/charts/openzaak/templates/deployment.yaml +++ b/charts/openzaak/templates/deployment.yaml @@ -273,10 +273,16 @@ spec: {{- if .Values.extraEnvVars }} {{- include "openzaak.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }} {{- end }} - {{- if .Values.worker.livenessProbe }} + {{- if .Values.worker.livenessProbe.enabled }} livenessProbe: - {{- toYaml .Values.worker.livenessProbe | nindent 12 }} - {{- end }} + exec: + {{- toYaml .Values.worker.livenessProbe.exec | nindent 14 }} + initialDelaySeconds: {{ .Values.worker.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.worker.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.worker.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.worker.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.worker.livenessProbe.failureThreshold }} + {{- end }} resources: {{- toYaml .Values.worker.resources | nindent 12 }} command: diff --git a/charts/openzaak/values.yaml b/charts/openzaak/values.yaml index b742f25..8d335ab 100644 --- a/charts/openzaak/values.yaml +++ b/charts/openzaak/values.yaml @@ -323,15 +323,17 @@ worker: resources: {} maxWorkerLivenessDelta: "" livenessProbe: + enabled: false exec: command: - - python - - /app/bin/check_celery_worker_liveness.py + - /bin/sh + - -c + - celery --workdir src --app openzaak.celery inspect --destination celery@${HOSTNAME} active initialDelaySeconds: 60 # Periodeseconds should not exceed maxWorkerLivenessDelta periodSeconds: 50 - timeoutSeconds: 15 - failureThreshold: 10 + timeoutSeconds: 10 + failureThreshold: 3 successThreshold: 1 autoscaling: enabled: false