From b0e9aa0b6a8e06fd9733be1a9419d94e6e67a266 Mon Sep 17 00:00:00 2001 From: MohammedAbdi Date: Thu, 1 Aug 2024 12:21:17 -0400 Subject: [PATCH] print old values Signed-off-by: MohammedAbdi --- internal/controller/labelgroup_controller.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/controller/labelgroup_controller.go b/internal/controller/labelgroup_controller.go index a1cce0b..1f81a06 100644 --- a/internal/controller/labelgroup_controller.go +++ b/internal/controller/labelgroup_controller.go @@ -226,6 +226,7 @@ func (r *LabelGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) for containerId, oldValue := range labelGroup.Status.ActiveContainerIds { if newValue, found := metricValues[containerId]; found { // totalEnergy += (newValue - oldValue) //put back + r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] oldValue: %#v", oldValue)) totalEnergy = 100 // testing purpose - remove after labelGroup.Status.ActiveContainerIds[containerId] = newValue delete(metricValues, containerId)