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