Skip to content
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

SRV records cannot be created by the cloudflare provider #4751

Open
starcraft66 opened this issue Sep 17, 2024 · 0 comments · May be fixed by #4754
Open

SRV records cannot be created by the cloudflare provider #4751

starcraft66 opened this issue Sep 17, 2024 · 0 comments · May be fixed by #4754
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@starcraft66
Copy link

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 (use external-dns --version): v0.15.0
  • DNS provider: cloudflare
@starcraft66 starcraft66 added the kind/bug Categorizes issue or PR as related to a bug. label Sep 17, 2024
@starcraft66 starcraft66 linked a pull request Sep 17, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant