Skip to content

Commit fe3520c

Browse files
Merge pull request #7837 from sadasu/update-infra-with-lb-ips
CORS-3029: GCP: Update DNSType within GCP PlatformStatus based on `UserProvisionedDNS`
2 parents 4c4d898 + 97dfa5c commit fe3520c

File tree

34 files changed

+6304
-909
lines changed

34 files changed

+6304
-909
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ require (
6060
github.com/microsoftgraph/msgraph-sdk-go v0.47.0
6161
github.com/nutanix-cloud-native/prism-go-client v0.2.1-0.20220804130801-c8a253627c64
6262
github.com/onsi/gomega v1.28.1
63-
github.com/openshift/api v0.0.0-20231204192004-bfea29e5e6c4
63+
github.com/openshift/api v0.0.0-20231213180734-7b25ce980923
6464
github.com/openshift/assisted-image-service v0.0.0-20230829160050-0b98ec74397b
6565
github.com/openshift/assisted-service/api v0.0.0
6666
github.com/openshift/assisted-service/client v0.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,8 +950,8 @@ github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xA
950950
github.com/openshift/api v0.0.0-20200326160804-ecb9283fe820/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE=
951951
github.com/openshift/api v0.0.0-20200827090112-c05698d102cf/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8=
952952
github.com/openshift/api v0.0.0-20200829102639-8a3a835f1acf/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8=
953-
github.com/openshift/api v0.0.0-20231204192004-bfea29e5e6c4 h1:5RyeLvTSZEn/fDQA6e6+qIvFPssWjreY8pbwfg4/EEQ=
954-
github.com/openshift/api v0.0.0-20231204192004-bfea29e5e6c4/go.mod h1:qNtV0315F+f8ld52TLtPvrfivZpdimOzTi3kn9IVbtU=
953+
github.com/openshift/api v0.0.0-20231213180734-7b25ce980923 h1:ySamxbqyYHHVOJKxxiC3oluFplxuofdFJVQ6heaTnh8=
954+
github.com/openshift/api v0.0.0-20231213180734-7b25ce980923/go.mod h1:qNtV0315F+f8ld52TLtPvrfivZpdimOzTi3kn9IVbtU=
955955
github.com/openshift/assisted-image-service v0.0.0-20230829160050-0b98ec74397b h1:wLVEgmzQjs3t4Z96gZzSLF/ws6ULliAks7z1lozNJrE=
956956
github.com/openshift/assisted-image-service v0.0.0-20230829160050-0b98ec74397b/go.mod h1:KTt/pnfs9gt0McDPrb0zVTkwd0xIFNik/ZJROIBzsbc=
957957
github.com/openshift/assisted-service/api v0.0.0-20230831114549-1922eda29cf8 h1:+fZLKbycDo4JeLwPGVSAgf2XPaJGLM341l9ZfrrlxG0=

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
}

vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion-CustomNoUpgrade.crd.yaml

Lines changed: 503 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)