From 487002e5be535d4b426e830d0454457d03997836 Mon Sep 17 00:00:00 2001 From: Lawrence Menyah Date: Wed, 5 Oct 2022 08:37:38 -0400 Subject: [PATCH] feat: add airflow.kubernetesPodTemplate.lifecycle value Signed-off-by: Lawrence Menyah --- charts/airflow/files/pod_template.kubernetes-helm-yaml | 4 ++++ charts/airflow/values.yaml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/charts/airflow/files/pod_template.kubernetes-helm-yaml b/charts/airflow/files/pod_template.kubernetes-helm-yaml index b4c23254..8ecdf496 100644 --- a/charts/airflow/files/pod_template.kubernetes-helm-yaml +++ b/charts/airflow/files/pod_template.kubernetes-helm-yaml @@ -78,6 +78,10 @@ spec: volumeMounts: {{- $volumeMounts | indent 8 }} {{- end }} + {{- if .Values.airflow.kubernetesPodTemplate.lifecycle }} + lifecycle: + {{- toYaml .Values.airflow.kubernetesPodTemplate.lifecycle | nindent 8 }} + {{- end }} {{- if .Values.airflow.kubernetesPodTemplate.extraContainers }} {{- toYaml .Values.airflow.kubernetesPodTemplate.extraContainers | nindent 4 }} {{- end }} diff --git a/charts/airflow/values.yaml b/charts/airflow/values.yaml index 9b7b987d..5715831e 100644 --- a/charts/airflow/values.yaml +++ b/charts/airflow/values.yaml @@ -322,6 +322,11 @@ airflow: ## podAnnotations: {} + ## run commands after the container starts (postStart) or before the container stops (preStop) + ## - spec for container lifecycle + ## https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/ + lifecycle: {} + ## the security context for the Pod template ## - spec for PodSecurityContext: ## https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#podsecuritycontext-v1-core