You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/03/05 17:39:22 UTC

[GitHub] [airflow] galuszkak commented on a change in pull request #4772: [AIRFLOW-3937] KubernetesPodOperator support for envFrom configMapRef…

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

 ##########
 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
+        for idx, secret in enumerate(pod.envs_from_secrets):
+            req['spec']['containers'][0]['envFrom'][idx]['secretRef']['name'] = secret.name
 
 Review comment:
   @ashb done, fixed.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services