Skip to content

Commit

Permalink
scheduler: fix scaling factor 100 for burstable pod (#2242)
Browse files Browse the repository at this point in the history
Signed-off-by: wangjianyu.wjy <[email protected]>
Co-authored-by: wangjianyu.wjy <[email protected]>
  • Loading branch information
ZiMengSheng and wangjianyu.wjy authored Nov 4, 2024
1 parent eb47585 commit a5f0fbd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func estimatedUsedByResource(requests, limits corev1.ResourceList, resourceName
requestQuantity := requests[resourceName]
var quantity resource.Quantity
if limitQuantity.Cmp(requestQuantity) > 0 {
scalingFactor = 100
quantity = limitQuantity
} else {
quantity = requestQuantity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func TestDefaultEstimatorEstimatePod(t *testing.T) {
},
},
want: map[corev1.ResourceName]int64{
corev1.ResourceCPU: 8000,
corev1.ResourceCPU: 6800,
corev1.ResourceMemory: 6012954214, // 5.6Gi
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/plugins/loadaware/load_aware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2277,7 +2277,7 @@ func TestScore(t *testing.T) {
},
},
},
wantScore: 88,
wantScore: 90,
wantStatus: nil,
},
{
Expand Down

0 comments on commit a5f0fbd

Please sign in to comment.