Skip to content

Conversation

@alexbakker-quandago
Copy link

@alexbakker-quandago alexbakker-quandago commented Dec 12, 2025

What does it do ?

Since ef62107, it is now possible to enable support for NAPTR records in the AWS provider. This patch does so and adds some tests for it.

Closes #5003

Motivation

We'd like to be able to create NAPTR records in Route53 using external-dns.

More

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

Since ef62107, it is now possible to enable support for NAPTR records in
the AWS provider. This patch does so and adds some tests for it.
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 12, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: woltere / name: Wolter Eldering (28d47dc)

@k8s-ci-robot
Copy link
Contributor

Welcome @alexbakker-quandago!

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 the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 12, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @alexbakker-quandago. Thanks for your PR.

I'm waiting for a github.com 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 cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Dec 12, 2025
@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 ivankatliarchuk 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 provider Issues or PRs related to a provider label Dec 12, 2025
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. 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 Dec 12, 2025
@ivankatliarchuk
Copy link
Member

Could you share similar results for this PR #5085 (comment). Need to make sure it works.

@ivankatliarchuk
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 13, 2025
@ivankatliarchuk
Copy link
Member

I'm not too sure actually about this PR. Extnernal-dns and AWS supports NAPTR records #5003

On hold as missing evidences that currently not working.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 13, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 20173145831

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 78.688%

Totals Coverage Status
Change from base Build 20163464704: 0.0%
Covered Lines: 16013
Relevant Lines: 20350

💛 - Coveralls

@ivankatliarchuk
Copy link
Member

I dig a bit more in details of issue 5003. Current PR in description does not match the problem explained in the issue. So this need to be addressed first.

@alexbakker-quandago
Copy link
Author

Without this patch you'll run into the problem reported in #5003. As described there, initial creation of the NAPTR record succeeds, but on subsequent passes you'll keep getting the following error:

time="2025-12-13T11:04:59Z" level=debug msg="Desired change: CREATE REDACTED NAPTR" profile=default zoneID=/hostedzone/REDACTED zoneName=REDACTED.
time="2025-12-13T11:04:59Z" level=error msg="Failed submitting change (error: operation error Route 53: ChangeResourceRecordSets, https response error StatusCode: 400, RequestID: REDACTED, InvalidChangeBatch: [Tried to create resource record set [name='REDACTED.', type='NAPTR'] but it already exists]), it will be retried in a separate change batch in the next iteration" profile=default zoneID=/hostedzone/REDACTED zoneName=REDACTED.

@ivankatliarchuk
Copy link
Member

I’m not denying the issue. What’s mainly missing are the configuration manifests and steps to easily reproduce it, along with evidence that the fix actually works. It’s not that I don’t trust the unit tests, but we do need some form of smoke testing to confirm the behaviour and to ensure we can reproduce it on our side when needed. Also, the title and description are a bit misleading.

@alexbakker-quandago
Copy link
Author

alexbakker-quandago commented Dec 13, 2025

Sure, no problem. #5003 already describes steps to reproduce, but here's a more precise version:

  • Start external-dns with the following arguments:
    --log-level=debug
    --log-format=text
    --interval=1m
    --source=service
    --source=ingress
    --source=crd
    --policy=sync
    --registry=txt
    --txt-owner-id=some-owner
    --txt-prefix=extdns-%{record_type}-
    --domain-filter=your-zone.example.com
    --provider=aws
    --zone-id-filter=REDACTED
    --managed-record-types=A
    --managed-record-types=AAAA
    --managed-record-types=CNAME
    --managed-record-types=NAPTR
    --managed-record-types=SRV
    --aws-zone-match-parent
    --aws-assume-role=arn:aws:iam::REDACTED:role/REDACTED
    
  • Create a DNSEndpoint with an NAPTR record. For example:
    apiVersion: externaldns.k8s.io/v1alpha1
    kind: DNSEndpoint
    metadata:
      name: test-naptr
      namespace: default
    spec:
      endpoints:
      - dnsName: test.your-zone.example.com
        recordTTL: 180
        recordType: NAPTR
        targets:
        - 50 50 "S" "SIPS+D2T" "" _sips._tcp.test.your-zone.example.com.
        - 100 50 "S" "SIP+D2U" "" _sip._udp.test.your-zone.example.com.
  • Watch external-dns create the record
  • On the next passes, look for errors similar to:
    time="2025-12-13T11:04:59Z" level=debug msg="Desired change: CREATE REDACTED NAPTR" profile=default zoneID=/hostedzone/REDACTED zoneName=REDACTED.
    time="2025-12-13T11:04:59Z" level=error msg="Failed submitting change (error: operation error Route 53: ChangeResourceRecordSets, https response error StatusCode: 400, RequestID: REDACTED, InvalidChangeBatch: [Tried to create resource record set [name='REDACTED.', type='NAPTR'] but it already exists]), it will be retried in a separate change batch in the next iteration" profile=default zoneID=/hostedzone/REDACTED zoneName=REDACTED.
    

Regarding the title and description: They're formulated like this because NAPTR support in the AWS provider seemed so broken before ef62107 and this patch, that I didn't expect anyone to be using it. After this patch, NAPTR support becomes usable, hence why I called it "enabling" NAPTR support. I'm happy to change it if you have a suggestion for a more fitting title though.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. provider Issues or PRs related to a provider 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.

The AWS provider is creates NAPTR records using the CRD, but only when the record does not exist.

5 participants