Skip to content
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

[release/v1.2] Cherry pick IPv6 support to v1.2.3 #4819

Merged
merged 3 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ envoyProxyForGatewayClass:
- name: envoy-gateway-proxy-ready-0.0.0.0-19001
address:
socket_address:
address: 0.0.0.0
address: '0.0.0.0'
port_value: 19001
protocol: TCP
filter_chains:
Expand Down Expand Up @@ -891,8 +891,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 10080
defaultFilterChain:
filters:
Expand Down Expand Up @@ -951,8 +950,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 8080
defaultFilterChain:
filters:
Expand Down Expand Up @@ -1019,8 +1017,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 1234
filterChains:
- filters:
Expand Down Expand Up @@ -1059,8 +1056,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 8443
filterChains:
- filterChainMatch:
Expand Down Expand Up @@ -1106,8 +1102,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 1234
protocol: UDP
listenerFilters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,7 @@
],
"address": {
"socketAddress": {
"address": "::",
"ipv4Compat": true,
"address": "0.0.0.0",
"portValue": 10080
}
},
Expand Down Expand Up @@ -729,8 +728,7 @@
],
"address": {
"socketAddress": {
"address": "::",
"ipv4Compat": true,
"address": "0.0.0.0",
"portValue": 8080
}
},
Expand Down Expand Up @@ -835,8 +833,7 @@
],
"address": {
"socketAddress": {
"address": "::",
"ipv4Compat": true,
"address": "0.0.0.0",
"portValue": 1234
}
},
Expand Down Expand Up @@ -901,8 +898,7 @@
],
"address": {
"socketAddress": {
"address": "::",
"ipv4Compat": true,
"address": "0.0.0.0",
"portValue": 8443
}
},
Expand Down Expand Up @@ -980,8 +976,7 @@
],
"address": {
"socketAddress": {
"address": "::",
"ipv4Compat": true,
"address": "0.0.0.0",
"portValue": 1234,
"protocol": "UDP"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 10080
defaultFilterChain:
filters:
Expand Down Expand Up @@ -430,8 +429,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 8080
defaultFilterChain:
filters:
Expand Down Expand Up @@ -498,8 +496,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 1234
filterChains:
- filters:
Expand Down Expand Up @@ -538,8 +535,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 8443
filterChains:
- filterChainMatch:
Expand Down Expand Up @@ -585,8 +581,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 1234
protocol: UDP
listenerFilters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 10080
defaultFilterChain:
filters:
Expand Down Expand Up @@ -80,8 +79,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 8080
defaultFilterChain:
filters:
Expand Down Expand Up @@ -148,8 +146,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 1234
filterChains:
- filters:
Expand Down Expand Up @@ -188,8 +185,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 8443
filterChains:
- filterChainMatch:
Expand Down Expand Up @@ -235,8 +231,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 1234
protocol: UDP
listenerFilters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@
],
"address": {
"socketAddress": {
"address": "::",
"ipv4Compat": true,
"address": "0.0.0.0",
"portValue": 10080
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 10080
defaultFilterChain:
filters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 10080
defaultFilterChain:
filters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ xds:
path: /dev/stdout
address:
socketAddress:
address: '::'
ipv4Compat: true
address: 0.0.0.0
portValue: 10080
defaultFilterChain:
filters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
2 changes: 1 addition & 1 deletion internal/gatewayapi/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
case egv1a1.IPv6:
result = ir.IPv6
case egv1a1.DualStack:
result = ir.Dualstack
result = ir.DualStack

Check warning on line 624 in internal/gatewayapi/helpers.go

View check run for this annotation

Codecov / codecov/patch

internal/gatewayapi/helpers.go#L624

Added line #L624 was not covered by tests
default:
return nil
}
Expand Down
7 changes: 5 additions & 2 deletions internal/gatewayapi/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@
continue
}

// EG always use `::` and set ipv4_compact with true to support both IPv4 and IPv6
address := net.IPv6ListenerAddress
address := net.IPv4ListenerAddress
ipFamily := getIPFamily(gateway.envoyProxy)
if ipFamily != nil && (*ipFamily == ir.IPv6 || *ipFamily == ir.DualStack) {
address = net.IPv6ListenerAddress
}

Check warning on line 108 in internal/gatewayapi/listener.go

View check run for this annotation

Codecov / codecov/patch

internal/gatewayapi/listener.go#L107-L108

Added lines #L107 - L108 were not covered by tests

// Add the listener to the Xds IR
servicePort := &protocolPort{protocol: listener.Protocol, port: int32(listener.Port)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down Expand Up @@ -323,7 +323,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: true
Expand Down Expand Up @@ -292,7 +292,7 @@ xdsIR:
text:
- path: /dev/stdout
http:
- address: '::'
- address: 0.0.0.0
hostnames:
- '*'
isHTTP2: false
Expand Down
Loading