kubernetes-sigs / external-dns

Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services
Apache License 2.0
7.65k stars 2.56k forks source link

Internal IPv6 addresses are used when ExternalAddress is specified. #4807

Open TroyKomodo opened 2 days ago

TroyKomodo commented 2 days ago

https://github.com/kubernetes-sigs/external-dns/commit/683663e9c21f0ed9a2cff073f555baec6752dadc#diff-14de035cd51595a543622295768037ac376d511bc269c0f41f36cd6737db01bdR84

(https://github.com/kubernetes-sigs/external-dns/blob/683663e9c21f0ed9a2cff073f555baec6752dadc/source/service.go#L314)

This commit introduced a change which checks if the ipv6 address is internal and uses it regardless of if we only want external ips. This seems very wrong.

I patched this out on my build and use a custom image.

TroyKomodo commented 2 days ago
image image
TroyKomodo commented 2 days ago
apiVersion: v1
kind: Service
metadata:
  name: headless
  namespace: app
  labels:
    app: cdn
  annotations:
    external-dns.alpha.kubernetes.io/endpoints-type: NodeExternalIP
    external-dns.alpha.kubernetes.io/hostname: "..."
    external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
spec:
    ...