Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.walther committed Sep 9, 2024
1 parent 4db6778 commit 67f43de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/controllers/kubelb/envoy_cp_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,14 @@ 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

0 comments on commit 67f43de

Please sign in to comment.