Skip to content

Cloudflare provider: Support vanity domains for external-dns.alpha.kubernetes.io/cloudflare-custom-hostname (Cloudflare for SaaS) #6193

@AyushChothe

Description

@AyushChothe

What happened:

When using the annotation:

external-dns.alpha.kubernetes.io/cloudflare-custom-hostname: "customer.com"

ExternalDNS does not correctly provision the hostname when the value is a vanity domain (apex domain like customer.com) that is not a subdomain of the SaaS provider’s zone.

This prevents using ExternalDNS to automate Cloudflare for SaaS custom hostname provisioning for customer-owned domains.


What you expected to happen:

ExternalDNS should support provisioning Cloudflare for SaaS custom hostnames for:

  • subdomains of the SaaS provider zone (ex: sub.serviceprovider.com)
  • vanity domains (ex: customer.com)

Cloudflare for SaaS documentation explicitly states that both are supported:

Cloudflare for SaaS allows you, as a SaaS provider, to extend the benefits of Cloudflare products to custom domains by adding them to your zone as custom hostnames. We support adding hostnames that are a subdomain of your zone (for example, sub.serviceprovider.com) and vanity domains (for example, customer.com) to your SaaS zone.


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

  1. Configure ExternalDNS with the Cloudflare provider and enable support for Cloudflare custom hostnames.
  2. Create an Ingress/VirtualService/Service with:
metadata:
  annotations:
    external-dns.alpha.kubernetes.io/cloudflare-custom-hostname: "customer.com"
  1. Observe that ExternalDNS does not provision the vanity domain (customer.com) as a Cloudflare custom hostname.

Note:

  • It fails / is unsupported when using a vanity domain (ex: customer.com)

Anything else we need to know?:

This is specifically about Cloudflare for SaaS Custom Hostnames API, not standard Cloudflare DNS record creation.

Vanity domains are a core feature of Cloudflare for SaaS, and without this support users must implement custom provisioning logic outside ExternalDNS.

It would be great if ExternalDNS could support vanity domains via the same annotation:

external-dns.alpha.kubernetes.io/cloudflare-custom-hostname

Environment:

  • External-DNS version: v0.20.0

  • DNS provider: Cloudflare

  • Others:

    • Using Cloudflare for SaaS custom hostnames
    • Annotation: external-dns.alpha.kubernetes.io/cloudflare-custom-hostname

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions