Skip to content

Commit d6496f1

Browse files
committed
Provide more details on route parentRef in documentation for routes <> Gateways attachment.
1 parent bae59a6 commit d6496f1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

site-src/concepts/api-overview.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,28 @@ The following is required for a Route to be attached to a Gateway:
171171
1. The Route needs an entry in its `parentRefs` field referencing the Gateway.
172172
2. At least one listener on the Gateway needs to allow this attachment.
173173

174+
#### Referencing Gateways
175+
176+
A Route can reference a Gateway by specifying the namespace(optional if the
177+
Route and the Gateway are in the same namespace) and name of the Gateway in
178+
a `parentRef`. A Route can further select a subset of listeners under the
179+
Gateway using the following fields in `parentRef`:
180+
181+
1. **sectionName** When `sectionName` is set, the Route selects the listener
182+
with the specified name.
183+
2. **port** When `port` is set, the Route selects all listeners listening on
184+
the specified port and with protocol compatible with this kind of Route.
185+
It’s not recommended to set `port` unless the networking behaviors specified
186+
in a Route must apply to a specific port as opposed to a listener(s) whose
187+
port(s) may be changed.
188+
189+
When multiple fields in `parentRef` are set, the Route selects listeners that
190+
satisfy all conditions specified in those fields. For example, when both
191+
`sectionName` and `port` are set, the Route selects listeners with the specified
192+
name AND listening on the specified port.
193+
194+
#### Restricting Route Attachment
195+
174196
Each Gateway listener can restrict which Routes can be attached with the
175197
following mechanisms:
176198

0 commit comments

Comments
 (0)