Skip to content

Commit

Permalink
[stable/airflow] Add container and volume extension points (helm#11775)
Browse files Browse the repository at this point in the history
* [stable/airflow] Add extraContainers/VolumeMounts/Volumes

Signed-off-by: Steve Larkin <[email protected]>

* [stable/airflow] Step version

Signed-off-by: Steve Larkin <[email protected]>
  • Loading branch information
Steve Larkin authored and k8s-ci-robot committed Feb 27, 2019
1 parent 3efc7cd commit cfdc2bd
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/airflow/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
description: Airflow is a platform to programmatically author, schedule and monitor workflows
name: airflow
version: 2.0.2
version: 2.1.0
appVersion: 1.10.0
icon: https://airflow.apache.org/_images/pin_large.png
home: https://airflow.apache.org/
Expand Down
3 changes: 3 additions & 0 deletions stable/airflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ The following table lists the configurable parameters of the Airflow chart and t
| `airflow.secretsMapping` | override any environment variable with a secret | |
| `airflow.extraConfigmapMounts` | Additional configMap volume mounts on the airflow pods. | `[]` |
| `airflow.podAnnotations` | annotations for scheduler, worker and web pods | `{}` |
| `airflow.extraContainers` | additional containers to run in the scheduler, worker & web pods | `[]` |
| `airflow.extraVolumeMounts` | additional volumeMounts to the main container in scheduler, worker & web pods | `[]`|
| `airflow.extraVolumes` | additional volumes for the scheduler, worker & web pods | `[]` |
| `workers.enabled` | enable workers | `true` |
| `workers.replicas` | number of workers pods to launch | `1` |
| `workers.resources` | custom resource configuration for worker pod | `{}` |
Expand Down
9 changes: 9 additions & 0 deletions stable/airflow/templates/deployments-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ spec:
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
{{- end }}
{{- if .Values.airflow.extraVolumeMounts }}
{{ toYaml .Values.airflow.extraVolumeMounts | indent 12 }}
{{- end }}
args:
- "bash"
- "-c"
Expand Down Expand Up @@ -128,6 +131,9 @@ spec:
echo "executing scheduler" &&
airflow scheduler -n {{ .Values.airflow.schedulerNumRuns }}
{{- end }}
{{- if .Values.airflow.extraContainers }}
{{ toYaml .Values.airflow.extraContainers | indent 8 }}
{{- end }}
volumes:
- name: scripts
configMap:
Expand Down Expand Up @@ -168,3 +174,6 @@ spec:
configMap:
name: {{ .configMap }}
{{- end }}
{{- if .Values.airflow.extraVolumes }}
{{ toYaml .Values.airflow.extraVolumes | indent 8 }}
{{- end }}
11 changes: 10 additions & 1 deletion stable/airflow/templates/deployments-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ spec:
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
{{- end }}
{{- if .Values.airflow.extraVolumeMounts }}
{{ toYaml .Values.airflow.extraVolumeMounts | indent 12 }}
{{- end }}
args:
- "bash"
- "-c"
Expand Down Expand Up @@ -125,6 +128,9 @@ spec:
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 5
{{- if .Values.airflow.extraContainers }}
{{ toYaml .Values.airflow.extraContainers | indent 8 }}
{{- end }}
volumes:
- name: scripts
configMap:
Expand Down Expand Up @@ -158,4 +164,7 @@ spec:
- name: {{ .name }}
configMap:
name: {{ .configMap }}
{{- end }}
{{- end }}
{{- if .Values.airflow.extraVolumes }}
{{ toYaml .Values.airflow.extraVolumes | indent 8 }}
{{- end }}
9 changes: 9 additions & 0 deletions stable/airflow/templates/statefulsets-workers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ spec:
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
{{- end }}
{{- if .Values.airflow.extraVolumeMounts }}
{{ toYaml .Values.airflow.extraVolumeMounts | indent 12 }}
{{- end }}
args:
- "bash"
- "-c"
Expand Down Expand Up @@ -129,6 +132,9 @@ spec:
protocol: TCP
resources:
{{ toYaml .Values.workers.resources | indent 12 }}
{{- if .Values.airflow.extraContainers }}
{{ toYaml .Values.airflow.extraContainers | indent 8 }}
{{- end }}
volumes:
- name: scripts
configMap:
Expand Down Expand Up @@ -163,4 +169,7 @@ spec:
configMap:
name: {{ .configMap }}
{{- end }}
{{- if .Values.airflow.extraVolumes }}
{{ toYaml .Values.airflow.extraVolumes | indent 8 }}
{{- end }}
{{- end }}
16 changes: 16 additions & 0 deletions stable/airflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,22 @@ airflow:
podAnnotations: {}
## Example:
## iam.amazonaws.com/role: airflow-Role
extraContainers: []
## Additional containers to run alongside the Scheduler, Worker and Web pods
## This could, for example, be used to run a sidecar that syncs DAGs from object storage.
# - name: s3-sync
# image: my-user/s3sync:latest
# volumeMounts:
# - name: synchronised-dags
# mountPath: /dags
extraVolumeMounts: []
## Additional volumeMounts to the main containers in the Scheduler, Worker and Web pods.
# - name: synchronised-dags
# mountPath: /usr/local/airflow/dags
extraVolumes: []
## Additional volumes for the Scheduler, Worker and Web pods.
# - name: synchronised-dags
# emptyDir: {}
##
## Workers configuration
workers:
Expand Down

0 comments on commit cfdc2bd

Please sign in to comment.