Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/airflow]Add optional security context to airflow deployments #21024

Merged
merged 7 commits into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/airflow/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Airflow is a platform to programmatically author, schedule and monitor workflows
name: airflow
version: 6.2.1
version: 6.2.2
liu-ziyang marked this conversation as resolved.
Show resolved Hide resolved
appVersion: 1.10.4
icon: https://airflow.apache.org/_images/pin_large.png
home: https://airflow.apache.org/
Expand Down
4 changes: 4 additions & 0 deletions stable/airflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ The following table lists the configurable parameters of the Airflow chart and t
| `flower.service.type` | service type for Flower UI | `ClusterIP` |
| `flower.service.annotations` | (optional) service annotations for Flower UI | `{}` |
| `flower.service.externalPort` | (optional) external port for Flower UI | `5555` |
| `flower.securityContext` | (optional) security context for the flower deployment | `{}` |
| `web.baseUrl` | webserver UI URL | `http://localhost:8080` |
| `web.resources` | custom resource configuration for web pod | `{}` |
| `web.labels` | labels for the web deployment | `{}` |
Expand All @@ -417,10 +418,12 @@ The following table lists the configurable parameters of the Airflow chart and t
| `web.initialDelaySeconds` | initial delay on livenessprobe before checking if webserver is available | `360` |
| `web.secretsDir` | directory in which to mount secrets on webserver nodes | /var/airflow/secrets |
| `web.secrets` | secrets to mount as volumes on webserver nodes | [] |
| `web.securityContext` | (optional) security context for the web deployment | `{}` |
| `scheduler.resources` | custom resource configuration for scheduler pod | `{}` |
| `scheduler.labels` | labels for the scheduler deployment | `{}` |
| `scheduler.annotations` | annotations for the scheduler deployment | `{}` |
| `scheduler.podAnnotations` | podAnnotations for the scheduler deployment | `{}` |
| `scheduler.securityContext` | (optional) security context for the scheduler deployment| `{}` |
| `workers.enabled` | enable workers | `true` |
| `workers.replicas` | number of workers pods to launch | `1` |
| `workers.terminationPeriod` | gracefull termination period for workers to stop | `30` |
Expand All @@ -433,6 +436,7 @@ The following table lists the configurable parameters of the Airflow chart and t
| `workers.podAnnotations` | annotations for the worker pods | `{}` |
| `workers.secretsDir` | directory in which to mount secrets on worker nodes | /var/airflow/secrets |
| `workers.secrets` | secrets to mount as volumes on worker nodes | [] |
| `workers.securityContext` | (optional) security context for the worker statefulSet | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `affinity` | Affinity labels for pod assignment | `{}` |
| `tolerations` | Toleration labels for pod assignment | `[]` |
Expand Down
5 changes: 5 additions & 0 deletions stable/airflow/templates/deployments-flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ spec:
{{- if .Values.flower.tolerations }}
tolerations:
{{ toYaml .Values.flower.tolerations | indent 8 }}
{{- end }}
serviceAccountName: {{ template "airflow.serviceAccountName" . }}
liu-ziyang marked this conversation as resolved.
Show resolved Hide resolved
{{- if .Values.flower.securityContext }}
securityContext:
{{ toYaml .Values.flower.securityContext | indent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-flower
Expand Down
4 changes: 4 additions & 0 deletions stable/airflow/templates/deployments-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ spec:
{{- if .Values.scheduler.tolerations }}
tolerations:
{{ toYaml .Values.scheduler.tolerations | indent 8 }}
{{- end }}
{{- if .Values.scheduler.securityContext }}
securityContext:
{{ toYaml .Values.scheduler.securityContext | indent 8 }}
{{- end }}
serviceAccountName: {{ template "airflow.serviceAccountName" . }}
{{- if .Values.dags.initContainer.enabled }}
Expand Down
5 changes: 5 additions & 0 deletions stable/airflow/templates/deployments-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ spec:
{{- if .Values.web.tolerations }}
tolerations:
{{ toYaml .Values.web.tolerations | indent 8 }}
{{- end }}
serviceAccountName: {{ template "airflow.serviceAccountName" . }}
{{- if .Values.web.securityContext }}
securityContext:
{{ toYaml .Values.web.securityContext | indent 8 }}
{{- end }}
{{- if .Values.dags.initContainer.enabled }}
initContainers:
Expand Down
5 changes: 4 additions & 1 deletion stable/airflow/templates/statefulsets-workers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ spec:
tolerations:
{{ toYaml .Values.workers.tolerations | indent 8 }}
{{- end }}

{{- if .Values.workers.securityContext }}
securityContext:
{{ toYaml .Values.workers.securityContext | indent 8 }}
{{- end }}
{{- if .Values.dags.initContainer.enabled }}
initContainers:
- name: git-clone
Expand Down