-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for IPv6 #2190
Add support for IPv6 #2190
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2190 +/- ##
==========================================
+ Coverage 87.62% 87.76% +0.14%
==========================================
Files 96 96
Lines 6715 6793 +78
Branches 50 50
==========================================
+ Hits 5884 5962 +78
Misses 774 774
Partials 57 57 ☔ View full report in Codecov by Sentry. |
5ef4cd3
to
d2d10fe
Compare
Let's make sure we have the cafe example work for three cases when the cluster is: (1) Ensure you can establish IPv6 connection to NGINX, and you see responses from coffee and tea services. I tried this case myself and NGINX wasn't configured with upstream servers (they were empty). (See this area of the code Also nginx-gateway-fabric/internal/mode/static/state/resolver/resolver.go Lines 152 to 154 in 8f5b9e6
Let's make sure it doesn't bind to IPv4 sockets or use IPv4 addresses as upstream servers (2) If the host machine doesn't support IPv6, NGINX will fail to reload with
if NGINX binds to IPv6 socket:
Because of that , let's make sure it doesn't bind to IPv6 sockets or use IPv4 addresses as upstream servers (3)
In this case, make sure one of the services - tea or coffee - has IPv4 and the other IPv6 You can configure IP familiy for the kind cluster -- https://kind.sigs.k8s.io/docs/user/configuration/#networking See also https://kubernetes.io/docs/tasks/network/validate-dual-stack/#validate-services for controlling whether service shall be ipv4 or ipv6. |
Have updated description to demonstrate these use cases. Let me know if something doesn't look right |
Co-authored-by: Michael Pleshakov <pleshakov@users.noreply.github.com>
Co-authored-by: Kate Osborn <50597707+kate-osborn@users.noreply.github.com>
Co-authored-by: Kate Osborn <50597707+kate-osborn@users.noreply.github.com>
Co-authored-by: Kate Osborn <50597707+kate-osborn@users.noreply.github.com>
Co-authored-by: Kate Osborn <50597707+kate-osborn@users.noreply.github.com>
Co-authored-by: Kate Osborn <50597707+kate-osborn@users.noreply.github.com>
Co-authored-by: Kate Osborn <50597707+kate-osborn@users.noreply.github.com>
Co-authored-by: Kate Osborn <50597707+kate-osborn@users.noreply.github.com>
Co-authored-by: Kate Osborn <50597707+kate-osborn@users.noreply.github.com>
Co-authored-by: Kate Osborn <50597707+kate-osborn@users.noreply.github.com>
Proposed changes
Problem: User wants to NGINX Gateway Fabric to support IPv6 and IPv4
Solution: Add a new field
ipFamily
to NginxProxy API to specify the IP family to use with server and update listen directives in thenginx.conf
.Testing:
cafe-examples
:values.yaml file
NGINX Config
Response from Coffee and Tea services
values.yaml file
NGINX Config
Response from Coffee and Tea services
values.yaml file (by default it is set to
ipFamily: dual
)NGF Pod has both IPs configured when installed with dual IP Family.
Coffee
Service created with IPv4Tea
Service created with IPv6 stackNGINX Config
Responses from Tea and Coffee Applications
ipFamily: IPv4
, following error shows:Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.
Closes #732
Checklist
Before creating a PR, run through this checklist and mark each as complete.
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.