mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Merge pull request #23379 from ingvagabund/allocatable-resources-check-for-negative-value
Auto commit by PR queue bot
This commit is contained in:
commit
22d72bba79
@ -902,6 +902,9 @@ func parseResourceList(m utilconfig.ConfigurationMap) (api.ResourceList, error)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if q.Amount.Sign() == -1 {
|
||||
return nil, fmt.Errorf("resource quantity for %q cannot be negative: %v", k, v)
|
||||
}
|
||||
rl[api.ResourceName(k)] = *q
|
||||
default:
|
||||
return nil, fmt.Errorf("cannot reserve %q resource", k)
|
||||
|
Loading…
Reference in New Issue
Block a user