From 8126b2f5481e6334e019886a64b812e4646a6f8f Mon Sep 17 00:00:00 2001 From: Scott Trent Date: Thu, 6 Jun 2024 16:39:40 +0900 Subject: [PATCH] additional logging Signed-off-by: Scott Trent --- internal/controller/labelgroup_controller.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/controller/labelgroup_controller.go b/internal/controller/labelgroup_controller.go index d6ac6f3..6938868 100644 --- a/internal/controller/labelgroup_controller.go +++ b/internal/controller/labelgroup_controller.go @@ -176,11 +176,12 @@ func (r *LabelGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) r.Logger.V(5).Info("[Reconcile] Entered aggregating case.") // trace // Get list of pods matching the label group podNames, namespaceNames, err := r.GetPodNamesMatchingLabels(ctx, labelGroup) - r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] podNames: %s", podNames)) // trace - r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] namespaceNames: %s", namespaceNames)) // trace + r.Logger.V(5).Info(fmt.Sprintf("[Reconcile] podNames: %s", podNames)) // trace + r.Logger.V(5).Info(fmt.Sprintf("[Reconcile] namespaceNames: %s", namespaceNames)) // trace if err != nil || len(podNames) == 0 || len(namespaceNames) == 0 { r.Logger.V(0).Error(err, "[Reconcile] Couldn't get pods for the labels provided.") + r.Logger.V(5).Info(fmt.Sprintf("[Reconcile] labelGroup: %#v", labelGroup)) // trace return ctrl.Result{}, err }