jpyen opened a new pull request #15787:
URL: https://github.com/apache/airflow/pull/15787
**Issue**:
KubernetesPodOperator pod-template files with pod affinities are ignored,
even if no affinities are passed to the KubernetesPodOperator object.
**Cause**
During the pod-initialization an empty k8s.Affinity object is created if no
affinities are supplied. This will later prevent the pod-template affinities to
be used, because during the pod_reconciliation the empty k8s.Affinity object
takes precedence.
All other attributes such as
` self.k8s_resources = convert_resources(resources) if resources else
{}
self.image_pull_secrets =
convert_image_pull_secrets(image_pull_secrets) if image_pull_secrets else []
`
handle it properly.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]