Skip to content

Commit

Permalink
fix using route table name as vpc name
Browse files Browse the repository at this point in the history
Signed-off-by: oilbeater <[email protected]>
  • Loading branch information
oilbeater committed Jul 11, 2024
1 parent bf5a554 commit 79cf209
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 @@ -773,7 +773,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 @@ -823,7 +823,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 @@ -1548,7 +1548,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 79cf209

Please sign in to comment.