-
Notifications
You must be signed in to change notification settings - Fork 369
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
feat: add ipv4/ipv6 dual stack support #4375
Conversation
020d3e9
to
14062cf
Compare
hey @juwon8891 we probably also need to add some logic in gateway/internal/gatewayapi/route.go Line 1328 in 4b8c2f5
|
gwNN := types.NamespacedName{Name: "same-namespace", Namespace: ns} | ||
|
||
t.Run("HTTPRoute to IPv6 only service", func(t *testing.T) { | ||
routeNN := types.NamespacedName{Name: "ipv6-only-route", Namespace: ns} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also check for the IP type in the X-Forwarded-For
response header ?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4375 +/- ##
==========================================
+ Coverage 65.78% 65.80% +0.02%
==========================================
Files 210 210
Lines 31516 31557 +41
==========================================
+ Hits 20732 20766 +34
- Misses 9588 9594 +6
- Partials 1196 1197 +1 ☔ View full report in Codecov by Sentry. |
hey @juwon8891 lint is failing
|
263b8bf
to
b97d58a
Compare
hey @juwon8891 looks like some gateway api tests got wiped out, can you add them back ? |
@juwon8891 Do you have time to address the comments this week? We want to ensure dual stack support is ready to be included in the coming v1.2. |
Yes, I'm working on it. I'll answer as soon as possible |
Namespace: ns, | ||
} | ||
|
||
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, gwAddr, expectedResponse) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gateway/test/e2e/tests/utils.go
Line 535 in 4b8c2f5
func QueryLogCountFromLoki(t *testing.T, c client.Client, keyValues map[string]string, match string) (int, error) { |
can be used to verify pod ip/port
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still working on this test part. I'll post it separately as another PR.
hey @juwon8891, added some minor comments, but overall LGTM ! |
@juwon8891 please run |
internal/ir/xds.go
Outdated
@@ -224,8 +224,20 @@ type CoreListenerDetails struct { | |||
ExtensionRefs []*UnstructuredRef `json:"extensionRefs,omitempty" yaml:"extensionRefs,omitempty"` | |||
// Metadata is used to enrich envoy resource metadata with user and provider-specific information | |||
Metadata *ResourceMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` | |||
// IPFamily specifies the IP address family for the gateway. | |||
// It can be IPv4, IPv6, or Dual. | |||
IPFamily IPFamily `json:"ipFamily,omitempty" yaml:"ipFamily,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make it a pointer? so that this PR won't be that huge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll post it separately as another PR.
@juwon8891 DCO is failing, can you sign your commits |
Signed-off-by: Juwon Hwang (Kevin) <[email protected]>
Signed-off-by: Juwon Hwang (Kevin) <[email protected]>
Signed-off-by: Juwon Hwang (Kevin) <[email protected]>
Signed-off-by: Juwon Hwang (Kevin) <[email protected]>
Signed-off-by: Juwon Hwang (Kevin) <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/retest |
What type of PR is this?
feat: add ipv4/ipv6 dual stack support
What this PR does / why we need it:
This PR adds IPv4/IPv6 dual stack support to Envoy Gateway. It implements test cases for routing to IPv6-only, dual-stack, and IPv4-only services using HTTPRoute resources. This enhancement is crucial for supporting modern network environments and ensuring compatibility with both IPv4 and IPv6 infrastructures.
Key changes include:
backend_dualstack.go
for testing IPv6 and dual-stack backendshttproute_dualstack.go
for testing HTTPRoute support with various IP versionsgetDnsLookupFamily
function to control DNS lookup behaviorWhich issue(s) this PR fixes:
Fixes #184
Additional Notes:
IP_FAMILY=ipv4
)IP_FAMILY=ipv6
orIP_FAMILY=dual
)