mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Fix the bug that determining guaranteed qos won't work well with small numbers
This commit is contained in:
parent
2e5aeaff52
commit
edc75cd565
@ -35,7 +35,7 @@ func isResourceGuaranteed(container *api.Container, resource api.ResourceName) b
|
||||
if !hasReq || !hasLimit {
|
||||
return false
|
||||
}
|
||||
return req.Value() == limit.Value() && req.Value() != 0
|
||||
return req.Cmp(limit) == 0 && req.Value() != 0
|
||||
}
|
||||
|
||||
// isResourceBestEffort returns true if the container's resource requirements are best-effort.
|
||||
|
Loading…
Reference in New Issue
Block a user