Skip to content

CORS 2040: [gcp] Adding Public and Private Managed zones#6288

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
barbacbd:cors2040
Sep 29, 2022
Merged

CORS 2040: [gcp] Adding Public and Private Managed zones#6288
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
barbacbd:cors2040

Conversation

@barbacbd
Copy link
Copy Markdown
Contributor

@barbacbd barbacbd commented Aug 31, 2022

**Install config added the public and private managed zones under platform/gcp
**Install config validate the public and private managed zones (if provided) - when
empty or "None" the validation does not occur.
** Added tests for install config

https://issues.redhat.com/browse/CORS-2040

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 31, 2022
Comment thread pkg/asset/installconfig/gcp/dns.go Outdated
@jstuever jstuever self-requested a review September 1, 2022 06:38
@barbacbd barbacbd force-pushed the cors2040 branch 3 times, most recently from be08b33 to 7c4b87a Compare September 1, 2022 19:32
@jstuever
Copy link
Copy Markdown
Contributor

jstuever commented Sep 1, 2022

/assign

Copy link
Copy Markdown
Contributor

@jstuever jstuever left a comment

Choose a reason for hiding this comment

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

This is a great starting point. I think we should go ahead and pass the privateZone and publicZone string into the manifest "as is" while relying on the install-config for the validation. I'm also concerned about the Terraform records not knowing which project the managed_zone is in. And, I've recommended a slightly different parseZoneName() function. Other than that, some minor tweaks.

Comment thread data/data/gcp/variables-gcp.tf Outdated
Comment thread pkg/types/gcp/platform.go Outdated
Comment thread pkg/types/gcp/platform.go Outdated
Comment thread pkg/asset/manifests/dns.go Outdated
Comment thread pkg/asset/manifests/dns.go Outdated
Comment thread pkg/asset/installconfig/gcp/dns.go Outdated
Comment thread pkg/asset/installconfig/gcp/client.go Outdated
Comment thread data/data/gcp/cluster/dns/base.tf Outdated
Comment thread data/data/gcp/cluster/dns/base.tf Outdated
Comment thread data/data/gcp/cluster/dns/base.tf Outdated
@barbacbd barbacbd force-pushed the cors2040 branch 2 times, most recently from 70afd37 to 4b75a6e Compare September 2, 2022 17:26
Copy link
Copy Markdown
Contributor

@jstuever jstuever left a comment

Choose a reason for hiding this comment

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

Two minor tweaks.... 1) I think we need to be very prescribed with which projects the terraform dns records exist, and 2) I think we should be more prescribed with the parsing of the relative path managedZone names.

Comment thread data/data/gcp/cluster/dns/base.tf Outdated
Comment thread data/data/gcp/cluster/dns/base.tf Outdated
Comment thread pkg/asset/installconfig/gcp/dns.go Outdated
@barbacbd barbacbd changed the title WIP CORS 2040: Adding Public and Private Managed zones CORS 2040: Adding Public and Private Managed zones Sep 6, 2022
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 6, 2022
@barbacbd barbacbd requested review from jstuever and removed request for patrickdillon September 6, 2022 19:40
Copy link
Copy Markdown
Contributor

@jstuever jstuever left a comment

Choose a reason for hiding this comment

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

There are some functional changes needed here.... and a couple of nit pick items.

Comment thread pkg/asset/cluster/tfvars.go Outdated
Comment thread pkg/asset/cluster/tfvars.go Outdated
Comment thread pkg/asset/cluster/tfvars.go Outdated
Comment thread pkg/asset/cluster/tfvars.go Outdated
Comment thread pkg/asset/cluster/tfvars.go Outdated
Comment thread pkg/asset/cluster/tfvars.go Outdated
Comment thread pkg/asset/cluster/tfvars.go Outdated
Copy link
Copy Markdown
Contributor

@jstuever jstuever left a comment

Choose a reason for hiding this comment

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

Looking great! Just a few more minor changes.

Comment thread data/data/gcp/cluster/dns/variables.tf Outdated
Comment thread data/data/gcp/cluster/main.tf Outdated
Comment thread pkg/asset/installconfig/gcp/client.go Outdated
Comment thread pkg/asset/installconfig/gcp/dns.go Outdated
@barbacbd barbacbd requested a review from jstuever September 8, 2022 12:49
@barbacbd barbacbd force-pushed the cors2040 branch 2 times, most recently from 7857bb8 to 4c713b7 Compare September 8, 2022 17:53
Copy link
Copy Markdown
Contributor

@jstuever jstuever left a comment

Choose a reason for hiding this comment

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

/approve

@jstuever
Copy link
Copy Markdown
Contributor

jstuever commented Sep 9, 2022

/cc @AnnaZivkovic
/cc @patrickdillon

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 9, 2022
@openshift-ci openshift-ci Bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 19, 2022
@jstuever
Copy link
Copy Markdown
Contributor

/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 Sep 19, 2022
@barbacbd barbacbd requested review from jstuever and removed request for patrickdillon September 20, 2022 23:30
@barbacbd barbacbd removed the request for review from jstuever September 21, 2022 15:22
Comment thread pkg/asset/manifests/dns.go Outdated
Comment thread pkg/asset/manifests/dns.go Outdated
Comment thread pkg/asset/manifests/dns.go Outdated
Comment thread pkg/asset/manifests/dns.go Outdated
Comment thread pkg/asset/manifests/dns.go Outdated
Comment thread pkg/types/gcp/platform.go Outdated
Copy link
Copy Markdown
Contributor

@jstuever jstuever left a comment

Choose a reason for hiding this comment

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

This appears to function as desired. I'll leave it to the rest of the team to review and approve.

**Install config added the public and private managed zones under platform/gcp
**Install config validate the public and private managed zones (if provided) - when
empty or "None" the validation does not occur.
** Added tests for install config

** config.Spec.PublicZone and config.Spec.PrivateZone in the cluster dns manifest are not set when "None",
Default (empty) values for Public and Private managed zones will not change the current behavior (zones are created and
managed in the ProjectID)

** Added the terraform values to skip the creation of public and private zones and their
records according to the data provided in public/privateManagedZones:
  "" (default): normal behavior
  "None": skip private and public zone and record creation
  Data Provided: Skip zone creation but still create the records for the zone(s).

** Terraform will use the project or network project ID when creating zones and records.
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Sep 22, 2022

@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-ibmcloud 4c713b737580737d56b59fb7cebf723701b5a1a7 link false /test e2e-ibmcloud
ci/prow/e2e-gcp-shared-vpc 4c713b737580737d56b59fb7cebf723701b5a1a7 link false /test e2e-gcp-shared-vpc
ci/prow/e2e-nutanix 4f519f6bda58fe7dc90e19cda78113f10557bf90 link false /test e2e-nutanix
ci/prow/okd-e2e-aws-upgrade d10801b link false /test okd-e2e-aws-upgrade
ci/prow/e2e-gcp-ovn-shared-vpc d10801b link false /test e2e-gcp-ovn-shared-vpc
ci/prow/e2e-metal-ipi d10801b link false /test e2e-metal-ipi
ci/prow/e2e-openstack d10801b link false /test e2e-openstack
ci/prow/okd-e2e-aws-ovn d10801b link false /test okd-e2e-aws-ovn
ci/prow/e2e-libvirt d10801b link false /test e2e-libvirt
ci/prow/okd-e2e-gcp-ovn-upgrade d10801b link false /test okd-e2e-gcp-ovn-upgrade

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/test-infra repository. I understand the commands that are listed here.

@patrickdillon
Copy link
Copy Markdown
Contributor

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Sep 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

description: ID Technology Preview. ID or name of the zone.
type: string
project:
description: ProjectID Technology Preview When the ProjectID
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit. Missing a period here Preview "." When.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

well its tech preview does it matter = )

description: ID Technology Preview. ID or name of the zone.
type: string
project:
description: ProjectID Technology Preview When the ProjectID
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

privateZoneName := ""
privateZoneProject := ""
if installConfig.Config.GCP.PrivateDNSZone != nil && installConfig.Config.GCP.PrivateDNSZone.ID != "" {
createPrivateZone = false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems counter intuitive to me. When PrivateDNSZone != nil and the ID is provided, we don't create private zones?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no that means that one exists already we DO NOT want to create one. We are assuming it is already created and provided by the user. This option of adding the privateDNSZone.ID is not to name a new private zone but to use an existing one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok. Got it. I think I was equating createPrivateZone with what createPrivateZoneRecords is doing.

Comment thread pkg/asset/manifests/dns.go
@sadasu
Copy link
Copy Markdown
Contributor

sadasu commented Sep 28, 2022

/lgtm

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 9eb0224 and 2 for PR HEAD d10801b in total

@barbacbd
Copy link
Copy Markdown
Contributor Author

/skip

@barbacbd
Copy link
Copy Markdown
Contributor Author

/override ci/prow/e2e-azure-ovn

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Sep 28, 2022

@barbacbd: Overrode contexts on behalf of barbacbd: ci/prow/e2e-azure-ovn

Details

In response to this:

/override ci/prow/e2e-azure-ovn

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants