From 47e3ad93b5f958513e586f4daef889394cef3dfa Mon Sep 17 00:00:00 2001 From: Sandhya Dasu Date: Wed, 11 Feb 2026 13:27:09 -0500 Subject: [PATCH] Use GCP service project when getting Load Balancer IPs Switched to getting GCP Load Balancer IP addresses from the service project "GCP.ProjectID" in all cases, even when Shared VPC (XPN) is configured. This fix provides the correct project to use for getting the Load Balancer IP address when UserProvisionedDNS is enabled, and the ignition files are updated with the Load Balancer IP. --- pkg/infrastructure/gcp/clusterapi/ignition.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/infrastructure/gcp/clusterapi/ignition.go b/pkg/infrastructure/gcp/clusterapi/ignition.go index d57b4d8e497..ac955a294a9 100644 --- a/pkg/infrastructure/gcp/clusterapi/ignition.go +++ b/pkg/infrastructure/gcp/clusterapi/ignition.go @@ -48,12 +48,11 @@ func editIgnition(ctx context.Context, in clusterapi.IgnitionInput) (*clusterapi } project := in.InstallConfig.Config.GCP.ProjectID - if in.InstallConfig.Config.GCP.NetworkProjectID != "" { - project = in.InstallConfig.Config.GCP.NetworkProjectID - } apiIntIPAddress := *gcpCluster.Status.Network.APIInternalAddress addressIntCut := apiIntIPAddress[strings.LastIndex(apiIntIPAddress, "/")+1:] + // The LoadBalancer's IP address which is part of the frontend configuration, would be located in + // the service project even in the case of Shared VPC (XPN) installs. computeIntAddressObj, err := svc.Addresses.Get(project, in.InstallConfig.Config.GCP.Region, addressIntCut).Context(ctx).Do() if err != nil { return nil, fmt.Errorf("failed to get compute address: %w", err)