Skip to content

Commit

Permalink
Remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.walther committed Sep 10, 2024
1 parent 8339aa8 commit 7526243
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions internal/controllers/kubelb/envoy_cp_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (r *EnvoyCPReconciler) ListLoadBalancersAndRoutes(ctx context.Context, req
loadBalancers := kubelbv1alpha1.LoadBalancerList{}
routes := kubelbv1alpha1.RouteList{}
var err error
log := ctrl.LoggerFrom(ctx)

switch r.EnvoyProxyTopology {
case EnvoyProxyTopologyShared, EnvoyProxyTopologyDedicated:
err = r.List(ctx, &loadBalancers, client.InNamespace(req.Namespace))
Expand All @@ -178,14 +178,11 @@ func (r *EnvoyCPReconciler) ListLoadBalancersAndRoutes(ctx context.Context, req
return nil, nil, err
}
}
log.Info("Found load balancers", "count", len(loadBalancers.Items))

lbs := make([]kubelbv1alpha1.LoadBalancer, 0, len(loadBalancers.Items))
for _, lb := range loadBalancers.Items {
if lb.DeletionTimestamp.IsZero() && controllerutil.ContainsFinalizer(&lb, CleanupFinalizer) {
log.Info("Adding load balancer", "name", lb.Name, "namespace", lb.Namespace)
lbs = append(lbs, lb)
} else {
log.Info("Ignoring load balancer", "name", lb.Name, "namespace", lb.Namespace)
}
}

Expand Down Expand Up @@ -391,4 +388,4 @@ func (r *EnvoyCPReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manag
handler.EnqueueRequestsFromMapFunc(r.enqueueLoadBalancers()),
).
Complete(r)
}
}

0 comments on commit 7526243

Please sign in to comment.