potiuk commented on a change in pull request #21905:
URL: https://github.com/apache/airflow/pull/21905#discussion_r817032785



##########
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:
       I Just tried it again with this (just to be sure) and it fails in 23.3.0 
(it works with 22.*  though):  
   
   ```
           if not image_pull_policy:
               self.container.image_pull_policy = image_pull_policy
           self.container.ports = ports or []
           self.container.resources = resources
           self.container.volume_mounts = volume_mounts or []
   
           # Pod Spec
           self.spec = k8s.V1PodSpec(containers=[])
           self.spec.security_context = security_context
           self.spec.tolerations = tolerations
           if not dnspolicy:
               self.spec.dns_policy = dnspolicy
           self.spec.scheduler_name = schedulername
           self.spec.host_network = hostnetwork
           self.spec.affinity = affinity
           self.spec.service_account_name = service_account_name
           self.spec.init_containers = init_containers
           self.spec.volumes = volumes or []
           self.spec.node_selector = node_selectors
           if not restart_policy:
               self.spec.restart_policy = restart_policy
           self.spec.priority_class_name = priority_class_name
   ```




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


Reply via email to