Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.

Commit 894612a

Browse files
committed
Add TCP/UDP port matching to specs/v1alpha4
Signed-off-by: stefanprodan <[email protected]>
1 parent d30871f commit 894612a

File tree

1 file changed

+44
-4
lines changed

1 file changed

+44
-4
lines changed

apis/traffic-specs/traffic-specs-WD.md

+44-4
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,54 @@ to any path and all HTTP methods.
137137

138138
### TCPRoute
139139

140-
This resource is used to describe L4 TCP traffic. It is a simple route which configures
141-
an application to receive raw non protocol specific traffic.
140+
This resource is used to describe L4 TCP traffic for a list of ports.
142141

143142
```yaml
144143
kind: TCPRoute
145144
metadata:
146-
name: tcp-route
147-
spec: {}
145+
name: the-routes
146+
spec:
147+
matches:
148+
ports:
149+
- 3306
150+
- 6446
151+
```
152+
153+
When matching ports are not specified, the TCP route will match all the ports of a Kubernetes service:
154+
155+
```yaml
156+
kind: TCPRoute
157+
metadata:
158+
name: the-routes
159+
spec:
160+
matches:
161+
ports: []
162+
```
163+
164+
### UDPRoute
165+
166+
This resource is used to describe L4 UDP traffic for a list of ports.
167+
168+
```yaml
169+
kind: UDPRoute
170+
metadata:
171+
name: the-routes
172+
spec:
173+
matches:
174+
ports:
175+
- 989
176+
- 990
177+
```
178+
179+
When matching ports are not specified, the UDP route will match all the ports of a Kubernetes service:
180+
181+
```yaml
182+
kind: UDPRoute
183+
metadata:
184+
name: the-routes
185+
spec:
186+
matches:
187+
ports: []
148188
```
149189

150190
## Automatic Generation

0 commit comments

Comments
 (0)