From a6fe8d30c4d67d5435b271bde8f620ad23dce901 Mon Sep 17 00:00:00 2001 From: Scott Trent Date: Tue, 10 Sep 2024 14:02:22 +0900 Subject: [PATCH] reduce log output a little bit Signed-off-by: Scott Trent --- internal/controller/labelgroup_controller.go | 4 ++-- internal/controller/prometheus_manager.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/controller/labelgroup_controller.go b/internal/controller/labelgroup_controller.go index 183e8c1..4b8f302 100644 --- a/internal/controller/labelgroup_controller.go +++ b/internal/controller/labelgroup_controller.go @@ -239,7 +239,7 @@ func (r *LabelGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) if err != nil || len(podsInNamespace) == 0 { r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] Unable to get podlist: Namespace: %s LabelName: %s", labelGroup.Namespace, labelGroup.Name)) - r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] KubernetesLabels: %#v", labelGroup.Status.KubernetesLabels)) + // r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] KubernetesLabels: %#v", labelGroup.Status.KubernetesLabels)) if err != nil { r.Logger.V(0).Error(err, "[Reconcile-Aggregating] ERROR: Unable to get pods for the labels provided due to this error.") } @@ -284,7 +284,7 @@ func (r *LabelGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) delete(labelGroup.Status.ActiveContainerIds, containerId) } } - r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] metricValues: %#v", metricValues)) // trace + // r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] metricValues: %#v", metricValues)) // trace r.Logger.V(5).Info(fmt.Sprintf("[Reconcile-Aggregating] ActiveContainerIds: %#v", labelGroup.Status.ActiveContainerIds)) // trace // 3) Add the values of the remaining new containers to the total energy and update the list of active containers diff --git a/internal/controller/prometheus_manager.go b/internal/controller/prometheus_manager.go index 012c0c5..b7b3526 100644 --- a/internal/controller/prometheus_manager.go +++ b/internal/controller/prometheus_manager.go @@ -128,7 +128,6 @@ func (r *LabelGroupReconciler) GetMetricValuesForPodNames(metricName string, pod results, warnings, err := v1api.Query(ctx, queryString, time.Now(), v1.WithTimeout(0*time.Second)) r.Logger.V(5).Info(fmt.Sprintf("[GetMetricValuesForPodNames] Query: %s", queryString)) // trace - r.Logger.V(5).Info(fmt.Sprintf("[GetMetricValuesForPodNames] Results: '%v'", results)) // trace if err != nil { r.Logger.V(0).Error(err, "[GetMetricValuesForPodNames] Querying Prometheus didn't work.\n"+