Skip to content

Commit

Permalink
reduce log output a little bit
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Trent <[email protected]>
  • Loading branch information
trent-s committed Sep 10, 2024
1 parent 8cd2167 commit a6fe8d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/controller/labelgroup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion internal/controller/prometheus_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"+
Expand Down

0 comments on commit a6fe8d3

Please sign in to comment.