This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v2-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-2-test by this push:
new 825a1f2 Revert "Fix handling some None parameters in kubernetes 23
libs. (#21905)"
825a1f2 is described below
commit 825a1f23e833aed0b19694303fb7da9240b9723d
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon Mar 28 17:38:20 2022 +0200
Revert "Fix handling some None parameters in kubernetes 23 libs. (#21905)"
This reverts commit 24c84f0acee622f6bba4b8d73f2e9a6831cd364a.
---
airflow/kubernetes/pod_generator_deprecated.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/airflow/kubernetes/pod_generator_deprecated.py
b/airflow/kubernetes/pod_generator_deprecated.py
index bb3c980..c4d83d6 100644
--- a/airflow/kubernetes/pod_generator_deprecated.py
+++ b/airflow/kubernetes/pod_generator_deprecated.py
@@ -206,8 +206,7 @@ class PodGenerator:
self.container.command = cmds or []
self.container.args = args or []
- if image_pull_policy:
- self.container.image_pull_policy = 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 []
@@ -216,8 +215,7 @@ class PodGenerator:
self.spec = k8s.V1PodSpec(containers=[])
self.spec.security_context = security_context
self.spec.tolerations = tolerations
- if dnspolicy:
- self.spec.dns_policy = dnspolicy
+ self.spec.dns_policy = dnspolicy
self.spec.scheduler_name = schedulername
self.spec.host_network = hostnetwork
self.spec.affinity = affinity
@@ -225,8 +223,7 @@ class PodGenerator:
self.spec.init_containers = init_containers
self.spec.volumes = volumes or []
self.spec.node_selector = node_selectors
- if restart_policy:
- self.spec.restart_policy = restart_policy
+ self.spec.restart_policy = restart_policy
self.spec.priority_class_name = priority_class_name
self.spec.image_pull_secrets = []