Skip to content

Commit

Permalink
don't error out with empty vpc name if routecontroller is disabled (#190
Browse files Browse the repository at this point in the history
)

Co-authored-by: Rahul Sharma <[email protected]>
  • Loading branch information
rahulait and rahulait authored Mar 14, 2024
1 parent cab85c7 commit 918806c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cloud/linode/route_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,13 @@ func newRoutes(client client.Client) (cloudprovider.Routes, error) {
}
klog.V(3).Infof("TTL for routeCache set to %d", timeout)

vpcid, err := getVPCID(client, Options.VPCName)
if err != nil {
return nil, err
vpcid := 0
if Options.EnableRouteController {
id, err := getVPCID(client, Options.VPCName)
if err != nil {
return nil, err
}
vpcid = id
}

return &routes{
Expand Down

0 comments on commit 918806c

Please sign in to comment.