气流KubernetesPodOperator:传递securityContext参数 [英] Airflow KubernetesPodOperator: pass securityContext parameter

查看:81
本文介绍了气流KubernetesPodOperator:传递securityContext参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以举个例子,当通过 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_containerwhose documentation appears to have been cut off mid sentence.

这篇关于气流KubernetesPodOperator:传递securityContext参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆