From ba2c1f48463e0eb898447dda017b81f52afa7235 Mon Sep 17 00:00:00 2001 From: "jan.walther" Date: Mon, 9 Sep 2024 23:19:08 +0200 Subject: [PATCH] Add logging --- internal/envoy/resource.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/envoy/resource.go b/internal/envoy/resource.go index e5f9d5f..0355c9c 100644 --- a/internal/envoy/resource.go +++ b/internal/envoy/resource.go @@ -61,7 +61,7 @@ func MapSnapshot(ctx context.Context, client ctrlclient.Client, loadBalancers [] // multiple endpoints represent multiple clusters log.V(2).Info("Adding load balancer", "name", lb.Name, "namespace", lb.Namespace) for i, lbEndpoint := range lb.Spec.Endpoints { - log.V(2).Info("Adding endpoint", "name", lbEndpoint.Name, "namespace", lbEndpoint.Namespace) + log.V(2).Info("Adding endpoint", "name", lbEndpoint.AddressesReference.Name) if lbEndpoint.AddressesReference != nil { // Check if map already contains the key if val, ok := addressesMap[fmt.Sprintf(endpointAddressReferencePattern, lb.Namespace, lbEndpoint.AddressesReference.Name)]; ok { @@ -80,7 +80,7 @@ func MapSnapshot(ctx context.Context, client ctrlclient.Client, loadBalancers [] } for _, lbEndpointPort := range lbEndpoint.Ports { - log.V(2).Info("Adding port", "name", lbEndpointPort.Name, "namespace", lbEndpointPort.Namespace) + log.V(2).Info("Adding port", "port", lbEndpointPort.Port, "protocol", lbEndpointPort.Protocol) var lbEndpoints []*envoyEndpoint.LbEndpoint key := fmt.Sprintf(kubelb.EnvoyResourceIdentifierPattern, lb.Namespace, lb.Name, i, lbEndpointPort.Port, lbEndpointPort.Protocol)