Skip to content

Bug configuring IPv6 DNS resolver #4369

@lucasl0st

Description

@lucasl0st

Describe the bug
When configuring a DNS resolver to use ExternalName services, for example via the helmchart:

nginx-gateway-fabric:
  nginx:
    config:
      ipFamily: dual
      dnsResolver:
        addresses:
          - type: IPAddress
            value: "2606:4700:4700::1111"

You get an error when creating a gateway: invalid port in resolver \"2606:4700:4700::1111\" in /etc/nginx/stream-conf.d/stream.conf

When passing an IPv6 resolver using brackets you get a different validation error: gatewayClassNp="&{Source:0xc0014382c0 ErrMsgs:[spec.dnsResolver.addresses[0].value: Invalid value: \"[2606:4700:4700::1111]\": must be a valid IP address] Valid:false}"

So, nginx does not accept IPv6 resolvers without brackets and nginx-gateway-fabric does not accept IPv6 resolvers with brackets.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy using IPv6 DNS resolver
  2. Deploy gateway with http route referencing an ExternalName service
  3. See error

Expected behavior
Either the helm chart / configuration accepts IPv6 resolvers with brackets or without.

Your environment

  • NGINX Gateway Fabric version: 2.2.1
  • Kubernetes version 1.34.2
  • kubeadm cluster with cilium & dual stack (ipv4 + ipv6)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions