Skip to content

Commit

Permalink
fix: Remove / when repoSubPath is not defined
Browse files Browse the repository at this point in the history
Signed-off-by: Albert Franzi <[email protected]>
  • Loading branch information
afranzi committed Sep 18, 2024
1 parent a5e146b commit 92e88c5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions charts/airflow/templates/_helpers/common.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,15 @@ http
The path containing DAG files
*/}}
{{- define "airflow.dags.path" -}}
{{- if .Values.dags.gitSync.enabled -}}
{{- printf "%s/repo/%s" (.Values.dags.path | trimSuffix "/") (.Values.dags.gitSync.repoSubPath | trimAll "/") -}}
{{- else -}}
{{- printf .Values.dags.path -}}
{{- end -}}
{{- if .Values.dags.gitSync.enabled -}}
{{- if .Values.dags.gitSync.repoSubPath -}}
{{- printf "%s/repo/%s" (.Values.dags.path | trimSuffix "/") (.Values.dags.gitSync.repoSubPath | trimAll "/") -}}
{{- else -}}
{{- printf "%s/repo" (.Values.dags.path | trimSuffix "/") -}}
{{- end -}}
{{- else -}}
{{- printf "%s" (.Values.dags.path | trimSuffix "/") -}}
{{- end -}}
{{- end -}}
{{/*
Expand Down

0 comments on commit 92e88c5

Please sign in to comment.