Skip to content

Commit 034ffe6

Browse files
authored
don't error out with empty vpc name if routecontroller is disabled (#190) (#191)
Co-authored-by: Rahul Sharma <rahsharm@akamai.com>
1 parent acb82b8 commit 034ffe6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cloud/linode/route_controller.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,13 @@ func newRoutes(client client.Client) (cloudprovider.Routes, error) {
8484
}
8585
klog.V(3).Infof("TTL for routeCache set to %d", timeout)
8686

87-
vpcid, err := getVPCID(client, Options.VPCName)
88-
if err != nil {
89-
return nil, err
87+
vpcid := 0
88+
if Options.EnableRouteController {
89+
id, err := getVPCID(client, Options.VPCName)
90+
if err != nil {
91+
return nil, err
92+
}
93+
vpcid = id
9094
}
9195

9296
return &routes{

0 commit comments

Comments
 (0)