mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
Merge pull request #122133 from kerthcet/cleanup/calculate-resource
Remove unnecessary case when calculating request in scheduler
This commit is contained in:
commit
6c0dab57df
@ -65,12 +65,6 @@ func GetRequestForResource(resourceName v1.ResourceName, requests *v1.ResourceLi
|
|||||||
return *resource.NewQuantity(DefaultMemoryRequest, resource.DecimalSI)
|
return *resource.NewQuantity(DefaultMemoryRequest, resource.DecimalSI)
|
||||||
}
|
}
|
||||||
return requests.Memory().DeepCopy()
|
return requests.Memory().DeepCopy()
|
||||||
case v1.ResourceEphemeralStorage:
|
|
||||||
quantity, found := (*requests)[v1.ResourceEphemeralStorage]
|
|
||||||
if !found {
|
|
||||||
return resource.Quantity{}
|
|
||||||
}
|
|
||||||
return quantity.DeepCopy()
|
|
||||||
default:
|
default:
|
||||||
quantity, found := (*requests)[resourceName]
|
quantity, found := (*requests)[resourceName]
|
||||||
if !found {
|
if !found {
|
||||||
|
Loading…
Reference in New Issue
Block a user