From 5dbaa40df347beacd3cab79a2407b0465de859ce Mon Sep 17 00:00:00 2001 From: cxhiano Date: Wed, 30 Mar 2022 17:16:14 -0700 Subject: [PATCH] Provide more details on route parentRef in documentation for routes <> Gateways attachment. --- site-src/concepts/api-overview.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/site-src/concepts/api-overview.md b/site-src/concepts/api-overview.md index 96d34de3ae..01087a38f6 100644 --- a/site-src/concepts/api-overview.md +++ b/site-src/concepts/api-overview.md @@ -171,6 +171,31 @@ The following is required for a Route to be attached to a Gateway: 1. The Route needs an entry in its `parentRefs` field referencing the Gateway. 2. At least one listener on the Gateway needs to allow this attachment. +#### Referencing Gateways + +!!! info "Experimental Channel" + + The `Port` field described below is currently only included in the + "Experimental" channel of Gateway API. For more information on release + channels, refer to the [related documentation](https://gateway-api.sigs.k8s.io/concepts/versioning/#adding-experimental-fields). + +A Route can reference a Gateway by specifying the namespace (optional if the +Route and the Gateway are in the same namespace) and name of the Gateway in +a `parentRef`. A Route can further select a subset of listeners under the +Gateway using the following fields in `parentRef`: + +1. **SectionName** When `sectionName` is set, the Route selects the listener + with the specified name. +2. **Port** When `port` is set, the Route selects all listeners listening on + the specified port and with protocol compatible with this kind of Route. + +When multiple fields in `parentRef` are set, the Route selects listeners that +satisfy all conditions specified in those fields. For example, when both +`sectionName` and `port` are set, the Route selects listeners with the specified +name AND listening on the specified port. + +#### Restricting Route Attachment + Each Gateway listener can restrict which Routes can be attached with the following mechanisms: