Fixes bug where the network used in the cloud provider was not taken from the /etc/gce.conf configuration.

This can result in firewalls, routes and other network resources being created on the wrong network.
pull/6/head
Minhan Xia 2017-07-25 16:45:24 -07:00
parent 6fbc554c6b
commit 0c447c59db
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,7 @@ func newGCECloud(config io.Reader) (*GCECloud, error) {
if strings.Contains(cfg.Global.NetworkName, "/") {
networkURL = cfg.Global.NetworkName
} else {
networkURL = gceNetworkURL(apiEndpoint, projectID, networkName)
networkURL = gceNetworkURL(apiEndpoint, projectID, cfg.Global.NetworkName)
}
}
@ -323,6 +323,7 @@ func CreateGCECloud(apiEndpoint, projectID, region, zone string, managedZones []
gce := &GCECloud{
service: service,
serviceAlpha: serviceAlpha,
serviceBeta: serviceBeta,
containerService: containerService,
cloudkmsService: cloudkmsService,