Commit bcc43f8f authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #49908 from freehan/cloud-provider-fix

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 ```
parents 55d314a8 a1137f7a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment