Skip to content

Commit bd53bcd

Browse files
committed
fix
1 parent 21bdc50 commit bd53bcd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/controllers/provisioning/scheduling/topologydomaingroup.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ func (t TopologyDomainGroup) Insert(domain string, nodePoolRequirements scheduli
7878

7979
// ForEachDomain calls f on each domain tracked by the topology group that is compatible with the pod's requirements.
8080
// It filters domains based on:
81-
// 1. Pod's nodeSelector and nodeAffinity (via podRequirements) must be compatible with NodePool requirements
82-
// 2. Pod's tolerations must tolerate the NodePool's taints (if taintHonorPolicy is honor)
81+
// 1. Pod's requirements don't conflict with NodePool requirements
82+
// 2. Pod's tolerations tolerate the NodePool's taints (if taintHonorPolicy is honor)
8383
func (t TopologyDomainGroup) ForEachDomain(pod *v1.Pod, podRequirements scheduling.Requirements, taintHonorPolicy v1.NodeInclusionPolicy, f func(domain string)) {
8484
for domain, sources := range t.domains {
8585
// Check if any source for this domain is compatible with the pod
8686
isCompatible := false
8787

8888
for _, source := range sources {
89-
// Check if NodePool's requirements are compatible with pod's requirements
90-
// This checks if the NodePool can satisfy what the pod needs
91-
if err := source.NodePoolRequirements.Compatible(podRequirements); err != nil {
89+
// Check if pod requirements don't conflict with NodePool requirements
90+
// We use Intersects to check if they can coexist (no conflicts)
91+
if err := source.NodePoolRequirements.Intersects(podRequirements); err != nil {
9292
continue
9393
}
9494

0 commit comments

Comments
 (0)