【发布时间】:2021-10-03 17:41:15
【问题描述】:
我正在使用带有KubernetesPodOperator 的 Airflow2.0,想要运行一个命令,该命令将操作员运行的图像内部的文件用作参数。这是我用的:
KubernetesPodOperator(
namespace=commons.kubernetes_namespace,
labels=commons.labels,
image=f"myregistry.io/myimage:{config['IMAGE_TAG']}",
arguments=[
"python",
"run_module.py ",
"-i",
f'args/{config["INPUT_DIR"]}/{task_id}.json'
],
name=dag_name + task_id,
task_id=task_id,
secrets=[secret_volume]
)
但这给了我错误:
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: args/airflow2test/processing-pipeline.json
图片没有使用任何宏。
有人知道吗?我做错了什么?
【问题讨论】:
标签: kubernetes airflow airflow-2.x kubernetespodoperator