Quentin Lemaire created AIRFLOW-5501:
----------------------------------------

             Summary: KubernetesPodOperator in_cluster default value overwrites 
config
                 Key: AIRFLOW-5501
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5501
             Project: Apache Airflow
          Issue Type: Bug
          Components: contrib
    Affects Versions: 1.10.5
            Reporter: Quentin Lemaire


Hi!

The default value of the parameter *in_cluster* of the 
*kube_client.get_kube_client* function is 
*in_cluster=conf.getboolean('kubernetes', 'in_cluster').* Therefore, the 
expected behavior is that when, *in_cluster* is not set, it takes the value in 
the configuration file.

However, the default value of *in_cluster* in *KubernetesPodOperator.py* is 
False and *in_cluster* is passed as a parameter when calling the 
*kube_client.get_kube_client* function. Therefore, it changes the expecting 
behavior by overwritting the default value. When *in_cluster* is not set when 
initializing *KubernetesPodOperator*, the value of *in_cluster* in 
*kube_client.get_kube_client* is False and not the value which is in the 
configuration file.

It is quite confusing because it can feel like the value in the configuration 
file is not working properly.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to