mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
return error if got InsufficientResourceError and fit=true
This commit is contained in:
parent
111b603c95
commit
252a956150
@ -129,8 +129,12 @@ func findNodesThatFit(pod *api.Pod, machineToPods map[string][]*api.Pod, predica
|
||||
for name, predicate := range predicateFuncs {
|
||||
fit, err := predicate(pod, machineToPods[node.Name], node.Name)
|
||||
if err != nil {
|
||||
switch err.(type) {
|
||||
switch e := err.(type) {
|
||||
case *predicates.InsufficientResourceError:
|
||||
if fit {
|
||||
err := fmt.Errorf("got InsufficientResourceError: %v, but also fit='true' which is unexpected", e)
|
||||
return api.NodeList{}, FailedPredicateMap{}, err
|
||||
}
|
||||
default:
|
||||
return api.NodeList{}, FailedPredicateMap{}, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user