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 2020/12/28 20:09:55 UTC

[GitHub] [airflow] timofal opened a new issue #13348: env_vars of KubernetesPodOperator are not truly templated

timofal opened a new issue #13348:
URL: https://github.com/apache/airflow/issues/13348


   Hello.
   
   Property `env_vars` or `KubernetesPodOperator` is not truly templated. Despite documentation and docstring claims it is.
   
   The reason is that class `V1EnvVar` from k8s official python client doesn't contain field `template_fields` that is required to render template fields. (See method `BaseOperator._render_nested_template_fields`.)
   
   The following workaround works for me.
   ```
   from kubernetes.client.models.v1_env_var import V1EnvVar
   
   if not hasattr(V1EnvVar, 'template_fields'):
       V1EnvVar.template_fields = ('value',)
   
   my_task = GKEStartPodOperator(task_id="my_task_id", ................... etc.
   ```
   
   


----------------------------------------------------------------
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



[GitHub] [airflow] dimberman closed issue #13348: env_vars of KubernetesPodOperator are not truly templated

Posted by GitBox <gi...@apache.org>.
dimberman closed issue #13348:
URL: https://github.com/apache/airflow/issues/13348


   


----------------------------------------------------------------
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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #13348: env_vars of KubernetesPodOperator are not truly templated

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #13348:
URL: https://github.com/apache/airflow/issues/13348#issuecomment-751849024


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
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