Skip to content

Commit 680c85c

Browse files
committed
GCP: Skip populating Private/Public Zones within DNS manifest
When custom-dns is enabled, do not populate the Private and Public zones within the DNS manifest. This will indicate to the Ingress operator to not configure the cloud DNS.
1 parent 611e16a commit 680c85c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/asset/manifests/dns.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@ func (d *DNS) Generate(dependencies asset.Parents) error {
148148
}
149149
}
150150
case gcptypes.Name:
151+
// We donot want to configure cloud DNS when `UserProvisionedDNS` is enabled.
152+
// So, do not set PrivateZone and PublicZone fields in the DNS manifest.
153+
if installConfig.Config.GCP.UserProvisionedDNS == gcptypes.UserProvisionedDNSEnabled {
154+
config.Spec.PublicZone = &configv1.DNSZone{ID: ""}
155+
config.Spec.PrivateZone = &configv1.DNSZone{ID: ""}
156+
break
157+
}
151158
client, err := icgcp.NewClient(context.Background())
152159
if err != nil {
153160
return err

0 commit comments

Comments
 (0)