Skip to content

Commit f563f48

Browse files
committed
fix ListenerSetProtocolConflict
Signed-off-by: zirain <zirain2009@gmail.com>
1 parent 893ea50 commit f563f48

16 files changed

Lines changed: 82 additions & 25 deletions

internal/cmd/egctl/testdata/translate/in/default-resources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
port: 1234
2020
- name: udp
2121
protocol: UDP
22-
port: 1234
22+
port: 2345
2323
- name: tls-passthrough
2424
protocol: TLS
2525
port: 8443

internal/cmd/egctl/testdata/translate/in/from-gateway-api-to-xds.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
port: 1234
1919
- name: udp
2020
protocol: UDP
21-
port: 1234
21+
port: 2345
2222
- name: tls-passthrough
2323
protocol: TLS
2424
port: 8443

internal/cmd/egctl/testdata/translate/in/valid-envoyproxy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
port: 1234
3737
- name: udp
3838
protocol: UDP
39-
port: 1234
39+
port: 2345
4040
- name: tls-passthrough
4141
protocol: TLS
4242
port: 8443

internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ gateways:
211211
namespaces:
212212
from: Same
213213
name: udp
214-
port: 1234
214+
port: 2345
215215
protocol: UDP
216216
- allowedRoutes:
217217
namespaces:
@@ -1502,7 +1502,7 @@ xds:
15021502
address:
15031503
socketAddress:
15041504
address: 0.0.0.0
1505-
portValue: 1234
1505+
portValue: 2345
15061506
protocol: UDP
15071507
listenerFilters:
15081508
- name: envoy.filters.udp_listener.udp_proxy

internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@
14461446
"address": {
14471447
"socketAddress": {
14481448
"address": "0.0.0.0",
1449-
"portValue": 1234,
1449+
"portValue": 2345,
14501450
"protocol": "UDP"
14511451
}
14521452
},

internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ xds:
923923
address:
924924
socketAddress:
925925
address: 0.0.0.0
926-
portValue: 1234
926+
portValue: 2345
927927
protocol: UDP
928928
listenerFilters:
929929
- name: envoy.filters.udp_listener.udp_proxy

internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.listener.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ xds:
473473
address:
474474
socketAddress:
475475
address: 0.0.0.0
476-
portValue: 1234
476+
portValue: 2345
477477
protocol: UDP
478478
listenerFilters:
479479
- name: envoy.filters.udp_listener.udp_proxy

internal/cmd/egctl/testdata/translate/out/valid-envoyproxy.all.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ gateways:
5555
namespaces:
5656
from: Same
5757
name: udp
58-
port: 1234
58+
port: 2345
5959
protocol: UDP
6060
- allowedRoutes:
6161
namespaces:

internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.out.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ gateways:
5454
reason: ProtocolConflict
5555
status: "True"
5656
type: Conflicted
57+
- lastTransitionTime: null
58+
message: All listeners for a given port must use a unique hostname
59+
reason: ProtocolConflict
60+
status: "False"
61+
type: Accepted
5762
- lastTransitionTime: null
5863
message: Listener must have TLS set when protocol is TLS.
5964
reason: Invalid

internal/gatewayapi/testdata/gateway-with-two-listeners-with-http-and-tlsroute-same-hostname-and-port.out.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ gateways:
6262
type: Conflicted
6363
- lastTransitionTime: null
6464
message: All listeners for a given port must use a unique hostname
65-
reason: HostnameConflict
65+
reason: ProtocolConflict
6666
status: "False"
6767
type: Accepted
6868
- lastTransitionTime: null
6969
message: All listeners for a given port must use a unique hostname
70-
reason: HostnameConflict
70+
reason: ProtocolConflict
7171
status: "False"
7272
type: Programmed
7373
- lastTransitionTime: null

0 commit comments

Comments
 (0)