mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Merge pull request #101317 from BinacsLee/binacs-scheduler-fwk-plugins-nodelabel-cleanup
code cleanup: scheduler simplify the check function in NodeLabel.Filter
This commit is contained in:
commit
eda3faaf44
@ -99,7 +99,7 @@ func (pl *NodeLabel) Filter(ctx context.Context, _ *framework.CycleState, pod *v
|
||||
check := func(labels []string, presence bool) bool {
|
||||
for _, label := range labels {
|
||||
exists := nodeLabels.Has(label)
|
||||
if (exists && !presence) || (!exists && presence) {
|
||||
if exists != presence {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user