File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -305,12 +305,17 @@ func (k *K8sSWIFTv2Middleware) SetInfraRoutes(podIPInfo *cns.PodIpInfo) ([]cns.R
305305 routes = append (routes , k .addRoutes (podCIDRsV4 , "10.229.0.1" )... )
306306 routes = append (routes , k .addRoutes (serviceCIDRsV4 , "10.0.0.1" )... )
307307 routes = append (routes , k .addRoutes (infraVNETCIDRsv4 , "10.225.0.1" )... )
308- routes = append (routes , k .addRoutes ("0.0.0.0/0" , "0.0.0.0" )... )
309308 } else {
310309 routes = append (routes , k .addRoutes (podCIDRv6 , overlayGatewayV6 )... )
311310 routes = append (routes , k .addRoutes (serviceCIDRsV6 , overlayGatewayV6 )... )
312311 routes = append (routes , k .addRoutes (infraVNETCIDRsv6 , overlayGatewayV6 )... )
313312 }
314313
314+ defaultRoute := cns.Route {
315+ IPAddress : "0.0.0.0/0" ,
316+ GatewayIPAddress : "0.0.0.0" ,
317+ }
318+ routes = append (routes , defaultRoute )
319+
315320 return routes , nil
316321}
Original file line number Diff line number Diff line change @@ -59,10 +59,10 @@ func (k *K8sSWIFTv2Middleware) assignSubnetPrefixLengthFields(podIPInfo *cns.Pod
5959}
6060
6161// add default route with gateway IP to podIPInfo
62- // func (k *K8sSWIFTv2Middleware) addDefaultRoute(podIPInfo *cns.PodIpInfo) {
63- // route := cns.Route{
64- // IPAddress: "0.0.0.0/0",
65- // GatewayIPAddress: "10.242.0.2",
66- // }
67- // podIPInfo.Routes = append(podIPInfo.Routes, route)
68- // }
62+ func (k * K8sSWIFTv2Middleware ) addDefaultRoute (podIPInfo * cns.PodIpInfo ) {
63+ route := cns.Route {
64+ IPAddress : "0.0.0.0/0" ,
65+ GatewayIPAddress : "10.242.0.2" ,
66+ }
67+ podIPInfo .Routes = append (podIPInfo .Routes , route )
68+ }
You can’t perform that action at this time.
0 commit comments