diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index 359453d0..611b8629 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -28,7 +28,7 @@ var ( ProposedMemoryRequest = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "proposed_memory_request", - Help: "recommended memory request (millibyte) that tortoises propose", + Help: "recommended memory request (byte) that tortoises propose", }, []string{"tortoise_name", "namespace", "container_name", "controller_name", "controller_kind"}) ) diff --git a/pkg/vpa/service.go b/pkg/vpa/service.go index e5488971..24f65ef6 100644 --- a/pkg/vpa/service.go +++ b/pkg/vpa/service.go @@ -212,7 +212,7 @@ func (c *Service) UpdateVPAFromTortoiseRecommendation(ctx context.Context, torto metrics.ProposedCPURequest.WithLabelValues(tortoise.Name, tortoise.Namespace, r.ContainerName, tortoise.Spec.TargetRefs.DeploymentName, "Deployment").Set(float64(value.MilliValue())) } if resourcename == corev1.ResourceMemory { - metrics.ProposedMemoryRequest.WithLabelValues(tortoise.Name, tortoise.Namespace, r.ContainerName, tortoise.Spec.TargetRefs.DeploymentName, "Deployment").Set(float64(value.MilliValue())) + metrics.ProposedMemoryRequest.WithLabelValues(tortoise.Name, tortoise.Namespace, r.ContainerName, tortoise.Spec.TargetRefs.DeploymentName, "Deployment").Set(float64(value.Value())) } } metricsRecorded = true