mirror of https://github.com/k3s-io/k3s
fix alpha/beta endpoint when api endpoint is specified
parent
0c447c59db
commit
a1137f7a1a
|
@ -281,8 +281,8 @@ func CreateGCECloud(apiEndpoint, projectID, region, zone string, managedZones []
|
||||||
// staging API endpoint: https://www.googleapis.com/compute/staging_v1/
|
// staging API endpoint: https://www.googleapis.com/compute/staging_v1/
|
||||||
if apiEndpoint != "" {
|
if apiEndpoint != "" {
|
||||||
service.BasePath = fmt.Sprintf("%sprojects/", apiEndpoint)
|
service.BasePath = fmt.Sprintf("%sprojects/", apiEndpoint)
|
||||||
serviceBeta.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(apiEndpoint, "v1", "beta", 0))
|
serviceBeta.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(apiEndpoint, "v1", "beta", -1))
|
||||||
serviceAlpha.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(apiEndpoint, "v1", "alpha", 0))
|
serviceAlpha.BasePath = fmt.Sprintf("%sprojects/", strings.Replace(apiEndpoint, "v1", "alpha", -1))
|
||||||
}
|
}
|
||||||
|
|
||||||
containerService, err := container.New(client)
|
containerService, err := container.New(client)
|
||||||
|
|
Loading…
Reference in New Issue