Skip to content

Conversation

u-kai
Copy link
Contributor

@u-kai u-kai commented Sep 23, 2025

What does it do?

Adds apex record delegation checks to prevent creating apex records when the TXT registry configuration would otherwise generate ownership TXT records outside of the managed zone.

Specifically, when --txt-prefix includes a record type template with a trailing dot, ExternalDNS could attempt to create TXT records that do not belong to the managed zone. This change introduces a guard (apexChecker) to block such cases.

Motivation

When using certain --txt-prefix configurations with apex records (records at the zone root), ExternalDNS may try to create ownership TXT records outside of the intended zone.
For example, with --txt-prefix=txt- and an apex A record for example.com, the ownership TXT record would be created as txt-example.com, which is outside the example.com zone and therefore unmanaged.

This PR ensures apex records are only created when the resulting TXT record can be safely managed within the zone.

Related: documentation clarification proposed in #5863 .

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign szuecs for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 internal Issues or PRs related to internal code label Sep 23, 2025
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. plan Issues or PRs related to external-dns plan registry Issues or PRs related to a registry needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 23, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @u-kai. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 23, 2025
@u-kai
Copy link
Contributor Author

u-kai commented Sep 23, 2025

After opening this PR, I realized I still need to think through a few more things.

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 24, 2025
@u-kai
Copy link
Contributor Author

u-kai commented Sep 24, 2025

Earlier I mentioned that I still needed to think through a few more things.
I've now completed that work, and this PR is ready for review. 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. internal Issues or PRs related to internal code needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. plan Issues or PRs related to external-dns plan registry Issues or PRs related to a registry size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants