From 7ff63e5fc03b7a1c8dd98b84fd6f60e0d4dab720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asier=20Carre=C3=B1o?= Date: Mon, 6 Oct 2025 09:40:19 +0200 Subject: [PATCH 1/2] [IMP] Add liveness and readiness probes to iris_app deployment Improves service health monitoring and startup behavior by adding HTTP liveness and readiness probes on port 8000. --- deploy/kubernetes/charts/templates/iris_app.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deploy/kubernetes/charts/templates/iris_app.yaml b/deploy/kubernetes/charts/templates/iris_app.yaml index 1a8614af1..5fe1a9f5a 100644 --- a/deploy/kubernetes/charts/templates/iris_app.yaml +++ b/deploy/kubernetes/charts/templates/iris_app.yaml @@ -108,6 +108,19 @@ spec: ports: - containerPort: 8000 + livenessProbe: + httpGet: + path: / + port: 8000 + initialDelaySeconds: 30 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: 8000 + initialDelaySeconds: 10 + periodSeconds: 5 + volumeMounts: - mountPath: /home/iris/downloads name: iris-downloads From 5846e713bbb06a6f8361b597bb8d80d7babc8c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asier=20Carre=C3=B1o?= Date: Mon, 6 Oct 2025 09:48:31 +0200 Subject: [PATCH 2/2] [IMP] Add basic liveness and readiness probes to iris_worker deployment --- deploy/kubernetes/charts/Chart.yaml | 2 +- .../charts/templates/iris_worker.yaml | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/deploy/kubernetes/charts/Chart.yaml b/deploy/kubernetes/charts/Chart.yaml index 890f96506..dafb86033 100644 --- a/deploy/kubernetes/charts/Chart.yaml +++ b/deploy/kubernetes/charts/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/deploy/kubernetes/charts/templates/iris_worker.yaml b/deploy/kubernetes/charts/templates/iris_worker.yaml index 7758cbace..157e5d771 100644 --- a/deploy/kubernetes/charts/templates/iris_worker.yaml +++ b/deploy/kubernetes/charts/templates/iris_worker.yaml @@ -73,6 +73,26 @@ spec: - name: NUMBER_OF_CHILD value: {{ .Values.irisworker.NUMBER_OF_CHILD | quote }} + livenessProbe: + exec: + command: + - sh + - -c + - | + ps -eo cmd | grep -E "celery -A app.celery worker" | grep -Pv ^grep > /dev/null + initialDelaySeconds: 30 + periodSeconds: 10 + failureThreshold: 3 + + readinessProbe: + exec: + command: + - sh + - -c + - | + ps -eo cmd | grep -E "celery -A app.celery worker" | grep -Pv ^grep > /dev/null + initialDelaySeconds: 15 + periodSeconds: 10 volumeMounts: - mountPath: /home/iris/downloads