diff --git a/bitnami/airflow/Chart.lock b/bitnami/airflow/Chart.lock index 36898663c2..a3e23a90af 100644 --- a/bitnami/airflow/Chart.lock +++ b/bitnami/airflow/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: redis repository: oci://registry-1.docker.io/bitnamicharts - version: 19.3.1 + version: 19.3.2 - name: postgresql repository: oci://registry-1.docker.io/bitnamicharts - version: 15.3.1 + version: 15.3.2 - name: common repository: oci://registry-1.docker.io/bitnamicharts version: 2.19.2 -digest: sha256:fabff0ead749d34e71b1d91c0a88b7df583a2e678070b920fbf256b313dbc5c0 -generated: "2024-05-13T16:19:43.191158676Z" +digest: sha256:141d5a1d20c29e9489a7681a919419731608135a9fc5af912c304ff1a7bed64f +generated: "2024-05-17T13:20:55.345544+02:00" diff --git a/bitnami/airflow/Chart.yaml b/bitnami/airflow/Chart.yaml index 0005afa253..da8cc53e86 100644 --- a/bitnami/airflow/Chart.yaml +++ b/bitnami/airflow/Chart.yaml @@ -47,4 +47,4 @@ maintainers: name: airflow sources: - https://github.com/bitnami/charts/tree/main/bitnami/airflow -version: 18.0.10 +version: 18.1.0 diff --git a/bitnami/airflow/README.md b/bitnami/airflow/README.md index 7b76d61d82..dcbf253ae5 100644 --- a/bitnami/airflow/README.md +++ b/bitnami/airflow/README.md @@ -378,6 +378,12 @@ The Bitnami Airflow chart relies on the PostgreSQL chart persistence. This means | `scheduler.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `15` | | `scheduler.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` | | `scheduler.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | +| `scheduler.startupProbe.enabled` | Enable startupProbe on Airflow scheduler containers | `false` | +| `scheduler.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `60` | +| `scheduler.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` | +| `scheduler.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` | +| `scheduler.startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` | +| `scheduler.startupProbe.successThreshold` | Success threshold for startupProbe | `1` | | `scheduler.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` | | `scheduler.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` | | `scheduler.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` | diff --git a/bitnami/airflow/templates/scheduler/deployment.yaml b/bitnami/airflow/templates/scheduler/deployment.yaml index 2a26e2561e..7a387ef7c0 100644 --- a/bitnami/airflow/templates/scheduler/deployment.yaml +++ b/bitnami/airflow/templates/scheduler/deployment.yaml @@ -186,7 +186,7 @@ spec: - /bin/bash - -ec - | - airflow jobs check --job-type SchedulerJob --local {{- if not .Values.diagnosticMode.enabled }} 2>/dev/null {{- end }} + CONNECTION_CHECK_MAX_COUNT=0 airflow jobs check --job-type SchedulerJob --local {{- if not .Values.diagnosticMode.enabled }} 2>/dev/null {{- end }} {{- end }} {{- if .Values.scheduler.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.scheduler.customReadinessProbe "context" $) | trim | nindent 12 }} @@ -201,6 +201,14 @@ spec: {{- end }} {{- if .Values.scheduler.customStartupProbe }} startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.scheduler.customStartupProbe "context" $) | nindent 12 }} + {{- else if .Values.scheduler.startupProbe.enabled }} + startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.scheduler.livenessProbe "enabled") "context" $) | nindent 12 }} + exec: + command: + - /bin/bash + - -ec + - | + CONNECTION_CHECK_MAX_COUNT=0 airflow jobs check --job-type SchedulerJob --local {{- if not .Values.diagnosticMode.enabled }} 2>/dev/null {{- end }} {{- end }} {{- end }} {{- if .Values.scheduler.lifecycleHooks }} diff --git a/bitnami/airflow/templates/web/deployment.yaml b/bitnami/airflow/templates/web/deployment.yaml index 2650df7b04..5da95631e9 100644 --- a/bitnami/airflow/templates/web/deployment.yaml +++ b/bitnami/airflow/templates/web/deployment.yaml @@ -235,14 +235,11 @@ spec: livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.web.customLivenessProbe "context" $) | nindent 12 }} {{- else if .Values.web.livenessProbe.enabled }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.web.livenessProbe "enabled") "context" $) | nindent 12 }} - {{- if include "airflow.baseUrl" . }} - tcpSocket: - port: http - {{- else }} - httpGet: - path: /health - port: http - {{- end }} + exec: + command: + - pgrep + - -f + - airflow-webserver {{- end }} {{- if .Values.web.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.web.customReadinessProbe "context" $) | nindent 12 }} diff --git a/bitnami/airflow/templates/worker/statefulset.yaml b/bitnami/airflow/templates/worker/statefulset.yaml index 1f911e70aa..a279d9ed16 100644 --- a/bitnami/airflow/templates/worker/statefulset.yaml +++ b/bitnami/airflow/templates/worker/statefulset.yaml @@ -195,8 +195,13 @@ spec: livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.worker.customLivenessProbe "context" $) | nindent 12 }} {{- else if .Values.worker.livenessProbe.enabled }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.worker.livenessProbe "enabled") "context" $) | nindent 12 }} - tcpSocket: - port: worker + exec: + command: + - sh + - -c + - | + source /opt/bitnami/airflow/venv/bin/activate && \ + CONNECTION_CHECK_MAX_COUNT=0 python -m celery --app airflow.providers.celery.executors.celery_executor.app inspect ping -d celery@$(hostname) {{- end }} {{- if .Values.worker.customReadinessProbe }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.worker.customReadinessProbe "context" $) | nindent 12 }} diff --git a/bitnami/airflow/values.yaml b/bitnami/airflow/values.yaml index 0ea5ed1abf..4903f0b96c 100644 --- a/bitnami/airflow/values.yaml +++ b/bitnami/airflow/values.yaml @@ -607,6 +607,20 @@ scheduler: timeoutSeconds: 15 failureThreshold: 6 successThreshold: 1 + ## @param scheduler.startupProbe.enabled Enable startupProbe on Airflow scheduler containers + ## @param scheduler.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe + ## @param scheduler.startupProbe.periodSeconds Period seconds for startupProbe + ## @param scheduler.startupProbe.timeoutSeconds Timeout seconds for startupProbe + ## @param scheduler.startupProbe.failureThreshold Failure threshold for startupProbe + ## @param scheduler.startupProbe.successThreshold Success threshold for startupProbe + ## + startupProbe: + enabled: false + initialDelaySeconds: 60 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 15 + successThreshold: 1 ## @param scheduler.customLivenessProbe Custom livenessProbe that overrides the default one ## customLivenessProbe: {}