fix: make TXT name mapper zone-aware to handle dots in hostname#6494
fix: make TXT name mapper zone-aware to handle dots in hostname#6494karthikk022 wants to merge 1 commit into
Conversation
Fixes kubernetes-sigs#5151: external-dns creates malformed RR when name contains dot The ToTXTName function was splitting the DNS name at the first dot, which broke hostnames containing dots (e.g., name-192.168.0.1.example.com was split as 'name-192' and '168.0.1.example.com' instead of 'name-192.168.0.1' and 'example.com'). Changes: - Added zones field to AffixNameMapper for zone-aware splitting - Added NewAffixNameMapperWithZones constructor accepting zone list - Added findZone method to match DNS name against configured zones - Updated ToTXTName to split at zone boundary instead of first dot - Updated TXTRegistry to pass zones from provider's domain filter to mapper - Zones are sorted by specificity (longest first) for correct matching This fix maintains backward compatibility - if no zones are configured, falls back to the original first-dot splitting behavior.
|
Invalid commit message issues detected Invalid commit messagesKeywords which can automatically close issues and hashtag(#) mentions are not allowed.
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. I understand the commands that are listed here. |
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
Welcome @karthikk022! |
|
Hi @karthikk022. 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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
No description provided.