Skip to content

Commit ef639a1

Browse files
liu-ziyangZiyang Liu
authored andcommitted
[stable/airflow]Add optional security context to airflow deployments (helm#21024)
* Add optional security context to airflow deployments Signed-off-by: Ziyang Liu <[email protected]> * Address a typo in README.md Signed-off-by: Ziyang Liu <[email protected]> Signed-off-by: Ziyang Liu <[email protected]> * add missing service account name to flower and web Signed-off-by: Ziyang Liu <[email protected]> * add missing service account name to flower and web Signed-off-by: Ziyang Liu <[email protected]> * update version Signed-off-by: Ziyang Liu <[email protected]> Co-authored-by: Ziyang Liu <[email protected]>
1 parent c6d7597 commit ef639a1

File tree

6 files changed

+23
-2
lines changed

6 files changed

+23
-2
lines changed

stable/airflow/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: Airflow is a platform to programmatically author, schedule and monitor workflows
33
name: airflow
4-
version: 6.2.1
4+
version: 6.3.0
55
appVersion: 1.10.4
66
icon: https://airflow.apache.org/_images/pin_large.png
77
home: https://airflow.apache.org/

stable/airflow/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ The following table lists the configurable parameters of the Airflow chart and t
399399
| `flower.service.type` | service type for Flower UI | `ClusterIP` |
400400
| `flower.service.annotations` | (optional) service annotations for Flower UI | `{}` |
401401
| `flower.service.externalPort` | (optional) external port for Flower UI | `5555` |
402+
| `flower.securityContext` | (optional) security context for the flower deployment | `{}` |
402403
| `web.baseUrl` | webserver UI URL | `http://localhost:8080` |
403404
| `web.resources` | custom resource configuration for web pod | `{}` |
404405
| `web.labels` | labels for the web deployment | `{}` |
@@ -417,10 +418,12 @@ The following table lists the configurable parameters of the Airflow chart and t
417418
| `web.initialDelaySeconds` | initial delay on livenessprobe before checking if webserver is available | `360` |
418419
| `web.secretsDir` | directory in which to mount secrets on webserver nodes | /var/airflow/secrets |
419420
| `web.secrets` | secrets to mount as volumes on webserver nodes | [] |
421+
| `web.securityContext` | (optional) security context for the web deployment | `{}` |
420422
| `scheduler.resources` | custom resource configuration for scheduler pod | `{}` |
421423
| `scheduler.labels` | labels for the scheduler deployment | `{}` |
422424
| `scheduler.annotations` | annotations for the scheduler deployment | `{}` |
423425
| `scheduler.podAnnotations` | podAnnotations for the scheduler deployment | `{}` |
426+
| `scheduler.securityContext` | (optional) security context for the scheduler deployment| `{}` |
424427
| `workers.enabled` | enable workers | `true` |
425428
| `workers.replicas` | number of workers pods to launch | `1` |
426429
| `workers.terminationPeriod` | gracefull termination period for workers to stop | `30` |
@@ -433,6 +436,7 @@ The following table lists the configurable parameters of the Airflow chart and t
433436
| `workers.podAnnotations` | annotations for the worker pods | `{}` |
434437
| `workers.secretsDir` | directory in which to mount secrets on worker nodes | /var/airflow/secrets |
435438
| `workers.secrets` | secrets to mount as volumes on worker nodes | [] |
439+
| `workers.securityContext` | (optional) security context for the worker statefulSet | `{}` |
436440
| `nodeSelector` | Node labels for pod assignment | `{}` |
437441
| `affinity` | Affinity labels for pod assignment | `{}` |
438442
| `tolerations` | Toleration labels for pod assignment | `[]` |

stable/airflow/templates/deployments-flower.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ spec:
5454
{{- if .Values.flower.tolerations }}
5555
tolerations:
5656
{{ toYaml .Values.flower.tolerations | indent 8 }}
57+
{{- end }}
58+
serviceAccountName: {{ template "airflow.serviceAccountName" . }}
59+
{{- if .Values.flower.securityContext }}
60+
securityContext:
61+
{{ toYaml .Values.flower.securityContext | indent 8 }}
5762
{{- end }}
5863
containers:
5964
- name: {{ .Chart.Name }}-flower

stable/airflow/templates/deployments-scheduler.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ spec:
6767
{{- if .Values.scheduler.tolerations }}
6868
tolerations:
6969
{{ toYaml .Values.scheduler.tolerations | indent 8 }}
70+
{{- end }}
71+
{{- if .Values.scheduler.securityContext }}
72+
securityContext:
73+
{{ toYaml .Values.scheduler.securityContext | indent 8 }}
7074
{{- end }}
7175
serviceAccountName: {{ template "airflow.serviceAccountName" . }}
7276
{{- if .Values.dags.initContainer.enabled }}

stable/airflow/templates/deployments-web.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ spec:
6565
{{- if .Values.web.tolerations }}
6666
tolerations:
6767
{{ toYaml .Values.web.tolerations | indent 8 }}
68+
{{- end }}
69+
serviceAccountName: {{ template "airflow.serviceAccountName" . }}
70+
{{- if .Values.web.securityContext }}
71+
securityContext:
72+
{{ toYaml .Values.web.securityContext | indent 8 }}
6873
{{- end }}
6974
{{- if .Values.dags.initContainer.enabled }}
7075
initContainers:

stable/airflow/templates/statefulsets-workers.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ spec:
6969
tolerations:
7070
{{ toYaml .Values.workers.tolerations | indent 8 }}
7171
{{- end }}
72-
72+
{{- if .Values.workers.securityContext }}
73+
securityContext:
74+
{{ toYaml .Values.workers.securityContext | indent 8 }}
75+
{{- end }}
7376
{{- if .Values.dags.initContainer.enabled }}
7477
initContainers:
7578
- name: git-clone

0 commit comments

Comments
 (0)