Skip to content

Commit

Permalink
OCPBUGS-44641: GCP placing *.apps record in wrong managed zone
Browse files Browse the repository at this point in the history
** 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.
  • Loading branch information
barbacbd committed Nov 19, 2024
1 parent 5e705f0 commit f7729c1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/asset/manifests/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit f7729c1

Please sign in to comment.