我正在尝试使用Kubernetes Executor在我创建的dag的单独Pod中进行处理!
我们要执行的步骤之一是同步git以访问dag,首先我将以下参数放在airflow.cfg中,但在这些条件下我无法处理简单的python运算符(它不会创建Pod )。有没有人设法做到这一点? git sync的设置正确吗?
Airflow.cfg:
# 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
答案 0 :(得分:0)
我能够通过配置以下属性来使其工作:
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>
我的存储库中有一个文件夹(dag),dag存储在其中。