Regression in dns resolve config v2.4.2

Please use this template for troubleshooting questions.

My issue:
dnsResolver with type: Hostname breaks in v2.4.2 (was supported in v2.2.1)

How I encountered the problem:
When configuring a DNS resolver with type: Hostname in the NginxProxy resource, the controller silently drops the address because buildDNSResolver() validates addresses using net.ParseIP(), which only accepts IP addresses. This results in an empty resolver ; directive in the generated NGINX config, which NGINX rejects

Solutions I’ve tried:

Version of NGF and/or NGINX: 2.4.2

Deployment environment: k8s 1.34

Hey @Maayan_Zimry , thanks for opening this. We’ll take a look at this soon and we’ll respond on dnsResolver with type: Hostname silently dropped by buildDNSResolver, produces invalid NGINX config · Issue #5410 · nginx/nginx-gateway-fabric · GitHub with any updates.