Description
What would you like to be added: Feature to resolve Ingress
status.loadBalancer.ingress[0].hostname
to IP, same as existing flag --resolve-service-load-balancer-hostname
.
Why is this needed: To create A records instead of CNAME records for hostnames like 10.200.1.1.nip.io
.
The Ingress
status value status.loadBalancer.ingress[0].hostname
can contain a nip.io
FQDN like 10.200.1.1.nip.io
in some ingress-nginx
configurations, which leads to using nip.io
CNAMEs instead of A records. This works correctly, as external-dns creates a CNAME record. However, having external-dns resolve this to an IP and create an A record would simplify the setup and not require resolving .nip.io
records.
Example Ingress status:
apiVersion: networking.k8s.io/v1
kind: Ingress
name: my-ingress
spec:
ingressClassName: nginx
rules:
- host: example.org
http:
paths:
- backend:
service:
name: example-service
port:
name: http
path: /
pathType: Prefix
status:
loadBalancer:
ingress:
- hostname: 10.200.130.84.nip.io
external-dns in this case will create a CNAME record from example.org
to 10.200.130.84.nip.io
. This feature request is to resolve the hostname 10.200.130.84.nip.io
to 10.200.130.84
and so create an example.org
A record pointing to 10.200.130.84
.