气流KubernetesPodOperator:传递securityContext参数 [英] Airflow KubernetesPodOperator: pass securityContext parameter
问题描述
任何人都可以举个例子,当通过 KubernetesPodOperator 创建pod时,将一些参数作为 runAsNonRoot 传递吗?
Anyone could give me an example on passing some parameters as "runAsNonRoot" when creating a pod through KubernetesPodOperator?
我试图仔细阅读文档,但不清楚。
I've tried to dig through the documentation but it is not clear.
推荐答案
目前看来,在操作员中得到支持。
您可以看到 KubePodOp
具有一个使 PodGenerator
。然后,它将添加所有卷并在生成之前将其装入。这在任何时候都不会调用唯一可以传递 SecurityContext
add_init_container
其文档似乎已被中途切断
At current this does not appear to be supported in the operator.
You can see that the KubePodOp
has an init that makes a PodGenerator
. It then adds all the volumes and mounts to it before generating. This does not at any point call the only method in which you could pass a SecurityContext
add_init_container
whose documentation appears to have been cut off mid sentence.
这篇关于气流KubernetesPodOperator:传递securityContext参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!