Skip to content

Commit 97dfa5c

Browse files
committed
Update the GCP Platform Status DNSType based on UserProvisionedDNS
1 parent df06c30 commit 97dfa5c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pkg/asset/manifests/infrastructure.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,10 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
197197
// If the user has requested the use of a DNS provisioned by them, then OpenShift needs to
198198
// start an in-cluster DNS for the installation to succeed. The user can then configure their
199199
// DNS post-install.
200-
config.Status.PlatformStatus.GCP.ClusterHostedDNS = configv1.DisabledClusterHostedDNS
200+
config.Status.PlatformStatus.GCP.CloudLoadBalancerConfig = &configv1.CloudLoadBalancerConfig{}
201+
config.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.DNSType = configv1.PlatformDefaultDNSType
201202
if installConfig.Config.GCP.UserProvisionedDNS == gcp.UserProvisionedDNSEnabled {
202-
config.Status.PlatformStatus.GCP.ClusterHostedDNS = configv1.EnabledClusterHostedDNS
203+
config.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.DNSType = configv1.ClusterHostedDNSType
203204
}
204205
case ibmcloud.Name:
205206
config.Spec.PlatformSpec.Type = configv1.IBMCloudPlatformType

pkg/asset/manifests/infrastructure_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,10 @@ func (b infraBuildNamespace) withGCPPlatformStatus() infraOption {
300300
func (b infraBuildNamespace) withGCPClusterHostedDNS(enabled string) infraOption {
301301
return func(infra *configv1.Infrastructure) {
302302
b.withGCPPlatformStatus()(infra)
303-
infra.Status.PlatformStatus.GCP.ClusterHostedDNS = configv1.DisabledClusterHostedDNS
303+
infra.Status.PlatformStatus.GCP.CloudLoadBalancerConfig = &configv1.CloudLoadBalancerConfig{}
304+
infra.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.DNSType = configv1.PlatformDefaultDNSType
304305
if enabled == "Enabled" {
305-
infra.Status.PlatformStatus.GCP.ClusterHostedDNS = configv1.EnabledClusterHostedDNS
306+
infra.Status.PlatformStatus.GCP.CloudLoadBalancerConfig.DNSType = configv1.ClusterHostedDNSType
306307
}
307308
}
308309
}

0 commit comments

Comments
 (0)