Skip to content

Commit

Permalink
fix missing main route table for the default vpc (#2785)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed May 11, 2023
1 parent 1511573 commit b9542ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/vpc.go
Expand Up @@ -285,6 +285,10 @@ func (c *Controller) handleAddOrUpdateVpc(key string) error {
rtbs := c.getRouteTablesByVpc(vpc)
targetRoutes := vpc.Spec.StaticRoutes
if vpc.Name == c.config.ClusterRouter {
if _, ok := rtbs[util.MainRouteTable]; !ok {
rtbs[util.MainRouteTable] = nil
}

joinSubnet, err := c.subnetsLister.Get(c.config.NodeSwitch)
if err != nil {
if !k8serrors.IsNotFound(err) {
Expand Down

0 comments on commit b9542ad

Please sign in to comment.