ashb commented on a change in pull request #4772: [AIRFLOW-3937] 
KubernetesPodOperator support for envFrom configMapRef…
URL: https://github.com/apache/airflow/pull/4772#discussion_r262039389
 
 

 ##########
 File path: 
airflow/contrib/kubernetes/kubernetes_request_factory/kubernetes_request_factory.py
 ##########
 @@ -191,3 +191,10 @@ def extract_image_pull_secrets(pod, req):
     def extract_tolerations(pod, req):
         if pod.tolerations:
             req['spec']['tolerations'] = pod.tolerations
+
+    @staticmethod
+    def extract_env_from(pod, req):
+        for idx, configmap in enumerate(pod.envs_from_configmaps):
+            
req['spec']['containers'][0]['envFrom'][idx]['configMapRef']['name'] = 
configmap.name
 
 Review comment:
   I also don't think your tests are hitting this code path, as you have
   
   ```
           configmap = ConfigMapObject(name='test-configmap')
           configmap = """
   apiVersion: v1
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to