You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "George Miller (JIRA)" <ji...@apache.org> on 2019/06/24 22:36:00 UTC
[jira] [Updated] (AIRFLOW-4845) Kubernetes Executor Run As User 0
does not work
[ https://issues.apache.org/jira/browse/AIRFLOW-4845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Miller updated AIRFLOW-4845:
-----------------------------------
Description:
If I set run_as_user in the kubernetes section of airflow.cfg to 0, that does not get applied. The problem is this code
```
if self.kube_config.worker_run_as_user:
security_context['runAsUser'] = self.kube_config.worker_run_as_user
```
if self.kube_config.worker_run_as_user is an int 0, that get implied as a False and thus the security context never gets set. This also happens to fsGroup. A small change needs to be made to make this check against a "" (empty string) as that's what it's defaulted to in the default airflow config file.
Here is my pr [https://github.com/apache/airflow/pull/5474]
was:
If I set run_as_user in the kubernetes section of airflow.cfg to 0, that does not get applied. The problem is this code
```
if self.kube_config.worker_run_as_user:
security_context['runAsUser'] = self.kube_config.worker_run_as_user
```
if self.kube_config.worker_run_as_user is an int 0, that get implied as a False and thus the security context never gets set. This also happens to fsGroup. A small change needs to be made to make this check against a "" (empty string) as that's what it's defaulted to in the default airflow config file.
> Kubernetes Executor Run As User 0 does not work
> -----------------------------------------------
>
> Key: AIRFLOW-4845
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4845
> Project: Apache Airflow
> Issue Type: New Feature
> Components: executors
> Affects Versions: 1.10.4
> Reporter: George Miller
> Assignee: George Miller
> Priority: Major
>
> If I set run_as_user in the kubernetes section of airflow.cfg to 0, that does not get applied. The problem is this code
> ```
> if self.kube_config.worker_run_as_user:
> security_context['runAsUser'] = self.kube_config.worker_run_as_user
> ```
> if self.kube_config.worker_run_as_user is an int 0, that get implied as a False and thus the security context never gets set. This also happens to fsGroup. A small change needs to be made to make this check against a "" (empty string) as that's what it's defaulted to in the default airflow config file.
>
> Here is my pr [https://github.com/apache/airflow/pull/5474]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)