bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.06k stars 9.23k forks source link

[bitnami/external-dns] - Specify custom IP for DNS records #30613

Open vikas027 opened 3 days ago

vikas027 commented 3 days ago

Name and Version

bitnami/external-dns 8.6.0

What is the problem this feature will solve?

My Environment

Kubernetes: Azure Kubernetes Engine Ingress Controller: Nginx Load Balancer: Azure Internal Load Balancer DNS: Cloudflare

My kubernetes ingress defaults to the private IP of an internal load balancer. My setup looks like this

Azure Application Gateway (Public IP) --> Azure Firewall --> Azure Internal Load Balancer --> K8s Nginx Ingress Controller ---> K8s Nginx Pods

Problem

In my environment, the ingress resource has the IP of the internal load balancer (i.e. 192.168.1.10) and not the public IP of the application gateway (i.e. 52.164.208.127)

❯ k get ing
NAME        CLASS      HOSTS                 ADDRESS        PORTS     AGE
vikas       nginx      vikas.example.com     192.168.1.10   80, 443   9d

What is the feature you are proposing to solve the problem?

It would be great to have a helm variable (say EXTERNAL_IP: 52.164.208.127) that can be read and used by the operator to create DNS records on Cloudflare.

What alternatives have you considered?

I'll have to write a custom operator in Python :)

javsalgar commented 3 days ago

Hi,

Thank you so much for the feature request. My question is, does external-dns support this EXTERNAL_IP variable? If not, this is something that first should be reported to the external-dns devs. Did you check with them? https://github.com/kubernetes-sigs/external-dns/

vikas027 commented 2 days ago

Hey @javsalgar ,

Thanks, it looks like there is an option externalIPs . I tried using it but the controller still created the Cloudflare DNS record with an internal IP 192.168.1.10 and not the public IP 52.164.208.127.

My workaround (after a few hours of Google-ing) was to add an annotation to the ingress external-dns.alpha.kubernetes.io/target: "52.164.208.127". Once, I updated the ingress resource with this annotation, the controller created the DNS record with the public IP.

javsalgar commented 2 days ago

Hi, if you set it and the controller did not work as expected, then my advice would be to report it to the external-dns devs so they can check it