jedcunningham commented on a change in pull request #21905:
URL: https://github.com/apache/airflow/pull/21905#discussion_r817023833
##########
File path: airflow/kubernetes/pod_generator_deprecated.py
##########
@@ -178,7 +178,7 @@ def __init__(
self.container.command = cmds or []
self.container.args = args or []
- self.container.image_pull_policy = image_pull_policy
+ self.container.image_pull_policy = image_pull_policy if
image_pull_policy else "IfNotPresent"
Review comment:
e.g:
```
>>> from kubernetes import client
>>> container = client.V1Container(name="foo")
>>> # good so far
>>> container.image_pull_policy
>>> # still good
>>> container.image_pull_policy = None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/usr/local/lib/python3.7/site-packages/kubernetes/client/models/v1_container.py",
line 298, in image_pull_policy
.format(image_pull_policy, allowed_values)
ValueError: Invalid value for `image_pull_policy` (None), must be one of
['Always', 'IfNotPresent', 'Never']
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]