Skip to content

Commit

Permalink
use CNR filed consts
Browse files Browse the repository at this point in the history
  • Loading branch information
WangZzzhe committed Apr 17, 2024
1 parent cfe3640 commit febc3b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,9 @@ func (ra *RealtimeOvercommitmentAdvisor) resourceMetricsToOvercommitRatio(resour
return 1.0
}

allocatable := resourceAllocatable.Value()
request := resourceRequest.Value()
allocatable := resourceAllocatable.MilliValue()
request := resourceRequest.MilliValue()
usage = usage * 1000

if request == 0 || allocatable == 0 {
klog.Warningf("unexpected node resource, resourceName: %v, request: %v, allocatable: %v", resourceName, request, allocatable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (o *OvercommitRatioReporterPlugin) overcommitRatioToCNRAnnotation(overcommi
Field: []*v1alpha1.ReportField{
{
FieldType: v1alpha1.FieldType_Metadata,
FieldName: "Annotations",
FieldName: util.CNRFieldNameAnnotations,
Value: value,
},
},
Expand Down

0 comments on commit febc3b6

Please sign in to comment.