首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Airflow x Bitbucket (使用Kubernetes Executor)

Airflow x Bitbucket (使用Kubernetes Executor)
EN

Stack Overflow用户
提问于 2019-08-16 23:26:00
回答 1查看 706关注 0票数 0

我正在尝试使用Kubernetes Executor在单独的pod中处理我创建的dags!

我们有一个步骤是同步git来访问dags,首先我在airflow.cfg中放了以下参数,但在这些条件下我不能处理简单的python操作符(它不会创建pod)。有没有人能做到这一点?git sync的设置是否正确?

Airflow.cfg:

代码语言:javascript
复制
# For either git sync or volume mounted DAGs, the worker will look in this subpath for DAGs
dags_volume_subpath =

# For DAGs mounted via a volume claim (mutually exclusive with git-sync and host path)
dags_volume_claim =

# For volume mounted logs, the worker will look in this subpath for logs
logs_volume_subpath =

# A shared volume claim for the logs
logs_volume_claim =

# For DAGs mounted via a hostPath volume (mutually exclusive with volume claim and git-sync)
# Useful in local environment, discouraged in production
dags_volume_host =

# A hostPath volume for the logs
# Useful in local environment, discouraged in production
logs_volume_host =

# A list of configMapsRefs to envFrom. If more than one configMap is
# specified, provide a comma separated list: configmap_a,configmap_b
env_from_configmap_ref =

# A list of secretRefs to envFrom. If more than one secret is
# specified, provide a comma separated list: secret_a,secret_b
env_from_secret_ref =

# Git credentials and repository for DAGs mounted via Git (mutually exclusive with volume claim)
git_repo = git@bitbucket.org:myuser/airflow-kubernetes.git
git_branch = master
git_subpath = 

# Use git_user and git_password for user authentication or git_ssh_key_secret_name and git_ssh_key_secret_key
# for SSH authentication
git_user =
git_password =
git_sync_root = git@bitbucket.org:myuser/airflow-kubernetes.git
git_sync_dest = /airflow/dags

# Mount point of the volume if git-sync is being used.
# i.e. /airflow/dags
git_dags_folder_mount_point = /airflow/dags

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-05-06 06:26:25

我可以通过配置以下属性来实现这一点:

代码语言:javascript
复制
dags_in_image = False
dags_volume_subpath = dags
git_repo = https://github.com/<user-name>/<repo-name>.git
git_branch = master
git_subpath = dags
git_user = <git-username>
git_password = <git-password>
git_sync_root = /git
git_sync_dest = repo
git_dags_folder_mount_point = <path-to-dag-directory-locally>

我的存储库中有一个文件夹( dags ),dags存储在其中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57527280

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档