0

我有一个场景,我想使用 Helm 来部署使用 KubernetesExecutor 的每个环境 Airflow 配置。

我遇到的问题是,当 KubernetesExecutor 生成它们时,我需要在 Worker Pod 中为每个环境 ConfigMaps 挂载调度程序。

我在 Web 和调度程序 pod 中很好地安装了这些 ConfigMap,但我没有看到告诉 KubernetesExecutor 安装特定 ConfigMap 的方法。

我在文档中没有看到如何做到这一点,但我不是唯一一个希望他们的 Docker 映像与环境无关并将所有内容抽象到 Helm 级别的人。

我们欢迎所有的建议 :)

谢谢!

4

1 回答 1

0

I believe the easiest way to do this is by specifying the env_from_configmap_ref setting in your airflow.cfg as described here. If the configmaps are the same name in your different environments, this should be quite straight forward, e.g.

[kubernetes]
...
env_from_configmap_ref = <your-airflow-configmap>
...

If you have configmaps with different names in different environments (and can't make naming consistent), then you may need to specify the airflow.cfg in a configmap itself like in this example.

于 2020-04-06T22:45:50.663 回答