Unable to connect from GCP Cloud Build to GitLab Self-managed

213 Views Asked by At

Unfortunately I'm unable to connect to GitLab Self-managed from Cloud Build on a private IP address as described in this guide: https://cloud.google.com/build/docs/automating-builds/gitlab/connect-host-gitlab-enterprise-edition

GitLab is deployed in a GCE VM, added to a NEG and exposed via Regional internal Application Load Balancer. On top of that, I've published a service in Private Service Connect. From another project, I've allocated a private IP address and registered the GitLab service from earlier in Service Directory.
Gitlab runs on https protocol through a self signed certificate and everything is set on europe-west1 region (vm, neg, lb, service, network).

I can connect to GitLab without issues on the VPC configured for the Service Directory service, but Cloud Build can't (giving "message": "Failed to verify authorizer_credential: Get "https://****/api/v4/user": generic::unavailable: retry RPC: maximum retry number 3 exceeded: harpoon unreachable error UNREACHABLE_CONNECT_TIMEOUT").

I tried connecting both on a private DNS name (Through Cloud DNS, zone configured on Service Directory) and directly to the IP assigned earlier for the Service Directory service (again, from the VPC everything works, from Cloud Build the connection hangs).

Is there something I'm missing? Self signed certificates are allowed? If not, how can I connect privately from Cloud Build to GitLab?

Thank you!

0

There are 0 best solutions below