Skip to content

Commit

Permalink
Merge pull request kubernetes#49908 from freehan/cloud-provider-fix
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 49870, 49416, 49872, 49892, 49908)

fix alpha/beta endpoint when api endpoint is specified

fix a bug in alpha/beta compute API endpoint bootstraping when api-endpiont is specified. 

```release-note
None
```
  • Loading branch information
Kubernetes Submit Queue authored Aug 2, 2017
2 parents 55d314a + a1137f7 commit bcc43f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cloudprovider/providers/gce/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ func CreateGCECloud(apiEndpoint, projectID, region, zone string, managedZones []
// staging API endpoint: https://www.googleapis.com/compute/staging_v1/
if apiEndpoint != "" {
service.BasePath = fmt.Sprintf("%sprojects/", apiEndpoint)
serviceBeta.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(apiEndpoint, "v1", "beta", 0))
serviceAlpha.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(apiEndpoint, "v1", "alpha", 0))
serviceBeta.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(apiEndpoint, "v1", "beta", -1))
serviceAlpha.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(apiEndpoint, "v1", "alpha", -1))
}

containerService, err := container.New(client)
Expand Down

0 comments on commit bcc43f8

Please sign in to comment.