mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 10:48:15 +00:00
Fix edge case in qos evaluation
This commit is contained in:
@@ -68,11 +68,13 @@ func GetPodQOS(pod *api.Pod) QOSClass {
|
||||
}
|
||||
}
|
||||
// process limits
|
||||
qosLimitsFound := sets.NewString()
|
||||
for name, quantity := range container.Resources.Limits {
|
||||
if !supportedQoSComputeResources.Has(string(name)) {
|
||||
continue
|
||||
}
|
||||
if quantity.Cmp(zeroQuantity) == 1 {
|
||||
qosLimitsFound.Insert(string(name))
|
||||
delta := quantity.Copy()
|
||||
if _, exists := limits[name]; !exists {
|
||||
limits[name] = *delta
|
||||
@@ -82,7 +84,8 @@ func GetPodQOS(pod *api.Pod) QOSClass {
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(limits) != len(supportedQoSComputeResources) {
|
||||
|
||||
if len(qosLimitsFound) != len(supportedQoSComputeResources) {
|
||||
isGuaranteed = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user