Skip to content

Commit

Permalink
fix using route table name as vpc name (#4284)
Browse files Browse the repository at this point in the history
Signed-off-by: oilbeater <[email protected]>
  • Loading branch information
oilbeater committed Jul 12, 2024
1 parent f21c9c3 commit 8a9f4c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ func (c *Controller) reconcileRouteSubnets(cachedPod, pod *v1.Pod, needRoutePodN
}

if err := c.addStaticRouteToVpc(
c.config.ClusterRouter,
subnet.Spec.Vpc,
&kubeovnv1.StaticRoute{
Policy: kubeovnv1.PolicySrc,
CIDR: podIP,
Expand Down Expand Up @@ -905,7 +905,7 @@ func (c *Controller) reconcileRouteSubnets(cachedPod, pod *v1.Pod, needRoutePodN

if pod.Annotations[util.NorthGatewayAnnotation] != "" {
if err := c.addStaticRouteToVpc(
subnet.Spec.RouteTable,
subnet.Spec.Vpc,
&kubeovnv1.StaticRoute{
Policy: kubeovnv1.PolicySrc,
CIDR: podIP,
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ func (c *Controller) reconcileDistributedSubnetRouteInDefaultVpc(subnet *kubeovn

if pod.Annotations[util.NorthGatewayAnnotation] != "" {
if err := c.addStaticRouteToVpc(
c.config.ClusterRouter,
subnet.Spec.Vpc,
&kubeovnv1.StaticRoute{
Policy: kubeovnv1.PolicySrc,
CIDR: pod.Annotations[fmt.Sprintf(util.IPAddressAnnotationTemplate, podNet.ProviderName)],
Expand Down

0 comments on commit 8a9f4c1

Please sign in to comment.