Skip to content

undocumented CNAME targets normalization (removing trailing dots) #6145

@lukasmetzner

Description

@lukasmetzner

What happened:

I am developing a webhook for external-dns. When creating a CNAME record via the annotation external-dns.alpha.kubernetes.io/target, the trailing dot is stripped from the value. In the external-dns code this is referred to as "Normalization".

I am unsure if this is the intended behavior and possibly needs some more documentation.

For my understanding: Is it a supported feature that only the prefix is used in external-dns.alpha.kubernetes.io/target?
For example, given:

external-dns.alpha.kubernetes.io/hostname: "foo.example.com"
external-dns.alpha.kubernetes.io/target: "bar"

the resulting DNS record would be a CNAME:

foo.example.com. -> bar.example.com.

What you expected to happen:

Either to receive the raw value in the Endpoint.Targets field, or have more documentation on this topic.

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

  1. Create a Service with the annotations external-dns.alpha.kubernetes.io/hostname: example.mydomain.de and external-dns.alpha.kubernetes.io/target: www.example.com.
  2. When developing a webhook the value in the endpoint.Targets array will have the trailing dot in www.example.com. removed → www.example.com

Anything else we need to know?:

Environment:

  • External-DNS version (use external-dns --version): v0.20.0
  • DNS provider: Hetzner
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.kind/designCategorizes issue or PR as related to design.kind/documentationCategorizes issue or PR as related to documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions