diff --git a/pkg/controller/node_group.go b/pkg/controller/node_group.go index 7de5f3e6..838a658c 100644 --- a/pkg/controller/node_group.go +++ b/pkg/controller/node_group.go @@ -268,7 +268,9 @@ func NewPodDefaultFilterFunc() k8s.PodFilterFunc { // Only include pods that pass the following: // - Don't have a nodeSelector // - Don't have an affinity - return len(pod.Spec.NodeSelector) == 0 && pod.Spec.Affinity == nil + return len(pod.Spec.NodeSelector) == 0 && (pod.Spec.Affinity == nil || + (pod.Spec.Affinity.NodeAffinity == nil && pod.Spec.Affinity.PodAffinity == nil && + pod.Spec.Affinity.PodAntiAffinity == nil)) } }