You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Move GEP-995 to Experimental
Signed-off-by: Guilherme Cassolato <[email protected]>
* docs: Fix the description of the format for the name field of route rules
Signed-off-by: Guilherme Cassolato <[email protected]>
* docs: Route Rule name field
Signed-off-by: Guilherme Cassolato <[email protected]>
---------
Signed-off-by: Guilherme Cassolato <[email protected]>
Copy file name to clipboardexpand all lines: geps/gep-995/index.md
+4-13
Original file line number
Diff line number
Diff line change
@@ -41,19 +41,10 @@ This GEP proposes to add a new optional `name` field to the [GRPCRouteRule](http
41
41
42
42
### Format
43
43
44
-
The name of a route rule, if present, MUST be a string that begins with a single lowercase letter (`a-z`) and is followed by any number of characters, from 0 to a maximum of 252, that is either a letter, a digit, or any of the following symbols `-`, `_`. The value of the `name` field MUST be treated as case-sensitive.
45
-
46
-
A simple regular expression that can be used to test a string conforms with the format of the `name` field for route rules, compatible with Golang's [`regexp`](https://pkg.go.dev/regexp) package, is: `^[a-z][-_a-zA-Z0-9]{0,252}$`. (Provided as example)
47
-
48
-
A set of [kubebuilder](https://book.kubebuilder.io/reference/markers/crd-validation) annotations for the validation of patterns compatible with the `name` field, to be used in CRDs, is: (Provided as example)
This format for the `name` field of route rules differs from the pattern adopted for the [`SectionName`](https://github.com/kubernetes-sigs/gateway-api/blob/f544a46ef92b7f234ee3e7bf50da35b05f862c35/apis/v1/shared_types.go#L624C10-L624C10) type, which was thought for specifying mainly DNS subdomain names ([RFC 1123](https://www.rfc-editor.org/rfc/rfc1123)), due to its use in the gateway listeners originally.
44
+
If specified, the name of a route rule MUST comply with the [`SectionName`](https://github.com/kubernetes-sigs/gateway-api/blob/v1.0.0/apis/v1/shared_types.go#L607-L624) type:
45
+
- starts and ends with a lower case Latin letter (`a-z`) or digit (`0-9`);
46
+
- accepts any lower case Latin letter (`a-z`), digits (`0-9`), and the following special characters: `-`, `.`;
47
+
- contains a minimum of 1 and maximum of 253 characters.
Copy file name to clipboardexpand all lines: site-src/api-types/grpcroute.md
+14-2
Original file line number
Diff line number
Diff line change
@@ -65,8 +65,8 @@ The specification of a GRPCRoute consists of:
65
65
matching the Host header of gRPC requests.
66
66
-[Rules][grpcrouterule]- Define a list of rules to perform actions against
67
67
matching gRPC requests. Each rule consists of [matches][matches],
68
-
[filters][filters] (optional), and [backendRefs][backendRef] (optional)
69
-
fields.
68
+
[filters][filters] (optional), [backendRefs][backendRef] (optional), and
69
+
[name][name] (optional) fields.
70
70
71
71
<!--- Editable SVG available at site-src/images/grpcroute-basic-example.svg -->
72
72
The following illustrates a GRPCRoute that sends all traffic to one Service:
@@ -217,6 +217,18 @@ Service:
217
217
Reference the [backendRef][backendRef] API documentation for additional details
218
218
on `weight` and other fields.
219
219
220
+
#### Name (optional)
221
+
222
+
??? example "Experimental Channel since v1.2.0"
223
+
224
+
This concept has been part of the Experimental Channel since `v1.2.0`.
225
+
For more information on release channels, refer to our
226
+
[versioning guide](/concepts/versioning).
227
+
228
+
GRPCRoute Rules include an optional `name` field. The applications for the name of a route rule are implementation-specific. It can be used to reference individual route rules by name from other resources, such as in the `sectionName` field of metaresources ([GEP-2648](https://gateway-api.sigs.k8s.io/geps/gep-2648/#apply-policies-to-sections-of-a-resource)), in the status stanzas of resources related to the route object, to identify internal configuration objects generated by the implementation from GRPCRoute Rule, etc.
229
+
230
+
If specified, the value of the name field must comply with the [`SectionName`](https://github.com/kubernetes-sigs/gateway-api/blob/v1.0.0/apis/v1/shared_types.go#L607-L624) type.
231
+
220
232
## Status
221
233
222
234
Status defines the observed state of the GRPCRoute.
@@ -193,7 +193,7 @@ Conformance levels are defined by the filter type:
193
193
- Implementers are encouraged to support "extended" filters.
194
194
- "Implementation-specific"filters have no API guarantees across implementations.
195
195
196
-
Specifying a core filter multiple times has unspecified or
196
+
Specifying a core filter multiple times has unspecified or
197
197
implementation-specific conformance.
198
198
199
199
All filters are expected to be compatible with each other except for the
@@ -233,7 +233,7 @@ on `weight` and other fields.
233
233
??? example "Experimental Channel since v1.0.0"
234
234
235
235
HTTPRoute timeouts have been part of the Experimental Channel since `v1.0.0`.
236
-
For more information on release channels, refer to our
236
+
For more information on release channels, refer to our
237
237
[versioning guide](/concepts/versioning).
238
238
239
239
HTTPRoute Rules include a `Timeouts` field. If unspecified, timeout behavior is implementation-specific.
@@ -256,16 +256,34 @@ The following example uses the `request` field which will cause a timeout if a c
256
256
257
257
Reference the [timeouts][timeouts] API documentation for additional details.
258
258
259
+
#### Name (optional)
260
+
261
+
??? example "Experimental Channel since v1.2.0"
262
+
263
+
This concept has been part of the Experimental Channel since `v1.2.0`.
264
+
For more information on release channels, refer to our
265
+
[versioning guide](/concepts/versioning).
266
+
267
+
HTTPRoute Rules include an optional `name` field. The applications for the name of a route rule are implementation-specific. It can be used to reference individual route rules by name from other resources, such as in the `sectionName` field of metaresources ([GEP-2648](https://gateway-api.sigs.k8s.io/geps/gep-2648/#apply-policies-to-sections-of-a-resource)), in the status stanzas of resources related to the route object, to identify internal configuration objects generated by the implementation from HTTPRoute Rule, etc.
268
+
269
+
If specified, the value of the name field must comply with the [`SectionName`](https://github.com/kubernetes-sigs/gateway-api/blob/v1.0.0/apis/v1/shared_types.go#L607-L624) type.
270
+
271
+
The following example specifies the `name` field to identify HTTPRoute Rules used to split traffic between a _read-only_ backend service and a _write-only_ one:
272
+
273
+
```yaml
274
+
{% include 'experimental/http-route-rule-name.yaml' %}
275
+
```
276
+
259
277
##### Backend Protocol
260
278
261
279
??? example "Experimental Channel since v1.0.0"
262
280
263
281
This concept has been part of the Experimental Channel since `v1.0.0`.
264
-
For more information on release channels, refer to our
282
+
For more information on release channels, refer to our
265
283
[versioning guide](/concepts/versioning).
266
284
267
-
Some implementations may require the [backendRef][backendRef] to be labeled
268
-
explicitly in order to route traffic using a certain protocol. For Kubernetes
285
+
Some implementations may require the [backendRef][backendRef] to be labeled
286
+
explicitly in order to route traffic using a certain protocol. For Kubernetes
269
287
Service backends this can be done by specifying the [`appProtocol`][appProtocol]
0 commit comments