Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template extra volumes in helm chart #29357

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions chart/files/pod-template-file.kubernetes-helm-yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
{{- toYaml .Values.volumeMounts | nindent 8 }}
{{- end }}
{{- if .Values.workers.extraVolumeMounts }}
{{- toYaml .Values.workers.extraVolumeMounts | nindent 8 }}
{{- tpl (toYaml .Values.workers.extraVolumeMounts) . | nindent 8 }}
{{- end }}
{{- if .Values.workers.extraContainers }}
{{- toYaml .Values.workers.extraContainers | nindent 4 }}
Expand Down Expand Up @@ -119,5 +119,5 @@ spec:
{{- toYaml .Values.volumes | nindent 2 }}
{{- end }}
{{- if .Values.workers.extraVolumes }}
{{- toYaml .Values.workers.extraVolumes | nindent 2 }}
{{- tpl (toYaml .Values.workers.extraVolumes) . | nindent 2 }}
{{- end }}
4 changes: 2 additions & 2 deletions chart/templates/jobs/migrate-database-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ spec:
{{- toYaml .Values.volumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.migrateDatabaseJob.extraVolumeMounts }}
{{ toYaml .Values.migrateDatabaseJob.extraVolumeMounts | nindent 12 }}
{{ tpl (toYaml .Values.migrateDatabaseJob.extraVolumeMounts) . | nindent 12 }}
{{- end }}
{{- if .Values.migrateDatabaseJob.extraContainers }}
{{- toYaml .Values.migrateDatabaseJob.extraContainers | nindent 8 }}
Expand All @@ -119,6 +119,6 @@ spec:
{{- toYaml .Values.volumes | nindent 8 }}
{{- end }}
{{- if .Values.migrateDatabaseJob.extraVolumes }}
{{- toYaml .Values.migrateDatabaseJob.extraVolumes | nindent 8 }}
{{- tpl (toYaml .Values.migrateDatabaseJob.extraVolumes) . | nindent 8 }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions chart/templates/scheduler/scheduler-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ spec:
{{- toYaml .Values.volumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.scheduler.extraVolumeMounts }}
{{- toYaml .Values.scheduler.extraVolumeMounts | nindent 12 }}
{{- tpl (toYaml .Values.scheduler.extraVolumeMounts) . | nindent 12 }}
{{- end }}
{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
{{- include "airflow_webserver_config_mount" . | nindent 12 }}
Expand Down Expand Up @@ -279,7 +279,7 @@ spec:
{{- toYaml .Values.volumes | nindent 8 }}
{{- end }}
{{- if .Values.scheduler.extraVolumes }}
{{- toYaml .Values.scheduler.extraVolumes | nindent 8 }}
{{- tpl (toYaml .Values.scheduler.extraVolumes) . | nindent 8 }}
{{- end }}
{{- if .Values.logs.persistence.enabled }}
- name: logs
Expand Down
4 changes: 2 additions & 2 deletions chart/templates/webserver/webserver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ spec:
{{- toYaml .Values.volumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.webserver.extraVolumeMounts }}
{{- toYaml .Values.webserver.extraVolumeMounts | nindent 12 }}
{{- tpl (toYaml .Values.webserver.extraVolumeMounts) . | nindent 12 }}
{{- end }}
ports:
- name: airflow-ui
Expand Down Expand Up @@ -264,5 +264,5 @@ spec:
{{- toYaml .Values.volumes | nindent 8 }}
{{- end }}
{{- if .Values.webserver.extraVolumes }}
{{- toYaml .Values.webserver.extraVolumes | nindent 8 }}
{{- tpl (toYaml .Values.webserver.extraVolumes) . | nindent 8 }}
{{- end }}
52 changes: 48 additions & 4 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,18 @@ workers:
# Add additional init containers into workers.
extraInitContainers: []

# Mount additional volumes into worker.
# Mount additional volumes into worker. It can be templated like in the following example:
# extraVolumes:
# - name: my-templated-extra-volume
# secret:
# secretName: '{{ include "my_secret_template" . }}'
# defaultMode: 0640
# optional: true
#
# extraVolumeMounts:
# - name: my-templated-extra-volume
# mountPath: "{{ .Values.my_custom_path }}"
# readOnly: true
extraVolumes: []
extraVolumeMounts: []

Expand Down Expand Up @@ -713,7 +724,18 @@ scheduler:
# Add additional init containers into scheduler.
extraInitContainers: []

# Mount additional volumes into scheduler.
# Mount additional volumes into scheduler. It can be templated like in the following example:
# extraVolumes:
# - name: my-templated-extra-volume
# secret:
# secretName: '{{ include "my_secret_template" . }}'
# defaultMode: 0640
# optional: true
#
# extraVolumeMounts:
# - name: my-templated-extra-volume
# mountPath: "{{ .Values.my_custom_path }}"
# readOnly: true
extraVolumes: []
extraVolumeMounts: []

Expand Down Expand Up @@ -894,7 +916,18 @@ migrateDatabaseJob:
# Launch additional containers into database migration job
extraContainers: []

# Mount additional volumes into database migration job
# Mount additional volumes into database migration job. It can be templated like in the following example:
# extraVolumes:
# - name: my-templated-extra-volume
# secret:
# secretName: '{{ include "my_secret_template" . }}'
# defaultMode: 0640
# optional: true
#
# extraVolumeMounts:
# - name: my-templated-extra-volume
# mountPath: "{{ .Values.my_custom_path }}"
# readOnly: true
extraVolumes: []
extraVolumeMounts: []

Expand Down Expand Up @@ -1003,7 +1036,18 @@ webserver:
# Add additional init containers into webserver.
extraInitContainers: []

# Mount additional volumes into webserver.
# Mount additional volumes into webserver. It can be templated like in the following example:
# extraVolumes:
# - name: my-templated-extra-volume
# secret:
# secretName: '{{ include "my_secret_template" . }}'
# defaultMode: 0640
# optional: true
#
# extraVolumeMounts:
# - name: my-templated-extra-volume
# mountPath: "{{ .Values.my_custom_path }}"
# readOnly: true
extraVolumes: []
extraVolumeMounts: []

Expand Down