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 <liumengxinfly@gmail.com>
  • Loading branch information
oilbeater authored and bobz965 committed Jul 22, 2024
1 parent d2bfc93 commit 40d49c0
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 @@ -849,7 +849,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 @@ -900,7 +900,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 @@ -1610,7 +1610,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 40d49c0

Please sign in to comment.