fix(exoscale): handle apex DNS records#6369
fix(exoscale): handle apex DNS records#6369natalie-o-perret wants to merge 1 commit intokubernetes-sigs:masterfrom
Conversation
EndpointZoneID only matched records where the DNS name had a dot-prefixed zone suffix (e.g. sub.example.com matches .example.com). Apex records like example.com do not have that prefix, so they were silently skipped, causing external-dns to log CREATE but never call the API. Fix EndpointZoneID to also match when the DNS name equals the zone name exactly, returning an empty record name for apex records. Fix Records() to build the correct FQDN for apex records returned by the API (Name == ""), which previously produced .example.com instead of example.com, breaking the idempotency check and causing repeated CREATE attempts. Also fix TestExoscaleApplyChanges to reset all global state slices before running to avoid test-order-dependent failures.
|
[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 @natalie-o-perret! |
|
Hi @natalie-o-perret. 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. |
|
CLA Authorization should be in place now. |
|
If there is a bug, please share information in the more receivable format https://github.com/kubernetes-sigs/external-dns/blob/master/docs/contributing/bug-report.md |
Sure, will do 🙇♀️ |
|
Not related to this fix exoscale/egoscale#750 but worth to refresh provider in separate PR
|
@ivankatliarchuk, there it is, #6371 Btw, for some reason, while I've done the auth thingy, which did work for my other PR, it doesn't seem the case for that PR here, do you happen to know why?
|
1. external-dns info
This came in as a customer report (no direct cluster access), so I traced it through the source code.
Version: unconfirmed from the customer, but the bug is present in current master (
dc28c3e).Startup flags (from customer description, approximate):
Debug logs: not available. Based on the code path,
EndpointZoneIDreturns""for apex records so they are dropped before any change is scheduled. You would never see aCREATE xxx.yyline in the logs.2. Kubernetes resources
Not available (proprietary infrastructure). The relevant annotation was:
3. DNS provider: existing vs expected records
www.xxx.yyxxx.yy4. TXT ownership records
Not available.
Demonstrating the bug with tests
I added tests that fail against master and pass after the fix. Here is the output against the unpatched code:
After the fix:
Note
This PR description was drafted with AI assistance (GitHub Copilot).