[stable/airflow] Add DAG git ref to the scheduler and web pod annotat… (#18956)

* [stable/airflow] Add a flag to disable disruption budget pod

Pod Disruptions may be disabled on Kubernetes cluster.

Signed-off-by: Olivier Monnier <5500018+omonnier@users.noreply.github.com>

* [stable/airflow] Add DAG git ref to the scheduler and web pod annotations

This will trigger a pod restart whenever the git ref
changes on the git project containing the DAGS.

Signed-off-by: Olivier Monnier <5500018+omonnier@users.noreply.github.com>
This commit is contained in:
omonnier
2019-11-18 07:47:41 -08:00
committed by Kubernetes Prow Robot
parent 16f372d5ab
commit 3479c06794
6 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: Airflow is a platform to programmatically author, schedule and monitor workflows
name: airflow
version: 4.4.1
version: 4.4.3
appVersion: 1.10.4
icon: https://airflow.apache.org/_images/pin_large.png
home: https://airflow.apache.org/
+2 -1
View File
@@ -353,7 +353,8 @@ The following table lists the configurable parameters of the Airflow chart and t
| `airflow.schedulerNumRuns` | -1 to loop indefinitively, 1 to restart after each exec | |
| `airflow.webReplicas` | how many replicas for web server | `1` |
| `airflow.config` | custom airflow configuration env variables | `{}` |
| `airflow.podDisruptionBudget` | control pod disruption budget | `{'maxUnavailable': 1}` |
| `airflow.podDisruptionBudget.enabled` | enable pod disruption budget | `true` |
| `airflow.podDisruptionBudget.maxUnavailable` | control pod disruption budget | `1` |
| `airflow.extraEnv` | specify additional environment variables to mount | `{}` |
| `airflow.extraConfigmapMounts` | Additional configMap volume mounts on the airflow pods. | `[]` |
| `airflow.podAnnotations` | annotations for scheduler, worker and web pods | `{}` |
@@ -37,6 +37,9 @@ spec:
checksum/config-scripts: {{ include (print $.Template.BasePath "/configmap-scripts.yaml") . | sha256sum }}
checksum/config-variables-pools: {{ include (print $.Template.BasePath "/configmap-variables-pools.yaml") . | sha256sum }}
checksum/secret-connections: {{ include (print $.Template.BasePath "/secret-connections.yaml") . | sha256sum }}
{{- if and ( .Values.dags.git.url ) ( .Values.dags.git.ref ) }}
checksum/dags-git-ref: {{ .Values.dags.git.ref }}
{{- end }}
{{- if .Values.airflow.podAnnotations }}
{{ toYaml .Values.airflow.podAnnotations | indent 8 }}
{{- end }}
@@ -35,6 +35,9 @@ spec:
checksum/config-env: {{ include (print $.Template.BasePath "/configmap-env.yaml") . | sha256sum }}
checksum/config-git-clone: {{ include (print $.Template.BasePath "/configmap-git-clone.yaml") . | sha256sum }}
checksum/config-scripts: {{ include (print $.Template.BasePath "/configmap-scripts.yaml") . | sha256sum }}
{{- if and ( .Values.dags.git.url ) ( .Values.dags.git.ref ) }}
checksum/dags-git-ref: {{ .Values.dags.git.ref }}
{{- end }}
{{- if .Values.airflow.podAnnotations }}
{{ toYaml .Values.airflow.podAnnotations | indent 8 }}
{{- end }}
@@ -1,3 +1,4 @@
{{- if .Values.airflow.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
@@ -15,3 +16,4 @@ spec:
component: scheduler
release: {{ .Release.Name }}
{{ toYaml .Values.airflow.podDisruptionBudget | indent 2 }}
{{- end }}
+1
View File
@@ -108,6 +108,7 @@ airflow:
##
## Configure pod disruption budget for the scheduler
podDisruptionBudget:
enabled: true
maxUnavailable: 1
## Add custom connections
## Use this to add Airflow connections for operators you use