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
) (#191)

Co-authored-by: Rahul Sharma <[email protected]>
  • Loading branch information
rahulait and rahulait authored Mar 14, 2024
1 parent acb82b8 commit 034ffe6
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 034ffe6

Please sign in to comment.