diff --git a/chart/templates/_helpers.yaml b/chart/templates/_helpers.yaml index 929861e08b846..059d64d3174ab 100644 --- a/chart/templates/_helpers.yaml +++ b/chart/templates/_helpers.yaml @@ -321,7 +321,7 @@ server_tls_key_file = /etc/pgbouncer/server.key {{- 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/webserver/webserver-deployment.yaml b/chart/templates/webserver/webserver-deployment.yaml index f6f781f2fd8c6..a3c42c0cebf33 100644 --- a/chart/templates/webserver/webserver-deployment.yaml +++ b/chart/templates/webserver/webserver-deployment.yaml @@ -146,7 +146,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: {}