Skip to content

Commit b0246ef

Browse files
committed
feat(NSC): add some additional debugging to traffic director
1 parent 1b9b222 commit b0246ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/controllers/proxy/network_services_controller.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,11 +1748,18 @@ func routeVIPTrafficToDirector(fwmark uint32, family v1.IPFamily) error {
17481748
}
17491749

17501750
if len(routes) < 1 {
1751+
klog.V(1).Infof("adding policy rule (%s) to lookup traffic to VIP through the custom routing table", nRule)
17511752
err = netlink.RuleAdd(nRule)
17521753
if err != nil {
17531754
return fmt.Errorf("failed to add policy rule to lookup traffic to VIP through the custom "+
17541755
"routing table due to %v", err)
17551756
}
1757+
} else {
1758+
klog.V(1).Infof("policy rule (%s) for mark %d already exists, skipping", nRule, fwmark)
1759+
klog.V(1).Info("Routes Found:")
1760+
for _, route := range routes {
1761+
klog.V(1).Infof("Route: %+v with mark %d", route, route.Mark)
1762+
}
17561763
}
17571764

17581765
return nil

0 commit comments

Comments
 (0)