What happened:
Using Traefik ingress CRDs with default-targets: args do not work. My ingress is taken by External DNS only when I added the annotation external-dns.alpha.kubernetes.io/target even if default target is setup.
Curious part, without the target annotation nothing happen (no logs even in debug). But When I add this annotation, I have logs which say "didn't use default target because a target is provided" ... So look like an error on "filter level".
What you expected to happen:
Traefik CRDs should work as other, so without static target and using default target.
How to reproduce it (as minimally and precisely as possible):
External DNS config :
ovh:
provider: ovh
sources:
- crd
- service
- traefik-proxy
## Using extraArgs because is templating
extraArgs:
traefik-enable-legacy: null
txt-owner-id: "cloud-{{ $.Values.global.id_cluster }}"
txt-wildcard-replacement: "wildcard"
txt-prefix: _cloud-extdns.
aws-prefer-cname: null
## -- Public load balancer cname
default-targets: nlb-aws-eks-pen-euw1-m-pub-1234.elb.eu-west-1.amazonaws.com
policy: sync
registry: txt
annotationFilter: external-dns.corp.io/scope in (ovh)
domainFilters:
- mycorp.com
serviceMonitor:
enabled: true
Args :
containers:
- args:
- --log-level=debug
- --log-format=text
- --interval=1m
- --source=crd
- --source=service
- --source=traefik-proxy
- --policy=sync
- --registry=txt
- --domain-filter=frtcld.com
- --domain-filter=pen-euw1-m.mycorp.com
- --exclude-domains=internal.frtcld.com
- --annotation-filter=external-dns.corp.io/scope in (ovh)
- --provider=ovh
- --aws-prefer-cname
- --default-targets=nlb-aws-eks-pen-euw1-m-pub-1234.elb.eu-west-1.amazonaws.com
- --traefik-enable-legacy
- --txt-owner-id=cloud-pen-euw1-m
- --txt-prefix=_cloud-extdns.
- --txt-wildcard-replacement=wildcard
Ingress :
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
annotations:
external-dns.corp.io/scope: ovh
## Without this annotation, nothing happen even if default tartget is set
external-dns.alpha.kubernetes.io/target: nlb-aws-eks-pen-euw1-m-pub-1234.elb.eu-west-1.amazonaws.com
name: extdns-mft-traefik-whoami-websecure
namespace: corp-playground
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`tw-websecure.pen-euw1-m.corp.com`)
services:
- name: traefik-whoami
port: 80
tls:
secretName: traefik-whoami-internal-certificate-stg
Logs when target annotation (show that default target is read in this case)
time="2026-05-27T14:44:46Z" level=debug msg="Endpoints generated from corp-playground/extdns-mft-traefik-whoami-websecure: [tw-websecure.pen-euw1-m.mycorp.com 0 IN CNAME nlb-aws-eks-pen-euw1-m-pub-1234.elb.eu-west-1.amazonaws.com []]"
time="2026-05-27T14:44:46Z" level=warning msg="Source provided targets for \"tw-websecure.pen-euw1-m.mycorp.com\" (CNAME), ignoring default targets [nlb-aws-eks-pen-euw1-m-pub-1234.elb.eu-west-1.amazonaws.com] due to new behavior. Use --force-default-targets to revert to old behavior."
time="2026-05-27T14:44:46Z" level=debug msg="OVH: changes CREATE dns:\"tw-websecure.pen-euw1-m.mycorp.com\" / targets:nlb-aws-eks-pen-euw1-m-pub-1234.elb.eu-west-1.amazonaws.com / type:CNAME"
time="2026-05-27T14:44:46Z" level=debug msg="OVH: changes CREATE dns:\"_cloud-extdns.cname-tw-websecure.pen-euw1-m.mycorp.com\" / targets:\"heritage=external-dns,external-dns/owner=cloud-pen-euw1-m,external-dns/resource=ingressroute/corp-playground/extdns-mft-traefik-whoami-websecure\" / type:TXT"
time="2026-05-27T14:44:46Z" level=debug msg="OVH: Add an entry to zone action(create) : _cloud-extdns.cname-tw-websecure.pen-euw1-m.mycorp.com 0 IN TXT \"heritage=external-dns,external-dns/owner=cloud-pen-euw1-m,external-dns/resource=ingressroute/corp-playground/extdns-mft-traefik-whoami-websecure\""
time="2026-05-27T14:44:46Z" level=debug msg="OVH: Add an entry to zone action(create) : tw-websecure.pen-euw1-m.mycorp.com 0 IN CNAME nlb-aws-eks-pen-euw1-m-pub-1234.elb.eu-west-1.amazonaws.com."
Anything else we need to know?:
Using default target as CName (maybe not important)
Maybe link to this one where the first analysis "target is mandatory" has be removed from the pbl #3967
Environment:
- External-DNS version (use
external-dns --version): image: registry.k8s.io/external-dns/external-dns:v0.20.0
- DNS provider: OVH
- Others: Traefik V2
Checklist
What happened:
Using Traefik ingress CRDs with
default-targets:args do not work. My ingress is taken by External DNS only when I added the annotationexternal-dns.alpha.kubernetes.io/targeteven if default target is setup.Curious part, without the target annotation nothing happen (no logs even in debug). But When I add this annotation, I have logs which say "didn't use default target because a target is provided" ... So look like an error on "filter level".
What you expected to happen:
Traefik CRDs should work as other, so without static target and using default target.
How to reproduce it (as minimally and precisely as possible):
External DNS config :
Args :
Ingress :
Logs when target annotation (show that default target is read in this case)
Anything else we need to know?:
Using default target as CName (maybe not important)
Maybe link to this one where the first analysis "target is mandatory" has be removed from the pbl #3967
Environment:
external-dns --version): image: registry.k8s.io/external-dns/external-dns:v0.20.0Checklist
or have checked the staging image to confirm the bug is still reproducible
kubectl get <resource> -o yamloutput includingstatus