1
1
# API Overview
2
2
3
- This document provides an overview of Service APIs .
3
+ This document provides an overview of Gateway API .
4
4
5
5
## Roles and personas.
6
6
7
- There are 3 primary roles in Service APIs :
7
+ There are 3 primary roles in Gateway API :
8
8
9
9
- Infrastructure Provider
10
10
- Cluster Operator
11
11
- Application Developer
12
12
13
13
There could be a fourth role of Application Admin in some use cases.
14
14
15
- Please refer to the [ roles and personas] ( security-model.md#roles-and-personas )
15
+ Please refer to the [ roles and personas] ( security-model.md#roles-and-personas )
16
16
section in the Security model for details.
17
17
18
18
## Resource model
@@ -23,10 +23,10 @@ section in the Security model for details.
23
23
24
24
There are three main types of objects in our resource model:
25
25
26
- * GatewayClass* defines a set of gateways with a common configuration and
26
+ * GatewayClass* defines a set of gateways with a common configuration and
27
27
behavior.
28
28
29
- * Gateway* requests a point where traffic can be translated to Services within
29
+ * Gateway* requests a point where traffic can be translated to Services within
30
30
the cluster.
31
31
32
32
* Routes* describe how traffic coming via the Gateway maps to the Services.
@@ -56,8 +56,8 @@ A Gateway describes how traffic can be translated to Services within the
56
56
cluster. That is, it defines a request for a way to translate traffic from
57
57
somewhere that does not know about Kubernetes to somewhere that does. For
58
58
example, traffic sent to a Kubernetes Service by a cloud load balancer, an
59
- in-cluster proxy, or an external hardware load balancer. While many use cases
60
- have client traffic originating “outside” the cluster, this is not a
59
+ in-cluster proxy, or an external hardware load balancer. While many use cases
60
+ have client traffic originating “outside” the cluster, this is not a
61
61
requirement.
62
62
63
63
It defines a request for a specific load balancer config that implements the
@@ -95,7 +95,7 @@ Some backend configuration may vary depending on the Route that is targeting the
95
95
backend. In those cases, configuration fields will be placed on Routes and not
96
96
BackendPolicy. For more information on what may be configured with this resource
97
97
in the future, refer to the related [ GitHub
98
- issue] ( https://github.com/kubernetes-sigs/service-apis /issues/196 ) .
98
+ issue] ( https://github.com/kubernetes-sigs/gateway-api /issues/196 ) .
99
99
100
100
### Route binding
101
101
@@ -113,23 +113,23 @@ are exposed and on which Gateways. Consider the following example:
113
113
> and as long as their Route rules do not conflict with each other they can
114
114
> continue operating in isolation. Team C has special networking needs (perhaps
115
115
> performance, security, or criticality) and they need a dedicated Gateway to
116
- > proxy their application to the outside world. Team C deploys their own Gateway
117
- > “dedicated-gw” in the “C” Namespace that can only be used by apps in the "C"
116
+ > proxy their application to the outside world. Team C deploys their own Gateway
117
+ > “dedicated-gw” in the “C” Namespace that can only be used by apps in the "C"
118
118
> Namespace.
119
119
120
120
<!-- source: https://docs.google.com/presentation/d/1neBkFDTZ__vRoDXIWvAcxk2Pb7-evdBT6ykw_frf9QQ/edit?usp=sharing -->
121
121
![ route binding] ( images/gateway-route-binding.png )
122
122
123
123
There is a lot of flexibility in how Routes can bind to Gateways to achieve
124
- different organizational policies and scopes of responsibility. These are
124
+ different organizational policies and scopes of responsibility. These are
125
125
different relationships that Gateways and Routes can have:
126
126
127
- - ** One-to-one** - A Gateway and Route may be deployed and used by a single
128
- owner and have a one-to-one relationship. Team C is an example of this.
127
+ - ** One-to-one** - A Gateway and Route may be deployed and used by a single
128
+ owner and have a one-to-one relationship. Team C is an example of this.
129
129
- ** One-to-many** - A Gateway can have many Routes bound to it that are owned by
130
- different teams from across different Namespaces. Teams A and B are an example
130
+ different teams from across different Namespaces. Teams A and B are an example
131
131
of this.
132
- - ** Many-to-one** - Routes can also be bound to more than one Gateway, allowing
132
+ - ** Many-to-one** - Routes can also be bound to more than one Gateway, allowing
133
133
a single Route to control application exposure simultaneously across different
134
134
IPs, load balancers, or networks.
135
135
@@ -148,19 +148,19 @@ namespace, and labels of Route resources. Routes are actually bound to specific
148
148
listeners within the Gateway so each listener has a ` listener.routes ` field
149
149
which selects Routes by one or more of the following criterea:
150
150
151
- - ** Label** - A Gateway can select Routes via labels that exist on the
151
+ - ** Label** - A Gateway can select Routes via labels that exist on the
152
152
resource (similar to how Services select Pods via Pod labels).
153
- - ** Kind** - A Gateway listener can only select a single type of Route
153
+ - ** Kind** - A Gateway listener can only select a single type of Route
154
154
resource. This could be an HTTPRoute, TCPRoute, or a custom Route type.
155
155
- ** Namespace** - A Gateway can also control from which Namespaces Routes can be
156
156
selected via the ` namespaces.from ` field. It supports three possible values:
157
- - ` SameNamespace ` is the default option. Only Routes in the same namespace
158
- as this Gateway will be selected.
157
+ - ` SameNamespace ` is the default option. Only Routes in the same namespace
158
+ as this Gateway will be selected.
159
159
- ` All ` will select Routes from all Namespaces.
160
- - ` Selector ` means that Routes from a subset of Namespaces selected by a
161
- Namespace label selector will be selected by this Gateway. When ` Selector `
162
- is used then the ` listeners.routes.namespaces.selector ` field can be used
163
- to specify label selectors. This field is not supported with ` All ` or
160
+ - ` Selector ` means that Routes from a subset of Namespaces selected by a
161
+ Namespace label selector will be selected by this Gateway. When ` Selector `
162
+ is used then the ` listeners.routes.namespaces.selector ` field can be used
163
+ to specify label selectors. This field is not supported with ` All ` or
164
164
` SameNamespace ` .
165
165
166
166
The below Gateway will select all HTTPRoute resources with the `expose:
@@ -170,12 +170,12 @@ prod-web-gw` across all Namespaces in the cluster.
170
170
kind: Gateway
171
171
...
172
172
spec:
173
- listeners:
173
+ listeners:
174
174
- routes:
175
175
kind: HTTPRoute
176
176
selector:
177
177
matchLabels:
178
- expose: prod-web-gw
178
+ expose: prod-web-gw
179
179
namespaces:
180
180
from: All
181
181
```
@@ -185,18 +185,18 @@ spec:
185
185
Routes can determine how they are exposed through Gateways. The ` gateways.allow `
186
186
field supports three values:
187
187
188
- - ` All ` is the default value if none is specified. This leaves all binding
189
- to the Route label and Namespace selectors on the Gateway.
190
- - ` SameNamespace ` only allows this Route to bind with Gateways from the
188
+ - ` All ` is the default value if none is specified. This leaves all binding
189
+ to the Route label and Namespace selectors on the Gateway.
190
+ - ` SameNamespace ` only allows this Route to bind with Gateways from the
191
191
same Namespace.
192
- - ` FromList ` allows an explicit list of Gateways to be specifiied that a
193
- Route will bind with. ` gateways.gatewayRefs ` is only supported with this option.
192
+ - ` FromList ` allows an explicit list of Gateways to be specifiied that a
193
+ Route will bind with. ` gateways.gatewayRefs ` is only supported with this option.
194
194
195
195
The following ` my-route ` Route selects only the ` foo-gateway ` in the
196
196
` foo-namespace ` and will not be able to bind with any other Gateways. Note that
197
197
` foo-gateway ` is in a different Namespace. If the ` foo-gateway ` allows
198
198
cross-Namespace binding and also selects this Route then ` my-route ` will bind to
199
- it.
199
+ it.
200
200
201
201
``` yaml
202
202
kind : HTTPRoute
@@ -246,7 +246,7 @@ reverse proxy is:
246
246
5. Optionally, the reverse proxy can perform request header and/or path
247
247
matching based on `match` rules of the `HTTPRoute`.
248
248
6. Optionally, the reverse proxy can modify the request, i.e. add/remove
249
- headers, based on `filter` rules of the `HTTPRoute`.
249
+ headers, based on `filter` rules of the `HTTPRoute`.
250
250
7. Lastly, the reverse proxy forwards the request to one or more objects, i.e.
251
251
` Service` , in the cluster based on `forwardTo` rules of the `HTTPRoute`.
252
252
@@ -272,7 +272,7 @@ Here is a summary of extension points in the API:
272
272
- **XForwardTo.BackendRef**: This extension point should be used for forwarding
273
273
traffic to network endpoints other than core Kubernetes Service resource.
274
274
Examples include an S3 bucket, Lambda function, a file-server, etc.
275
- - **HTTPRouteFilter**: This API type in HTTPRoute provides a way to hook into
275
+ - **HTTPRouteFilter**: This API type in HTTPRoute provides a way to hook into
276
276
the request/response lifecycle of an HTTP request.
277
277
- **Custom Routes**: If none of the above extensions points suffice for a use
278
278
case, Implementers can chose to create custom Route resources for protocols
0 commit comments