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

use the correct name in the webserver & configmap when using an existing volume claim #9688

Merged
merged 1 commit into from
Jul 7, 2020
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
2 changes: 1 addition & 1 deletion chart/templates/_helpers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/webserver/webserver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down
13 changes: 13 additions & 0 deletions chart/tests/git-sync-scheduler_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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