Skip to content

Commit 3b1b7e2

Browse files
committed
hard route to test
1 parent df8d241 commit 3b1b7e2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cns/middlewares/k8sSwiftV2.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ func (k *K8sSWIFTv2Middleware) getIPConfig(ctx context.Context, podInfo cns.PodI
239239
}
240240
podIPInfos = append(podIPInfos, podIPInfo)
241241
// for windows scenario, it is required to add default route with gatewayIP from CNS
242-
k.addDefaultRoute(&podIPInfo, "10.242.0.2")
242+
k.addDefaultRoute(&podIPInfo)
243+
logger.Printf("default route windows are %v", podIPInfo.Routes)
243244
}
244245
}
245246
}

cns/middlewares/k8sSwiftV2_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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, gwIP string) {
62+
func (k *K8sSWIFTv2Middleware) addDefaultRoute(podIPInfo *cns.PodIpInfo) {
6363
route := cns.Route{
6464
IPAddress: "0.0.0.0/0",
65-
GatewayIPAddress: gwIP,
65+
GatewayIPAddress: "10.242.0.2",
6666
}
6767
podIPInfo.Routes = append(podIPInfo.Routes, route)
6868
}

0 commit comments

Comments
 (0)