diff --git a/pkg/catalog/outbound_traffic_policies.go b/pkg/catalog/outbound_traffic_policies.go index b8a4761b..5cb59f27 100644 --- a/pkg/catalog/outbound_traffic_policies.go +++ b/pkg/catalog/outbound_traffic_policies.go @@ -49,6 +49,9 @@ func (mc *MeshCatalog) GetOutboundMeshTrafficPolicy(downstreamIdentity identity. // For each service, build the traffic policies required to access it. // It is important to aggregate HTTP route configs by the service's port. for _, meshSvc := range mc.ListOutboundServicesForIdentity(downstreamIdentity) { + if meshSvc.TargetPort == 0 { + continue + } meshSvc := meshSvc // To prevent loop variable memory aliasing in for loop egressEnabled, egressPolicyGetted, egressPolicy = mc.enableEgressSrviceForIdentity(downstreamIdentity, egressPolicyGetted, egressPolicy, meshSvc)