SRV records cannot be created by the cloudflare provider #4751
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/rotten
Denotes an issue or PR that has aged beyond stale and will be auto-closed.
What happened: I tried to create and SRV record with a
DNSEndpoint
CRD, using the cloudflare provider and this failed with a validation error from cloudflare's API as seen in the debug logs of external-dns.What you expected to happen: The SRV record is created successfully.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?: Cloudflare's API wants the SRV record to be created using structured data fields for all of the target's parameters and external-dns just tries to jam the raw resulting string into the create record API which is not how you create SRV records on cloudflare. The fix looks pretty obvious, the cloudflare provider's logic needs to be updated in order to support a special case to structure the data if we are creating an SRV record.
Unfortunately, the
DNSEndpoint
CRD is overly-simple and does not support describing this data in a structured way in the CRD itself so I suggest just doing the minimal amount of work and splitting the string on spaces if the record type is SRV to construct the structured fields and hope the data is valid-ish.Ref: /~https://github.com/cloudflare/cloudflare-go/blob/v0.104.0/dns.go#L184
Environment:
external-dns --version
): v0.15.0The text was updated successfully, but these errors were encountered: