Skip to content

Commit

Permalink
Merge pull request #1450 from googs1025/refactor
Browse files Browse the repository at this point in the history
refactor: PodMatchNodeSelector method
  • Loading branch information
k8s-ci-robot authored Jun 27, 2024
2 parents 972d281 + cfa6845 commit 9eefbf0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/utils/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ func PodMatchNodeSelector(pod *v1.Pod, node *v1.Node) (bool, error) {
if node == nil {
return false, fmt.Errorf("node not found")
}
if podMatchesNodeLabels(pod, node) {
return true, nil
}
return false, nil
return podMatchesNodeLabels(pod, node), nil
}

// The pod can only schedule onto nodes that satisfy requirements in both NodeAffinity and nodeSelector.
Expand Down

0 comments on commit 9eefbf0

Please sign in to comment.