From f7729c1e9859777c995b89c3befd97dd4044e81f Mon Sep 17 00:00:00 2001 From: Brent Barbachem Date: Tue, 19 Nov 2024 12:05:08 -0500 Subject: [PATCH] OCPBUGS-44641: GCP placing *.apps record in wrong managed zone ** The *.apps record is not being placed in the correct DNS Managed Zone. The existing managed zone should be used only during xpn installs. The ingress operator was supplied with the incorrect managed zone information. --- pkg/asset/manifests/dns.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/asset/manifests/dns.go b/pkg/asset/manifests/dns.go index 089abd3df66..2a9d616a71e 100644 --- a/pkg/asset/manifests/dns.go +++ b/pkg/asset/manifests/dns.go @@ -162,12 +162,14 @@ func (d *DNS) Generate(ctx context.Context, dependencies asset.Parents) error { // Set the private zone privateZoneID := fmt.Sprintf("%s-private-zone", clusterID.InfraID) - zone, err := client.GetDNSZone(ctx, installConfig.Config.GCP.ProjectID, installConfig.Config.ClusterDomain(), false) - if err != nil { - return errors.Wrapf(err, "failed to get private zone for %q", installConfig.Config.BaseDomain) - } - if zone != nil { - privateZoneID = zone.Name + if installConfig.Config.GCP.NetworkProjectID != "" { + zone, err := client.GetDNSZone(ctx, installConfig.Config.GCP.ProjectID, installConfig.Config.ClusterDomain(), false) + if err != nil { + return fmt.Errorf("failed to get private zone for %q: %w", installConfig.Config.BaseDomain, err) + } + if zone != nil { + privateZoneID = zone.Name + } } config.Spec.PrivateZone = &configv1.DNSZone{ID: privateZoneID}