-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(registry/txt): enable support for SRV and NAPTR #6023
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
base: master
Are you sure you want to change the base?
feat(registry/txt): enable support for SRV and NAPTR #6023
Conversation
This enables support for SRV and NAPTR in the TXT registry.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
|
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 Once the patch is verified, the new status will be reflected by the 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. |
|
|
||
| func getSupportedTypes() []string { | ||
| return []string{endpoint.RecordTypeA, endpoint.RecordTypeAAAA, endpoint.RecordTypeCNAME, endpoint.RecordTypeNS, endpoint.RecordTypeMX} | ||
| return []string{endpoint.RecordTypeA, endpoint.RecordTypeAAAA, endpoint.RecordTypeCNAME, endpoint.RecordTypeNS, endpoint.RecordTypeMX, endpoint.RecordTypeSRV, endpoint.RecordTypeNAPTR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may need to share more information why this constants added here. TXT registry does supports SRV records. So not too sure what is reason of updating the method.
Maybe worth to rename a method and add a description what is for. Hard to say
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this change, SRV and NAPTR records are not cleaned up when using sync mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have NAPTR records in my environment, but quite few SRV records. Not come across this problem. Could you share manifests so I could try to reproduce the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, no problem. Steps to reproduce:
- 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 SRV record. For example:
apiVersion: externaldns.k8s.io/v1alpha1 kind: DNSEndpoint metadata: name: test-srv namespace: default spec: endpoints: - dnsName: _sip._udp.your-zone.example.com recordTTL: 180 recordType: SRV targets: - 1 50 5060 sip1-n1.your-zone.example.com - 1 50 5060 sip1-n2.your-zone.example.com
- Watch external-dns create the record
- Delete the DNSEndpoint
- Notice that the SRV and related TXT record are not deleted from Route53
|
/ok-to-test |
Pull Request Test Coverage Report for Build 20176576968Details
💛 - Coveralls |
|
Tested with CRD #6023 (comment). Works as well |
|
Coul you update tutorial https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/crd.md with SRV and NAPTR example please? |





What does it do ?
This enables support for SRV and NAPTR in the TXT registry.
Motivation
We'd like to have external-dns clean up old SRV and NAPTR records.
More