Skip to content

Conversation

@sjberman
Copy link
Collaborator

@sjberman sjberman commented Dec 2, 2025

Reopened from #4358 to workaround issues with forks at the moment.

Proposed changes

Problem: nginx expects IPv6 DNS resolvers to be passed with [] brackets:
invalid port in resolver \"2606:4700:4700::1111\" in /etc/nginx/stream-conf.d/stream.conf
But passing resolvers with brackets is not possible:
gatewayClassNp="&{Source:0xc0014382c0 ErrMsgs:[spec.dnsResolver.addresses[0].value: Invalid value: \"[2606:4700:4700::1111]\": must be a valid IP address] Valid:false}"

Solution: detect IPv6 resolvers and add brackets in the config templating.

Testing: deployed on an IPv6 capable cluster and configured DNS resolvers using the helm chart, deployed a gateway and http route pointing to an ExternalName service (which requires configuring a DNS resolver).

Closes #4369

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

Fixed an issue regarding configuring IPv6 DNS resolvers for ExternalName services

@sjberman sjberman requested a review from a team as a code owner December 2, 2025 16:14
@github-actions github-actions bot added the bug Something isn't working label Dec 2, 2025
@sjberman sjberman closed this Dec 2, 2025
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Dec 2, 2025
@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

❌ Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.14%. Comparing base (dbebd97) to head (d6c4148).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ternal/controller/nginx/config/base_http_config.go 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4378      +/-   ##
==========================================
+ Coverage   86.12%   86.14%   +0.01%     
==========================================
  Files         132      132              
  Lines       14343    14359      +16     
  Branches       35       35              
==========================================
+ Hits        12353    12369      +16     
  Misses       1786     1786              
  Partials      204      204              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sjberman sjberman reopened this Dec 2, 2025
@github-project-automation github-project-automation bot moved this from ✅ Done to 🆕 New in NGINX Gateway Fabric Dec 2, 2025
@sjberman sjberman force-pushed the fix/ipv6-dns-resolver branch from 8892133 to d6c4148 Compare December 2, 2025 18:28
@sjberman sjberman requested a review from shaun-nx December 2, 2025 18:42
@sjberman sjberman merged commit 14f5baf into main Dec 3, 2025
61 checks passed
@sjberman sjberman deleted the fix/ipv6-dns-resolver branch December 3, 2025 15:12
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working release-notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bug configuring IPv6 DNS resolver

5 participants