Skip to content

Conversation

@barbacbd
Copy link
Contributor

install.openshift.io_installconfigs.yaml:

** Updated fields from the types/installconfig/gcp

pkg/types/gcp/platform.go:

** Add the user specified private dns zone
** Add static validation

pkg/asset/installconfig/gcp/validation.go:

** When private dns zone information is provided, ensure that the project and zone are used for validation.
** The public zone should be in the same project as the private zone. When the private zone is provided, assume the same project for public zone validation.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 17, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jun 17, 2025

@barbacbd: This pull request references CORS-4044 which is a valid jira issue.

Details

In response to this:

install.openshift.io_installconfigs.yaml:

** Updated fields from the types/installconfig/gcp

pkg/types/gcp/platform.go:

** Add the user specified private dns zone
** Add static validation

pkg/asset/installconfig/gcp/validation.go:

** When private dns zone information is provided, ensure that the project and zone are used for validation.
** The public zone should be in the same project as the private zone. When the private zone is provided, assume the same project for public zone validation.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@barbacbd
Copy link
Contributor Author

/cc @patrickdillon
/cc @sadasu

@openshift-ci openshift-ci bot requested review from patrickdillon and sadasu June 17, 2025 18:53
@barbacbd
Copy link
Contributor Author

/label platform/gcp

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 17, 2025

@barbacbd: The label(s) /label platform/gcp cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, ux-approved, no-qe, downstream-change-needed, rebase/manual, cluster-config-api-changed, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, stability-fix-approved, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

Details

In response to this:

/label platform/gcp

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@barbacbd
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 17, 2025
@openshift-ci openshift-ci bot requested a review from rwsu June 17, 2025 18:54
@barbacbd
Copy link
Contributor Author

/label platform/google

@barbacbd barbacbd force-pushed the CORS-4044 branch 4 times, most recently from df91db7 to 4c883d9 Compare July 8, 2025 20:09
@barbacbd
Copy link
Contributor Author

barbacbd commented Jul 9, 2025

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 9, 2025
@barbacbd barbacbd changed the title CORS-4044: Add private dns zone section to GCP install config CORS-4044: CORS-4045: CORS-4046: CORS-4047: CORS-4048: CORS-4049: CORS-4050: CORS-4051: Add private dns zone section to GCP install config Jul 15, 2025
@barbacbd
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 15, 2025

@barbacbd: This pull request references CORS-4044 which is a valid jira issue.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@barbacbd
Copy link
Contributor Author

/retest-required

@barbacbd barbacbd changed the title CORS-4044: CORS-4045: CORS-4046: CORS-4047: CORS-4048: CORS-4049: CORS-4050: CORS-4051: Add private dns zone section to GCP install config CORS-4044, CORS-4045, CORS-4046, CORS-4047, CORS-4048, CORS-4049, CORS-4050, CORS-4051: Add private dns zone section to GCP install config Jul 16, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 16, 2025

@barbacbd: This pull request references CORS-4044 which is a valid jira issue.

This pull request references CORS-4045 which is a valid jira issue.

This pull request references CORS-4046 which is a valid jira issue.

This pull request references CORS-4047 which is a valid jira issue.

This pull request references CORS-4048 which is a valid jira issue.

This pull request references CORS-4049 which is a valid jira issue.

This pull request references CORS-4050 which is a valid jira issue.

This pull request references CORS-4051 which is a valid jira issue.

Details

In response to this:

install.openshift.io_installconfigs.yaml:

** Updated fields from the types/installconfig/gcp

pkg/types/gcp/platform.go:

** Add the user specified private dns zone
** Add static validation

pkg/asset/installconfig/gcp/validation.go:

** When private dns zone information is provided, ensure that the project and zone are used for validation.
** The public zone should be in the same project as the private zone. When the private zone is provided, assume the same project for public zone validation.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@barbacbd
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 16, 2025

@barbacbd: This pull request references CORS-4044 which is a valid jira issue.

This pull request references CORS-4045 which is a valid jira issue.

This pull request references CORS-4046 which is a valid jira issue.

This pull request references CORS-4047 which is a valid jira issue.

This pull request references CORS-4048 which is a valid jira issue.

This pull request references CORS-4049 which is a valid jira issue.

This pull request references CORS-4050 which is a valid jira issue.

This pull request references CORS-4051 which is a valid jira issue.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Aug 26, 2025
@sadasu
Copy link
Contributor

sadasu commented Aug 26, 2025

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 26, 2025
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD d0aabcc and 2 for PR HEAD 5d80a3a in total

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2025
// It is possible to create a managed zone without a description using the GCP web console.
// If the description is missing the managed zone modification will fail.
// The description will differ slightly from a zone that the installer created.
zone.Description = "Used by OpenShift Installer"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "Used by OpenShift" would have been sufficient.

@barbacbd
Copy link
Contributor Author

/hold

wait for 4.21 branching

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 26, 2025
@sadasu
Copy link
Contributor

sadasu commented Aug 26, 2025

/test e2e-gcp-xpn-dedicated-dns-project

Comment on lines 455 to 466
if zone != nil {
if icdns != nil && icdns.PrivateZone != nil && icdns.PrivateZone.Name != zone.Name {
allErrs = append(allErrs, field.Invalid(
field.NewPath("platform").Child("gcp").Child("dns").Child("privateZone").Child("name"),
zone.Name,
fmt.Sprintf("expected private zone name %s or empty string", icdns.PrivateZone.Name),
))
} else if err := checkRecordSets(client, ic, project, zone, []string{apiRecordType(ic), apiIntRecordName(ic)}); err != nil {
allErrs = append(allErrs, err)
}
}
Copy link
Member

@tthvo tthvo Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if zone != nil {
if icdns != nil && icdns.PrivateZone != nil && icdns.PrivateZone.Name != zone.Name {
allErrs = append(allErrs, field.Invalid(
field.NewPath("platform").Child("gcp").Child("dns").Child("privateZone").Child("name"),
zone.Name,
fmt.Sprintf("expected private zone name %s or empty string", icdns.PrivateZone.Name),
))
} else if err := checkRecordSets(client, ic, project, zone, []string{apiRecordType(ic), apiIntRecordName(ic)}); err != nil {
allErrs = append(allErrs, err)
}
}
if zone != nil {
if zoneName != "" && zoneName != zone.Name {
allErrs = append(allErrs, field.Invalid(
field.NewPath("platform").Child("gcp").Child("dns").Child("privateZone").Child("name"),
zoneName,
fmt.Sprintf("expected private zone name %s or empty string", zone.Name),
))
} else if err := checkRecordSets(client, ic, project, zone, []string{apiRecordType(ic), apiIntRecordName(ic)}); err != nil {
allErrs = append(allErrs, err)
}
}

I think we can reference the zoneName directly.

Also, we need to use the "expected" name from the retrieved zone metadata to suggest the user (i.e. instead of the what they already enterred), right?

project := ic.GCP.ProjectID
zoneName := ""
icdns := ic.GCP.DNS
if ic.GCP.NetworkProjectID != "" && icdns != nil && icdns.PrivateZone != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ic.GCP.NetworkProjectID != "" && icdns != nil && icdns.PrivateZone != nil {
if icdns != nil && icdns.PrivateZone != nil {

ic.GCP.NetworkProjectID != "" is always true here since we have a check above, right?

Comment on lines 448 to 451
if IsNotFound(err) {
return append(allErrs, field.NotFound(field.NewPath("baseDomain"), fmt.Sprintf("Private DNS Zone (%s/%s)", project, ic.BaseDomain)))
}
return append(allErrs, field.InternalError(field.NewPath("baseDomain"), err))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we ignore the "not-found" error since the installer will create one?

Other errors such as mismatched dns name is a custom error that is caught anyways. If so, we should mark those errors as invalid instead of internal?

install.openshift.io_installconfigs.yaml:

** Updated fields from the types/installconfig/gcp

CORS-4047: Add private Zone Validation

pkg/types/gcp/platform.go:

** Add the user specified private dns zone
** Add static validation

pkg/asset/installconfig/gcp/validation.go:

** When private dns zone information is provided, ensure that the project and zone
are used for validation.

CORS-4045: Update Clsuter Metadata

** Add the GCP private zone information to the cluster metadata

CORS-4048: Update TFVars to include private zone info

CORS-4049: Find the correct project for the dns zones

** Update the DNS Manifest to take the correct private zone project when specified.

** Note: Need to update DNS Spec to take in a project.

CORS-4046: Delete Private Zones

pkg/destroy/gcp:

** Use the cluster metadata to update the gcp cluster uninstaller.
** Find DNS zones in the correct project. Delete the zones that can and should be
deleted.
** Delete the DNS records in the private and public zones.

pkg/destroy/gcp:

** Destroy DNS zones if they have the "owned" label.

installconfig/gcp:

** Generate a new Client function to find private DNS zones where the base domain
and zone name are both provided.

manifests/dns:

** Use the new client function to ensure that we find the correct private zone
when private zone information is provided in the install config file.

clusterapi/dns:

** Use the new client function to ensure that we find the correct private zone
when private zone information is provided in the install config file.

Adding the "shared" tag when the installer does not create the private managed zone.

** On Destroy, search the private dns zone for the labels. If the
shared label with a key matching the cluster ID exists, remove the label.
Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Code looks good to me! Let's see if we can run a pre-submit...

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2025
Comment on lines +447 to +451
logrus.Debug("No private DNS Zone found")
if IsNotFound(err) {
// Ignore the not found error, because the zone will be created in this instance.
continue
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We should move the log inside the check? Or we can just remove it :D

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we never really hit IsNotFound error previously while testing because it is handled elsewherein the call (otherwiser it should fail):

client.GetDNSZoneFromParams(context.TODO(), paramSet)

If so, we can remove this check and logs all together :D

@tthvo
Copy link
Member

tthvo commented Aug 26, 2025

/test e2e-gcp-xpn-dedicated-dns-project

Let's see if the presubmit works now... 👀

@barbacbd
Copy link
Contributor Author

/retest-required

@barbacbd
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 27, 2025
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 26d807e and 2 for PR HEAD ebc05e6 in total

@tthvo
Copy link
Member

tthvo commented Aug 27, 2025

/test e2e-gcp-ovn

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD f1df503 and 2 for PR HEAD ebc05e6 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 28, 2025

@barbacbd: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-vsphere-host-groups-ovn-custom-no-upgrade 76f4fed link false /test e2e-vsphere-host-groups-ovn-custom-no-upgrade
ci/prow/e2e-vsphere-ovn-multi-network-techpreview 8765884 link false /test e2e-vsphere-ovn-multi-network-techpreview
ci/prow/gcp-custom-dns 8642a1e link false /test gcp-custom-dns
ci/prow/e2e-gcp-custom-dns f1481da link false /test e2e-gcp-custom-dns
ci/prow/okd-scos-e2e-aws-ovn ebc05e6 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-vsphere-ovn-multi-network ebc05e6 link false /test e2e-vsphere-ovn-multi-network
ci/prow/e2e-gcp-custom-dns-techpreview ebc05e6 link false /test e2e-gcp-custom-dns-techpreview

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@tthvo
Copy link
Member

tthvo commented Aug 28, 2025

/test e2e-gcp-ovn

The install succeeded though...

@tthvo
Copy link
Member

tthvo commented Aug 28, 2025

/test gcp-private e2e-gcp-ovn-byo-vpc

allErrs = append(allErrs, field.Invalid(
field.NewPath("platform").Child("gcp").Child("dns").Child("privateZone").Child("name"),
zoneName,
fmt.Sprintf("found existing private zone %s in project %s with base domain %s", zone.Name, project, ic.BaseDomain),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barbacbd Suggest to replace the error message with something like "found existing private zone %s in project %s with DNS name %s" (see comment), thanks!

@openshift-merge-bot openshift-merge-bot bot merged commit 5f4e6cd into openshift:main Aug 28, 2025
24 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. platform/google

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants