Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Commit f00e43a

Browse files
committed
Use default token when tokenUrl not specified
1 parent 0985397 commit f00e43a

File tree

1 file changed

+4
-3
lines changed
  • cluster-autoscaler/utils/gce

1 file changed

+4
-3
lines changed

cluster-autoscaler/utils/gce/gce.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ func CreateGceManager(migs []*config.MigConfig, configReader io.Reader) (*GceMan
5959
return nil, err
6060
}
6161
if cfg.Global.TokenURL == "" {
62-
return nil, fmt.Errorf("TokenURL not specified")
62+
glog.Warning("Empty tokenUrl in cloud config")
63+
} else {
64+
glog.Infof("Using TokenSource from config %#v", tokenSource)
65+
tokenSource = provider_gce.NewAltTokenSource(cfg.Global.TokenURL, cfg.Global.TokenBody)
6366
}
64-
glog.Infof("Using TokenSource from config %#v", tokenSource)
65-
tokenSource = provider_gce.NewAltTokenSource(cfg.Global.TokenURL, cfg.Global.TokenBody)
6667
} else {
6768
glog.Infof("Using default TokenSource %#v", tokenSource)
6869
}

0 commit comments

Comments
 (0)