From 7980f03c52efb5a51d2fc6c1f0b8c94c028a6a14 Mon Sep 17 00:00:00 2001 From: leiwingqueen Date: Tue, 5 Nov 2024 00:02:19 +0800 Subject: [PATCH] fix convert float64 error --- internal/store/horizontalpodautoscaler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/store/horizontalpodautoscaler.go b/internal/store/horizontalpodautoscaler.go index b49cdc854..3994f14c3 100644 --- a/internal/store/horizontalpodautoscaler.go +++ b/internal/store/horizontalpodautoscaler.go @@ -217,10 +217,10 @@ func createHPASpecTargetMetric() generator.FamilyGenerator { } if metricTarget.Value != nil { - metricMap[value] = convertValueToFloat64(metricTarget.Value) / 1000 + metricMap[value] = convertValueToFloat64(metricTarget.Value) } if metricTarget.AverageValue != nil { - metricMap[average] = convertValueToFloat64(metricTarget.AverageValue) / 1000 + metricMap[average] = convertValueToFloat64(metricTarget.AverageValue) } if metricTarget.AverageUtilization != nil { metricMap[utilization] = float64(*metricTarget.AverageUtilization)