Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: filter peering zones in google provider #3690

Merged
merged 2 commits into from Sep 15, 2023
Merged

fix: filter peering zones in google provider #3690

merged 2 commits into from Sep 15, 2023

Conversation

itspngu
Copy link
Contributor

@itspngu itspngu commented Jun 15, 2023

Description

Filters peering zones from the list of zones considered for creation of records by the google provider. This is needed because peering zones do not allow the creation of records, so if a peering zone matches a domain filter, external-dns tries to create records in it, causing the entire changeset to fail and no records to be created (even in other, valid zones).

Fixes #2947

Checklist

  • Unit tests updated
  • End user documentation updated

Notes

Changes to end user docs were not necessary.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jun 15, 2023
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 15, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @itspngu!

It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. labels Jun 15, 2023
@johngmyers
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 16, 2023
@szuecs
Copy link
Contributor

szuecs commented Jun 19, 2023

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2023
@andrewchinnadorai
Copy link
Contributor

Thanks for raising this, tried to raise a PR to add a test for the peering filter but as it's a forked branch I'm unable to do so, if it's any help you can add the test from this branch

@itspngu
Copy link
Contributor Author

itspngu commented Jun 19, 2023

Thanks for raising this, tried to raise a PR to add a test for the peering filter but as it's a forked branch I'm unable to do so, if it's any help you can add the test from this branch

Thank you! I didn't realize the zones were created during the e2e test, should have looked at the code more closely. I'll try to get your additions into this branch while retaining your authorship without making the CI throw up 🤞

@itspngu
Copy link
Contributor Author

itspngu commented Jun 19, 2023

@szuecs
Copy link
Contributor

szuecs commented Jun 19, 2023

/approve cancel

@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2023
@andrewchinnadorai
Copy link
Contributor

This doesn't look like it'd work :( itspngu/external-dns@google-peering-zone-bugfix...andrewchinnadorai:external-dns:3690/add-peering-filtering-tests

Hm, have you rebased your forked branch with master?

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 19, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: itspngu / name: Thorben (b1084be)
  • ✅ login: andrewchinnadorai / name: Andrew Chinnadorai (a7884f1)

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 19, 2023
@itspngu
Copy link
Contributor Author

itspngu commented Jun 19, 2023

This doesn't look like it'd work :( itspngu/external-dns@google-peering-zone-bugfix...andrewchinnadorai:external-dns:3690/add-peering-filtering-tests

Hm, have you rebased your forked branch with master?

Right, that sorted it. Now the CI is running again and you need to sign the CLA but tests are worth it. Thanks! :D

@andrewchinnadorai
Copy link
Contributor

This doesn't look like it'd work :( itspngu/external-dns@google-peering-zone-bugfix...andrewchinnadorai:external-dns:3690/add-peering-filtering-tests

Hm, have you rebased your forked branch with master?

Right, that sorted it. Now the CI is running again and you need to sign the CLA but tests are worth it. Thanks! :D

Nice, signed

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 19, 2023
@andrewchinnadorai
Copy link
Contributor

@szuecs Can we get this reviewed by a maintainer please

@itspngu
Copy link
Contributor Author

itspngu commented Jul 12, 2023

Totally forgot about this because we're running a fork including the change. Would be great to get a fresh review, sorry for the chaos caused while adding the tests.

@johngmyers
Copy link
Contributor

/lgtm
/assign @seanmalloy

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 14, 2023
@itspngu
Copy link
Contributor Author

itspngu commented Jul 25, 2023

@seanmalloy @szuecs Sorry for the direct ping, but I was wondering if you had the chance to give this a look yet. Apologies for the noise caused by merging the tests. If there's anything I can do to help get this merged, please do let me know.

@itspngu
Copy link
Contributor Author

itspngu commented Jul 25, 2023

Here's some additional context on what these zones are and why they need to be filtered: https://cloud.google.com/dns/docs/zones/zones-overview#dns_peering_limitations_and_key_points

TL;DR: They are not something records can be created in, they're a sort of read-only reference to a DNS zone in another project. When external-dns tries to create records in these zones, an error is returned by the Cloud DNS APIs, resulting in partial (or no) record creation in valid zones.

@andrewchinnadorai
Copy link
Contributor

@seanmalloy @szuecs Sorry for another ping, but just want to bump this as we're currently using a self-built version to work around this and are hoping this fix will get in to a official release at some point

@mloiseleur
Copy link
Contributor

/lgtm
/retest

@johngmyers
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johngmyers

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 15, 2023
@k8s-ci-robot k8s-ci-robot merged commit f288d76 into kubernetes-sigs:master Sep 15, 2023
17 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

External DNS tries to create records in a Peering zone
7 participants