Merge pull request #138522 from bart0sh/PR232-DRA-remove-nil-check

scheduler/dra: remove redundant nil check
This commit is contained in:
Kubernetes Prow Robot 2026-04-24 14:36:46 +05:30 committed by GitHub
commit caeae2cfa0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -171,9 +171,6 @@ func (pl *DynamicResources) buildNodeAllocatableDRAInfo(pod *v1.Pod, nodeAllocat
quantity = resourceMap.AllocationMultiplier.DeepCopy()
}
if currentClaimStatus.Resources == nil {
currentClaimStatus.Resources = make(map[v1.ResourceName]resource.Quantity)
}
curQuantity, ok := currentClaimStatus.Resources[resourceName]
if !ok {
currentClaimStatus.Resources[resourceName] = quantity