Skip to content

Commit

Permalink
Revert "Fix handling some None parameters in kubernetes 23 libs. (#21905
Browse files Browse the repository at this point in the history
)"

This reverts commit 24c84f0.
  • Loading branch information
potiuk authored and ephraimbuddy committed Mar 28, 2022
1 parent d11a073 commit 6f2c773
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions airflow/kubernetes/pod_generator_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ def __init__(

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 []
Expand All @@ -216,17 +215,15 @@ def __init__(
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
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 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 = []
Expand Down

0 comments on commit 6f2c773

Please sign in to comment.