Skip to content

Using wrong record type for top level domains #3787

@davidgiga1993

Description

@davidgiga1993

What happened:
External DNS tries to create a CNAME record for a top-level domain of a route53 zone instead of an A record.

What you expected to happen:
Either
a) External DNS should detect if it's possible to create a CNAME and if not fallback to another record type
or
b) Allow the user to specify the record type via an annotation.

I would be happy with either solution and would be willing to implement this change. Just needs some discussion first what approach should be used

How to reproduce it (as minimally and precisely as possible):

  1. Create a route53 zone
  2. Create an ingress which uses the top level domain
  3. See logs:
Failure in zone mydomain.com. [Id: /hostedzone/Z08072521A81YX2VJ0B4V] when submitting change batch: InvalidChangeBatch: [RRSet of type CNAME with DNS name mydomain.com. is not permitted at apex in zone mydomain.com. status code: 400, request id: e1371e8e-86d5-461f-be1e-a0a7048e6be6"

Anything else we need to know?:
Arguments:

"--source=ingress",
"--source=service",
"--provider=aws",
"--aws-zone-type=public",
"--registry=txt",
"--txt-owner-id=${var.record_owner}",
"--txt-prefix=${var.dns_txt_prefix}",
# Use a batch size of 1 to make sure
# a single failed update doesn't block the entire batch
"--aws-batch-change-size=1",
"--log-level=debug"

Environment:

  • External-DNS version (use external-dns --version): v20230327-v0.13.4
  • DNS provider: AWS route53
  • Others: k8s v1.27.3-eks-a5565ad

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions