我的公司使用git-sync将压缩的dags同步到airflow。我们使用气流舵面图来展开气流。我想知道我是否可以让airflow只拾取特定文件夹中的压缩dags,比如git分支中的dags-dev,而不是所有的压缩dags?
下面是一些可能有用的参考资料。
气流舵图的值文件。https://github.com/helm/charts/blob/master/stable/airflow/values.yaml
我们的dags代码如下所示:
dags:
doNotPickle: true
git:
url: <git url>
ref: master
gitSync:
enabled: true
image:
repository: <some repo>
tag: 1.0.7
refreshTime: 60
initContainer:
enabled: true
image:
repository: <some repo>
tag: 1.0.7Airflow git同步配置如下所示:
AIRFLOW__KUBERNETES__DAGS_VOLUME_SUBPATH: repo # must match AIRFLOW__KUBERNETES__GIT_SUBPATH
AIRFLOW__KUBERNETES__GIT_REPO: <git repo>
AIRFLOW__KUBERNETES__GIT_BRANCH: master
AIRFLOW__KUBERNETES__GIT_DAGS_FOLDER_MOUNT_POINT: /opt/airflow/dags
AIRFLOW__KUBERNETES__GIT_USER: <some user>
AIRFLOW__KUBERNETES__GIT_PASSWORD: <some password>
AIRFLOW__KUBERNETES__GIT_SYNC_CONTAINER_REPOSITORY: gitlab.beno.ai:4567/eng/external-images/k8s.gcr.io/git-sync
AIRFLOW__KUBERNETES__GIT_SYNC_CONTAINER_TAG: v3.1.1发布于 2021-05-10 18:54:04
您可以使用.airflowignore文件定义要忽略的文件夹/文件列表
https://airflow.apache.org/docs/apache-airflow/stable/concepts.html#airflowignore
https://stackoverflow.com/questions/63609207
复制相似问题