Skip to content

Commit

Permalink
refactor: ignore mesh services without ready endpoints. (#623)
Browse files Browse the repository at this point in the history
remove mesh services without ready endpoints.

Signed-off-by: Cybwan <[email protected]>
  • Loading branch information
cybwan authored Jan 7, 2025
1 parent 2a59b50 commit 8b728cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/catalog/outbound_traffic_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8b728cd

Please sign in to comment.