-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
What happened:
External-dns ignores the fqdnTemplate
argument for generating DNS records when the host
stanza of an ingress resource is set (if if only set to the hostname rather than fqdn).
What you expected to happen:
Would expect external-dns to generate a dns record according to the fqdnTemplate
e.g. if the ingress name: foo
and host: foo
is created while fqdnTemplate={{.Name}}.bar.example.com
then a dns record foo.bar.example.com
should be created
How to reproduce it (as minimally and precisely as possible):
When using an ingress like:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: foo
spec:
rules:
- host: foo
http:
paths:
- backend:
serviceName: foo
servicePort: 80
path: /
and with the following flags on external-dns
--log-level=info
--log-format=json
--events
--fqdn-template={{.Name}}.bar.example.com
--policy=upsert-only
--provider=aws
--registry=txt
--interval=3m
--txt-owner-id=bar-cluster
--source=ingress
--source=service
--aws-api-retries=3
--aws-batch-change-size=1000
--no-aws-evaluate-target-health
Anything else we need to know?:
The ultimate aim is to not not require every ingress specify a fqdn but only set the hostname (e.g. foo
) and have external-dns + nginx ingress (using server-alias: foo*
) deal with determining the rest of the domain name and route accordingly. This works if the host
stanza is missing from the ingress but then nginx ingress complains if more than one ingress is created (as host will be empty and path will be /
for them).
Environment:
- External-DNS version (use
external-dns --version
): v0.7.4-dirty - DNS provider: AWS
- Others: used along side nginx ingress