{{- if .Files.Glob "files/dags/*.py" }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "airflow.fullname" . }}-dag-files
  labels:
    app.kubernetes.io/name: {{ include "airflow.name" . }}
    helm.sh/chart: {{ include "airflow.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
data:
{{ (.Files.Glob "files/dags/*.py").AsConfig | indent 2 }}
{{ end }}