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/11/04 22:16:07 UTC

[GitHub] [airflow] HarryDunham opened a new issue #12100: KubernetesPodOperator templating the image parameter

HarryDunham opened a new issue #12100:
URL: https://github.com/apache/airflow/issues/12100


   Per the KubernetesPodOperator [template fields](https://airflow.apache.org/docs/stable/_api/airflow/contrib/operators/kubernetes_pod_operator/index.html#airflow.contrib.operators.kubernetes_pod_operator.KubernetesPodOperator.template_fields), `image` is listed as a parameter which can be templated. However, this is not reflected in the parameters documentation since it is missing the typical `(templated)` specifier within the docs.
   
   Additionally, it appears as though templating within the image parameter is not currently supported:
   ```
   Failed to apply default image tag "ACC_ID.dkr.ecr.REGION.amazonaws.com/IMAGE_NAME:{{ dag_run.conf.image_version }}": couldn't parse image reference "ACC_ID.dkr.ecr.REGION.amazonaws.com/IMAGE_NAME:{{ dag_run.conf.image_version }}": invalid reference format
   ```
   per the logs within our Kubernetes cluster (obviously with various fields within the URI removed).
   
   Therefore, should the [template fields](https://github.com/apache/airflow/blob/fcfc7f12421bd35a366324fe7814c90da8de5735/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py#L145) be altered to reflect this behavior or is this a bug and not working as intended?


----------------------------------------------------------------
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] HarryDunham commented on issue #12100: KubernetesPodOperator templating the image parameter

Posted by GitBox <gi...@apache.org>.
HarryDunham commented on issue #12100:
URL: https://github.com/apache/airflow/issues/12100#issuecomment-786677112


   After updating our deployment to Airflow `1.10.14`, we've found that this appears to be an issue related to airflow version `1.10.11`. For reference, pod events locally running on minikube with airflow version `1.10.11`:
   ```
   Events:
     Type     Reason         Age               From               Message
     ----     ------         ----              ----               -------
     Normal   Scheduled      16s               default-scheduler  Successfully assigned default/dummy-task-pod-0599a925b2bd40fdbf8e3779ce0ea2e9 to minikube
     Warning  InspectFailed  0s (x3 over 15s)  kubelet            Failed to apply default image tag "ACC_ID.dkr.ecr.REGION.amazonaws.com/IMAGE:{{ dag_run.conf.image_verison }}": couldn't parse image reference "ACC_ID.dkr.ecr.REGION.amazonaws.com/IMAGE:{{ dag_run.conf.image_verison }}": invalid reference format
     Warning  Failed         0s (x3 over 15s)  kubelet            Error: InvalidImageName
   
   ```
   versus pod events running on `1.10.14`:
   ```
   Events:
     Type    Reason     Age   From               Message
     ----    ------     ----  ----               -------
     Normal  Scheduled  27s   default-scheduler  Successfully assigned default/dummy-task-pod-62cdce6aa5654a7da4b5c9abfe8cf2ed to minikube
     Normal  Pulled     26s   kubelet            Container image "ACC_ID.dkr.ecr.REGION.amazonaws.com/IMAGE:IMAGE_VERSION" already present on machine
     Normal  Created    26s   kubelet            Created container base
     Normal  Started    26s   kubelet            Started container base
   ```
   Therefore, I assume this was fixed within `1.10.12` with the other breaking changes. So, I'm closing this issue.


----------------------------------------------------------------
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 #12100: KubernetesPodOperator templating the image parameter

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


   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



[GitHub] [airflow] HarryDunham closed issue #12100: KubernetesPodOperator templating the image parameter

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


   


----------------------------------------------------------------
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] HarryDunham commented on issue #12100: KubernetesPodOperator templating the image parameter

Posted by GitBox <gi...@apache.org>.
HarryDunham commented on issue #12100:
URL: https://github.com/apache/airflow/issues/12100#issuecomment-786698395


   Per this https://github.com/apache/airflow/pull/10068 change listed under the `1.10.12` changelog.


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