This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new 502b6ea use the correct claim name in the webserver (#9688)
502b6ea is described below
commit 502b6ea65790ab0bfe35ab80d3a521de8df541d5
Author: Aneesh Joseph <[email protected]>
AuthorDate: Tue Jul 7 22:38:35 2020 +0530
use the correct claim name in the webserver (#9688)
---
chart/templates/_helpers.yaml | 2 +-
chart/templates/configmap.yaml | 2 +-
chart/templates/webserver/webserver-deployment.yaml | 2 +-
chart/tests/git-sync-scheduler_test.yaml | 13 +++++++++++++
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/chart/templates/_helpers.yaml b/chart/templates/_helpers.yaml
index 898924f..833d6e2 100644
--- a/chart/templates/_helpers.yaml
+++ b/chart/templates/_helpers.yaml
@@ -268,7 +268,7 @@ log_connections = {{ .Values.pgbouncer.logConnections }}
{{- end -}}
{{ define "airflow_dags_volume_claim" -}}
-{{- if and .Values.dags.persistence.enabled
.Values.dags.persistence.existingClaim -}}
+{{- if .Values.dags.persistence.existingClaim -}}
{{ .Values.dags.persistence.existingClaim }}
{{- else -}}
{{ .Release.Name }}-dags
diff --git a/chart/templates/configmap.yaml b/chart/templates/configmap.yaml
index 229399c..1b876d6 100644
--- a/chart/templates/configmap.yaml
+++ b/chart/templates/configmap.yaml
@@ -101,7 +101,7 @@ data:
git_dags_folder_mount_point = {{ include "airflow_dags_mount_path" . }}
dags_volume_mount_point = {{ include "airflow_dags_mount_path" . }}
{{- if .Values.dags.persistence.enabled }}
- dags_volume_claim = {{ .Release.Name }}-dags
+ dags_volume_claim = {{ include "airflow_dags_volume_claim" . }}
dags_volume_subpath = {{.Values.dags.gitSync.dest }}/{{
.Values.dags.gitSync.subPath }}
{{- else }}
git_repo = {{ .Values.dags.gitSync.repo }}
diff --git a/chart/templates/webserver/webserver-deployment.yaml
b/chart/templates/webserver/webserver-deployment.yaml
index 9ea2bc1..fe7dee5 100644
--- a/chart/templates/webserver/webserver-deployment.yaml
+++ b/chart/templates/webserver/webserver-deployment.yaml
@@ -145,7 +145,7 @@ spec:
{{- if .Values.dags.persistence.enabled }}
- name: dags
persistentVolumeClaim:
- claimName: {{ .Release.Name }}-dags
+ claimName: {{ template "airflow_dags_volume_claim" . }}
{{- else if .Values.dags.gitSync.enabled }}
- name: dags
emptyDir: {}
diff --git a/chart/tests/git-sync-scheduler_test.yaml
b/chart/tests/git-sync-scheduler_test.yaml
index 10d2288..a278cb8 100644
--- a/chart/tests/git-sync-scheduler_test.yaml
+++ b/chart/tests/git-sync-scheduler_test.yaml
@@ -133,3 +133,16 @@ tests:
secretKeyRef:
name: user-pass-secret
key: GIT_SYNC_PASSWORD
+ - it: should set the volume claim correctly when using an existing claim
+ set:
+ dags:
+ persistence:
+ enabled: true
+ existingClaim: test-claim
+ asserts:
+ - contains:
+ path: spec.template.spec.volumes
+ content:
+ name: dags
+ persistentVolumeClaim:
+ claimName: test-claim