Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

ref(specs): matches -> routes in HTTPRouteGroup #229

Merged
merged 1 commit into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**API Group:** specs.smi-spec.io

**API Version:** v1alpha4
**API Version:** v1alpha5-draft

## Specification

Expand All @@ -28,7 +28,7 @@ kind: HTTPRouteGroup
metadata:
name: the-routes
spec:
matches:
routes:
- name: metrics
pathRegex: "/metrics"
methods:
Expand All @@ -38,7 +38,7 @@ spec:
methods: ["*"]
```

This example defines two matches, `metrics` and `health`. The name is the
This example defines two routes, `metrics` and `health`. The name is the
primary key and all fields are required. A regex is used to match against the
URI and is anchored (`^`) to the beginning of the URI. Methods can either be
specific (`GET`) or `*` to match all methods.
Expand All @@ -47,15 +47,15 @@ These routes have not yet been associated with any resources. See
[Traffic Target](/apis/traffic-access/v1alpha3/traffic-access.md) for an example
of how routes become associated with applications serving traffic.

The `matches` field only applies to URIs and HTTP headers.
The `routes` field only applies to URIs and HTTP headers.

```yaml
kind: HTTPRouteGroup
metadata:
name: the-routes
namespace: default
spec:
matches:
routes:
- name: everything
pathRegex: ".*"
methods: ["*"]
Expand Down Expand Up @@ -83,7 +83,7 @@ metadata:
name: the-routes
namespace: default
spec:
matches:
routes:
- name: android-insiders
headers:
- user-agent: ".*Android.*"
Expand All @@ -99,7 +99,7 @@ metadata:
name: the-routes
namespace: default
spec:
matches:
routes:
- name: android-insiders
headers:
- user-agent: ".*Android.*"
Expand All @@ -119,7 +119,7 @@ kind: HTTPRouteGroup
metadata:
name: the-routes
spec:
matches:
routes:
- name: iphone-users
pathRegex: "/api/.*"
methods:
Expand All @@ -144,22 +144,20 @@ kind: TCPRoute
metadata:
name: the-routes
spec:
matches:
ports:
- 3306
- 6446
ports:
- 3306
- 6446
```

When matching ports are not specified,
the TCP route will match all the ports of a Kubernetes service:
When matching ports are not specified, the TCP route will match all the ports of
a Kubernetes service:

```yaml
kind: TCPRoute
metadata:
name: the-routes
spec:
matches:
ports: []
ports: []
```

### UDPRoute
Expand All @@ -171,22 +169,20 @@ kind: UDPRoute
metadata:
name: the-routes
spec:
matches:
ports:
- 989
- 990
ports:
- 989
- 990
```

When matching ports are not specified,
the UDP route will match all the ports of a Kubernetes service:
When matching ports are not specified, the UDP route will match all the ports of
a Kubernetes service:

```yaml
kind: UDPRoute
metadata:
name: the-routes
spec:
matches:
ports: []
ports: []
```

## Automatic Generation
Expand Down
97 changes: 0 additions & 97 deletions apis/traffic-specs/v1alpha1/traffic-specs.md

This file was deleted.

161 changes: 0 additions & 161 deletions apis/traffic-specs/v1alpha2/traffic-specs.md

This file was deleted.

Loading