fix: correct SRV record creation and RFC 2782 trailing dot handling#31
Merged
nicholaskuechler merged 1 commit intomainfrom Apr 29, 2026
Merged
fix: correct SRV record creation and RFC 2782 trailing dot handling#31nicholaskuechler merged 1 commit intomainfrom
nicholaskuechler merged 1 commit intomainfrom
Conversation
SRV records were created with the record's own DNS name as the target instead of the actual host from the endpoint target string. This caused all SRV records to point at themselves rather than the intended hosts. Additionally, Rackspace stores SRV target hosts without trailing dots, but external-dns >= 0.21 requires RFC 2782 compliant absolute FQDNs (trailing dot). Add trailing dot normalization in both the read path (convertRecordToEndpoint) and adjustEndpoints so current and desired records match consistently. external-dns compatibility notes: - Versions prior to 0.21 (including 0.18 and 0.20) do not include SRV in the TXT registry's getSupportedTypes(), which prevents the registry from matching srv- prefixed TXT ownership records to their SRV data records. This causes all SRV records to appear unowned and external-dns will not update or delete them. Upgrading to >= 0.21 is required. - CRD-sourced SRV records are broken in external-dns v0.21.0 due to contradictory validation in the CRD source and ValidateSRVRecord. See kubernetes-sigs/external-dns#6357 and the fix in kubernetes-sigs/external-dns#6383. A patched external-dns build is required until that PR is merged. Changes: - Use parts[3] instead of fqdn when building SRV data for Rackspace API - Strip trailing dot before sending to Rackspace (it doesn't use them) - Append trailing dot to SRV targets returned by Records() - Append trailing dot to SRV targets in adjustEndpoints as safety net - Improve SRV test to use distinct target host and validate request body
nicholaskuechler
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SRV records were created with the record's own DNS name as the target instead of the actual host from the endpoint target string. This caused all SRV records to point at themselves rather than the intended hosts.
Additionally, Rackspace stores SRV target hosts without trailing dots, but external-dns >= 0.21 requires RFC 2782 compliant absolute FQDNs (trailing dot). Add trailing dot normalization in both the read path (convertRecordToEndpoint) and adjustEndpoints so current and desired records match consistently.
external-dns compatibility notes:
Versions prior to 0.21 (including 0.18 and 0.20) do not include SRV in the TXT registry's getSupportedTypes(), which prevents the registry from matching srv- prefixed TXT ownership records to their SRV data records. This causes all SRV records to appear unowned and external-dns will not update or delete them. Upgrading to >= 0.21 is required.
CRD-sourced SRV records are broken in external-dns v0.21.0 due to contradictory validation in the CRD source and ValidateSRVRecord. See SRV records cannot be created using DNSEndpoint CRD kubernetes-sigs/external-dns#6357 and the fix in source/crd: allow SRV targets with trailing dot in DNSEndpoint kubernetes-sigs/external-dns#6383. A patched external-dns build is required until that PR is merged.
Changes: