Skip to content

Commit 70f4fe4

Browse files
committed
Initial GAMMA docs take
Signed-off-by: [email protected]
1 parent bfc5be3 commit 70f4fe4

File tree

10 files changed

+648
-131
lines changed

10 files changed

+648
-131
lines changed

mkdocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ nav:
5353
- Concepts:
5454
API Overview: concepts/api-overview.md
5555
Conformance: concepts/conformance.md
56-
Security Model: concepts/security-model.md
5756
Implementation Guidelines: concepts/guidelines.md
57+
Roles and Personas: concepts/roles-and-personas.md
58+
Service Facets: concepts/service-facets.md
59+
Security Model: concepts/security-model.md
60+
Use Cases: concepts/use-cases.md
5861
Versioning: concepts/versioning.md
5962
- Implementations: implementations.md
6063
- FAQ: faq.md
@@ -112,6 +115,7 @@ nav:
112115
- geps/gep-724.md
113116
- geps/gep-718.md
114117
- geps/gep-709.md
118+
- Glossary: concepts/glossary.md
115119
- Contributing:
116120
- How to Get Involved: contributing/index.md
117121
- Developer Guide: contributing/devguide.md

site-src/concepts/api-overview.md

Lines changed: 100 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -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
152149
provide custom configuration for this until there is a standardized approach
153150
defined 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

198197
The 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
285284
reverse 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

301302
TLS is configured on Gateway listeners, and may be referred to across namespaces.
302303

303304
Please 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

307374
A number of extension points are provided in the API to provide flexibility in

site-src/concepts/glossary.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Gateway API Glossary
2+
3+
### Consumer Route
4+
5+
A Route bound to a workload's Service by a consumer of a given workload,
6+
refining the specific consumer's use of the workload.
7+
8+
### Gateway Controller
9+
10+
A _gateway controller_ is software that runs on a cluster to manage the
11+
infrastructure associated with routing traffic from outside the cluster to
12+
inside the cluster (north/south traffic), analogous to the earlier _ingress
13+
controller_ concept.
14+
15+
### East/West traffic
16+
17+
Traffic from workload to workload within a cluster.
18+
19+
### North/South traffic
20+
21+
Traffic from outside a cluster to inside a cluster (and vice versa).
22+
23+
### Producer Route
24+
25+
A Route bound to a workload's Service by the creator of a given workload,
26+
defining what is acceptable use of the workload. Producer routes must always
27+
be in the same Namespace as their workload's Service.
28+
29+
### Service mesh
30+
31+
A _service mesh_ is software that runs on a cluster to manage infrastructure
32+
providing security, reliability, and observability for communications between
33+
workloads (east/west traffic).
34+
35+
### Service backend
36+
37+
The part of a Kubernetes Service resource that is a set of endpoints
38+
associated with Pods and their IPs. Some east/west traffic happens by having
39+
workloads direct requests to specific endpoints within a Service backend.
40+
41+
### Service frontend
42+
43+
The part of a Kubernetes Service resource that allocates a DNS record and a
44+
cluster IP. East/west traffic often - but not always - works by having
45+
workloads direct requests to a Service frontend.
46+
47+
### Service routing
48+
49+
_Service routing_ is sending requests to a specific Service to the service
50+
frontend, allowing the underlying network infrastructure (usually `kube-proxy`
51+
or a [service mesh](#service-mesh)) to choose the specific endpoint to which
52+
the request is routed.
53+
54+
### Endpoint routing
55+
56+
_Endpoint routing_ is sending requests to a specific Service directly to one
57+
of the endpoints of the Service backend, bypassing routing decisions which
58+
might be made by the underlying network infrastructure. This is commonly
59+
necessary for advanced routing cases like sticky sessions, where the gateway
60+
will need to guarantee that every request for a specific session goes to the
61+
same endpoint.
62+
63+
### Workload
64+
65+
An instance of computation that provides a function within a cluster. A
66+
workload usually comprises a Service, some Pods, and often a Deployment.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Roles and personas
2+
3+
## Introduction
4+
5+
In the original design of Kubernetes, Ingress and Service resources were based
6+
on a usage model in which the developers who create Services and Ingresses
7+
controlled all aspects of defining and exposing their applications to their
8+
users.
9+
10+
In practice, though, clusters and their infrastructure tend to be shared,
11+
which the original Ingress model doesn't capture very well. A critical factor
12+
is that when infrastructure is shared, not everyone using the infrastructure
13+
has the same concerns, and to be successful, an infrastructure project needs
14+
to address the needs of all the users.
15+
16+
This raises a fundamental challenge: how do you provide the flexibility needed
17+
by the users of the infrastructure, while also maintaining control by the
18+
owners of the infrastructure?
19+
20+
The Gateway API defines several distinct roles, each with an associated
21+
_persona_, as a tool for surfacing and discussing the differing needs of
22+
different users in order to balance usability, flexibility, and control.
23+
Design work within the Gateway API is deliberately cast in terms of these
24+
personas.
25+
26+
Note that, depending on the environment, a single human may end up taking on
27+
multiple roles, as discussed below.
28+
29+
## Roles and Personas
30+
31+
The Gateway API defines three roles and personas:
32+
33+
* <a name="ian">**Ian**</a> (he/him) is an _infrastructure provider_,
34+
responsible for the care and feeding of a set of infrastructure that permits
35+
multiple isolated clusters to serve multiple tenants. He is not beholden to
36+
any single tenant; rather, he worries about all of them collectively. Ian
37+
will often work for a cloud provider (AWS, Azure, GCP, ...) or for a PaaS
38+
provider.
39+
40+
* <a name="charlie">**Charlie**</a> (they/them) is a _cluster operator_,
41+
responsible for managing clusters to ensure that they meet the needs of
42+
their several users. Charlie will typically be concerned with policies,
43+
network access, application permissions, etc. Again, they are beholden to no
44+
single user of any cluster; rather, they need to make sure that the clusters
45+
serve all users as needed.
46+
47+
* <a name="ana">**Ana**</a> (she/her) is an _application developer_,
48+
responsible for creating and managing an application running in a cluster.
49+
From the Gateway API's point of view, Ana will need to manage configuration
50+
(e.g. timeouts, request matching/filter) and Service composition (e.g. path
51+
routing to backends). She is in a unique position among the Gateway API
52+
personas, since her focus is on the business needs her application is meant
53+
to serve, _not_ Kubernetes or the Gateway API. In fact, Ana is likely to
54+
view the Gateway API and Kubernetes as pure friction getting in her way to
55+
get things done.
56+
57+
Depending on the environment, multiple roles can map to the same user:
58+
59+
- Giving a single user all the above roles replicates the self-service model,
60+
and may actually happen in a small startup running Kubernetes on bare metal.
61+
62+
- A more typical small startup would use clusters from a cloud provider. In
63+
this situation, Ana and Charlie may be embodied in the same person, with Ian
64+
being an employee (or automated process!) within the cloud provider.
65+
66+
- In a much larger organization, we would expect each persona above to be
67+
embodied by a distinct person (most likely working in different groups,
68+
perhaps with little direct contact).
69+
70+
## RBAC
71+
72+
RBAC (role-based access control) is the standard used for Kubernetes
73+
authorization. This allows users to configure who can perform actions on
74+
resources in specific scopes. We anticipate that each persona will map
75+
approximately to a `Role` in the Kubernetes Role-Based Authentication (RBAC)
76+
system and will define resource model responsibility and separation.
77+
78+
RBAC is discussed further in the [Security Model] description.
79+
80+
[Security Model]: /concepts/security-model#rbac

site-src/concepts/security-model.md

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,16 @@ Gateway API has 3 primary API resources:
1515

1616
## Roles and personas
1717

18-
In the original design of Kubernetes, Ingress and Service resources were based
19-
on a self-service model of usage; developers who create Services and Ingresses
20-
control all aspects of defining and exposing their applications to their users.
21-
22-
We have found that the self-service model does not fully capture some of the
23-
more complex deployment and team structures that our users are seeing. Gateway
24-
API is designed to target the following personas:
25-
26-
* **Infrastructure provider**: The infrastructure provider (infra) is
27-
responsible for the overall environment that the cluster(s) are operating in.
28-
Examples include: the cloud provider (AWS, Azure, GCP, ...) or the PaaS
29-
provider in a company.
30-
* **Cluster operator**: The cluster operator (ops) is responsible for
31-
administration of entire clusters. They manage policies, network access,
32-
application permissions.
33-
* **Application developer**: The application developer (dev) is responsible for
34-
defining their application configuration (e.g. timeouts, request
35-
matching/filter) and Service composition (e.g. path routing to backends).
36-
37-
Although these roles can cover a wide variety of use cases, some organizations
38-
may be structured slightly differently. Many organizations may also have a
39-
fourth role that sits between "cluster operator" and "application developer":
40-
41-
* **Application admin**: The application admin has administrative access to some
42-
namespaces within a cluster, but not the cluster as a whole.
43-
44-
We expect that each persona will map approximately to a `Role` in the Kubernetes
45-
Role-Based Authentication (RBAC) system and will define resource model
46-
responsibility and separation.
47-
48-
Depending on the environment, multiple roles can map to the same user. For
49-
example, giving the user all the above roles replicates the self-service model.
18+
There are 3 primary roles in Gateway API, as described in [roles and personas]:
19+
20+
- **Ian** (he/him): Infrastructure Provider
21+
- **Charlie** (they/them): Cluster Operator
22+
- **Ana** (she/her): Application Developer
23+
24+
[roles and personas]:/concepts/roles-and-personas
5025

5126
### RBAC
27+
5228
RBAC (role-based access control) is the standard used for Kubernetes
5329
authorization. This allows users to configure who can perform actions on
5430
resources in specific scopes. RBAC can be used to enable each of the roles

0 commit comments

Comments
 (0)