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/11/27 01:35:08 UTC

[GitHub] [airflow] tyg03485 commented on issue #6665: [AIRFLOW-6068] Make args of KubernetesPodOperator to get dict type

tyg03485 commented on issue #6665: [AIRFLOW-6068] Make args of KubernetesPodOperator to get dict type
URL: https://github.com/apache/airflow/pull/6665#issuecomment-558888779
 
 
   Um.. I thought there are some awkward point in args of KubernetesPodOperator.
   There are classes we optionally use for KubernetesPodOperator.
   Port, Volume, VolumeMount, Secret, PodRuntimeInfoEnv, Resources.
   But only Resource passed by `dict` type.
   In my exp of 1.10.4, i was confused what args passed should be dict or class type
    
   So, there are two way to unify of them.
   1. Resource could be changed Resource Type
   ```
   def __init__(self, ..., resources: Optional[Resources] = None ...)
   ```
   But, from using KubernetesPodOperator, we need to import all using class.
   
   2. Others args could be passed by `dict` Type.
   like my PR.
   
   
   But as you say, if `kubernetes.client.models` is better, we could deprecated previous class based `K8SModel`. (e.g. `PodRuntimeInfoEnv` -> `V1EnvVar`). And just pass them all instance from kubernetes.client.models

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