Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect URL format for load balancers #286

Closed
Fedosin opened this issue Nov 3, 2021 · 0 comments · Fixed by #287
Closed

Incorrect URL format for load balancers #286

Fedosin opened this issue Nov 3, 2021 · 0 comments · Fixed by #287

Comments

@Fedosin
Copy link
Contributor

Fedosin commented Nov 3, 2021

When creating a load balancer, I get the next error from google API:

Error syncing load balancer: failed to ensure load balancer: failed to create forwarding rule for load balancer (a8811629b918a4c4d8da5705f41f4277(openshift-ingress/router-default)): googleapi: Error 400: Invalid value for field 'resource.target': 'https://compute.googleapis.com/compute/v1/**********************/regions/us-central1/targetPools/a8811629b918a4c4d8da5705f41f4277'. The URL is malformed. Must be a valid In-Project Target Proxy URL or a supported Google API bundle., invalid

This happens because of the change in Google API SDK that was added here with the version bump in #262:

❯ git diff de861a67f32828f69175d064c9847316b1731184~1..HEAD vendor/google.golang.org/api/compute/v1/compute-gen.go
diff --git a/vendor/google.golang.org/api/compute/v1/compute-gen.go b/vendor/google.golang.org/api/compute/v1/compute-gen.go
index a0213951..18c179dd 100644
--- a/vendor/google.golang.org/api/compute/v1/compute-gen.go
+++ b/vendor/google.golang.org/api/compute/v1/compute-gen.go
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC.
+// Copyright 2021 Google LLC.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
@@ -78,11 +78,12 @@ var _ = internaloption.WithDefaultEndpoint
 const apiId = "compute:v1"
 const apiName = "compute"
 const apiVersion = "v1"
-const basePath = "https://compute.googleapis.com/compute/v1/projects/"
+const basePath = "https://compute.googleapis.com/compute/v1/"
+const mtlsBasePath = "https://compute.mtls.googleapis.com/compute/v1/"
 
 // OAuth2 scopes used by this API.

basePath has been changed, so targetPoolURL returns incorrect result: https://github.com/kubernetes/cloud-provider-gcp/blob/master/providers/gce/gce_loadbalancer_external.go#L635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant