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 2022/03/01 17:28:16 UTC

[GitHub] [airflow] jedcunningham commented on a change in pull request #21905: Add missing parameters for Kubernetes 23.3. library tests

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



##########
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:
       It's unfortunate it's required now, as this will behave differently... k8s does `IfNotPresent` unless the tag is `latest`, in which case it does `Always`.

##########
File path: airflow/kubernetes/pod_generator_deprecated.py
##########
@@ -187,15 +187,15 @@ def __init__(
         self.spec = k8s.V1PodSpec(containers=[])
         self.spec.security_context = security_context
         self.spec.tolerations = tolerations
-        self.spec.dns_policy = dnspolicy
+        self.spec.dns_policy = dnspolicy if dnspolicy else "Default"

Review comment:
       The default is actually `ClusterFirst` (see https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#hostname-and-name-resolution).




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org