@@ -4,16 +4,13 @@ This document provides an overview of Gateway API.
44
55## Roles and personas
66
7- There are 3 primary roles in Gateway API:
7+ There are 3 primary roles in Gateway API, as described in [ roles and personas ] :
88
9- - Infrastructure Provider
10- - Cluster Operator
11- - Application Developer
9+ - ** Ian ** (he/him): Infrastructure Provider
10+ - ** Charlie ** (they/them): Cluster Operator
11+ - ** Ana ** (she/her): Application Developer
1212
13- There could be a fourth role of Application Admin in some use cases.
14-
15- Please refer to the [ roles and personas] ( /concepts/security-model#roles-and-personas )
16- section in the Security model for details.
13+ [ roles and personas ] :/concepts/roles-and-personas
1714
1815## Resource model
1916
@@ -152,7 +149,7 @@ to configure that with existing Gateway API resources, but implementations may
152149provide custom configuration for this until there is a standardized approach
153150defined by Gateway API.
154151
155- ### Attaching Routes to Gateways
152+ ## Attaching Routes to Gateways
156153
157154!!! note
158155 This section has changed significantly between v1alpha1 and v1alpha2. This
@@ -179,20 +176,22 @@ different relationships that Gateways and Routes can have:
179176
180177### Example
181178
182- A Kubernetes cluster admin has deployed a Gateway ` shared-gw ` in the ` Infra `
183- Namespace to be used by different application teams for exposing their
184- applications outside the cluster. Teams A and B (in Namespaces ` A ` and ` B `
185- respectively) attach their Routes to this Gateway. They are unaware of each
186- other and as long as their Route rules do not conflict with each other they
187- can continue operating in isolation. Team C has special networking needs
188- (perhaps performance, security, or criticality) and they need a dedicated
189- Gateway to proxy their application to the outside world. Team C deploys their
190- own Gateway ` dedicated-gw ` in the ` C ` Namespace that can only be used by apps
191- in the ` C ` Namespace.
179+ [ Charlie ] has deployed a Gateway ` shared-gw ` in the ` infra ` Namespace to be
180+ used by different application teams for exposing their applications outside
181+ the cluster. Teams A and B (in Namespaces ` A ` and ` B ` respectively) attach
182+ their Routes to this Gateway. They are unaware of each other and as long as
183+ their Route rules do not conflict with each other they can continue operating
184+ in isolation. Team C has special networking needs (perhaps performance,
185+ security, or criticality) and they need a dedicated Gateway to proxy their
186+ application to the outside world. Team C deploys their own Gateway
187+ ` dedicated-gw ` in the ` C ` Namespace that can only be used by apps in the ` C `
188+ Namespace.
192189
193190<!-- source: https://docs.google.com/presentation/d/1neBkFDTZ__vRoDXIWvAcxk2Pb7-evdBT6ykw_frf9QQ/edit?usp=sharing -->
194191![ route binding] ( /images/gateway-route-binding.png )
195192
193+ [ Charlie ] :/concepts/roles-and-personas#charlie
194+
196195### How it Works
197196
198197The following is required for a Route to be attached to a Gateway:
@@ -279,29 +278,97 @@ relationships between the different resources:
279278<!-- source: https://docs.google.com/document/d/1BxYbDovMwnEqe8lj8JwHo8YxHAt3oC7ezhlFsG_tyag/edit#heading=h.8du598fded3c -->
280279![ schema] ( /images/schema-uml.svg )
281280
282- ## Request flow
281+ ### Request flow
283282
284- A typical client/gateway API request flow for a gateway implemented using a
283+ A typical [ north/south ] API request flow for a gateway implemented using a
285284reverse proxy is:
286285
287- 1 . A client makes a request to < http://foo.example.com > .
288- 2 . DNS resolves the name to a ` Gateway ` address.
289- 3 . The reverse proxy receives the request on a ` Listener ` and uses the [ Host
290- header] ( https://tools.ietf.org/html/rfc7230#section-5.4 ) to match an
291- ` HTTPRoute ` .
292- 4 . Optionally, the reverse proxy can perform request header and/or path
293- matching based on ` match ` rules of the ` HTTPRoute ` .
294- 5 . Optionally, the reverse proxy can modify the request, i.e. add/remove
295- headers, based on ` filter ` rules of the ` HTTPRoute ` .
296- 6 . Lastly, the reverse proxy forwards the request to one or more objects, i.e.
297- ` Service ` , in the cluster based on ` backendRefs ` rules of the ` HTTPRoute ` .
286+ 1 . A client makes a request to < http://foo.example.com > .
287+ 2 . DNS resolves the name to a ` Gateway ` address.
288+ 3 . The reverse proxy receives the request on a ` Listener ` and uses the [ Host
289+ header] ( https://tools.ietf.org/html/rfc7230#section-5.4 ) to match an
290+ ` HTTPRoute ` .
291+ 4 . Optionally, the reverse proxy can perform request header and/or path
292+ matching based on ` match ` rules of the ` HTTPRoute ` .
293+ 5 . Optionally, the reverse proxy can modify the request, i.e. add/remove
294+ headers, based on ` filter ` rules of the ` HTTPRoute ` .
295+ 6 . Lastly, the reverse proxy forwards the request to one or more objects, i.e.
296+ ` Service ` , in the cluster based on ` backendRefs ` rules of the ` HTTPRoute ` .
297+
298+ [ north/south ] :/concepts/glossary#north-south-traffic
298299
299- ## TLS Configuration
300+ ### TLS Configuration
300301
301302TLS is configured on Gateway listeners, and may be referred to across namespaces.
302303
303304Please refer to the [ TLS details] ( /guides/tls ) guide for a deep dive on TLS.
304305
306+ ## Attaching Routes to Services
307+
308+ When using the Gateway API to configure a [ service mesh] , the Route will
309+ attach directly to a Service, representing configuration meant to be applied
310+ to any traffic directed to the Service. How and which Routes attach to a given
311+ Service is controlled by the Routes themselves (working with Kubernetes RBAC).
312+
313+ The relationship between the Route's Namespace and the Service's Namespace is
314+ important:
315+
316+ - Same Namespace <a name =" producer-routes " ></a >
317+
318+ A Route in the same Namespace as its Service is called a [ producer route]
319+ since it is typically created by the creator of the workload in order to
320+ define acceptable usage of the workload (for example, [ Ana] would deploy
321+ both the workload and the Route). All requests from any client of the
322+ workload, from any Namespace, will be affected by this Route.
323+
324+ - Different Namespaces <a name =" consumer-routes " ></a >
325+
326+ A Route in a different Namespace than its Service is called a [ consumer
327+ route] . Typically, this is a Route meant to refine how a consumer of a
328+ given workload makes request of that workload (for example, configuring
329+ custom timeouts for that consumer's use of the workload). This Route will
330+ only affect requests from workloads in the same Namespace as the Route.
331+
332+ There is ongoing [ GAMMA] work around the relationship between producer
333+ routes and consumer routes. Note also that it is not currently possible to
334+ define multiple consumer routes for the same Service in the same
335+ Namespace.
336+
337+ [ Ana ] :/concepts/roles-and-personas#ana
338+ [ producer route ] :/concepts/glossary#provider-route
339+ [ consumer route ] :/concepts/glossary#consumer-route
340+ [ GAMMA ] :/contributing/gamma
341+ [ service mesh ] :/concepts/glossary#service-mesh
342+
343+ ### How it Works
344+
345+ To attach a Route to a Service, the Route needs an entry in its ` parentRefs `
346+ field referencing the Service. If the Route and the Service are in the same
347+ Namespace, the Route is a [ producer route] ( #producer-routes ) ; otherwise, it is
348+ a [ consumer route] ( #consumer-routes ) . It is not currently possible to define
349+ multiple consumer routes for the same Service in the same Namespace.
350+
351+ When one or more Routes are attached to a Service, requests that do not match
352+ at least one of the Routes will be rejected.
353+
354+ ### Request flow
355+
356+ A typical [ east/west] API request flow is:
357+
358+ 1 . A client workload makes a request to < http://foo.ns.service.cluster.local > .
359+ 2 . The data plane locates the Service matching ` foo ` in Namespace ` ns ` .
360+ 3 . The data plane locates Routes associated with the ` foo ` Service.
361+ 4 . If the request does not match any Route, it is rejected.
362+ 5 . The data plane uses the ` backendRefs ` of the highest-priority matching
363+ Route to select a destination workload.
364+ 6 . The data plane routes the request on to the destination workload (most
365+ likely using [ endpoint routing] , but it is allowed to use [ Service
366+ routing] ).
367+
368+ [ east/west ] :/concepts/glossary#east-west-traffic
369+ [ endpoint routing ] :/concepts/glossary#endpoint-routing
370+ [ Service routing ] :/concepts/glossary#service-routing
371+
305372## Extension points
306373
307374A number of extension points are provided in the API to provide flexibility in
0 commit comments