Skip to content

Commit

Permalink
Updating HTTPRoute docs for v1alpha2
Browse files Browse the repository at this point in the history
  • Loading branch information
robscott committed Oct 1, 2021
1 parent 83c8570 commit 64c1a6b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 28 deletions.
18 changes: 18 additions & 0 deletions examples/v1alpha2/http-filter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: HTTPRoute
metadata:
name: http-filter-1
spec:
hostnames:
- my.filter.com
rules:
- filters:
- type: RequestHeaderModifier
requestHeaderModifier:
add:
- name: my-header
value: foo
backendRefs:
- name: my-filter-svc1
weight: 1
port: 80
21 changes: 0 additions & 21 deletions examples/v1alpha2/traffic-split-1.yaml

This file was deleted.

14 changes: 7 additions & 7 deletions site-src/v1alpha2/api-types/httproute.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ strategies, rate-limiting, and traffic shaping.
The following example adds header "my-header: foo" to HTTP requests with Host
header "my.filter.com".
```yaml
{% include 'v1alpha1/http-filter.yaml' %}
{% include 'v1alpha2/http-filter.yaml' %}
```

API conformance is defined based on the filter type. The effects of ordering
Expand All @@ -137,18 +137,18 @@ The following example forwards HTTP requests for prefiex `/bar` to service
"my-service1" on port `8080` and HTTP requests for prefex `/some/thing` with
header `magic: foo` to service "my-service2" on port `8080`:
```yaml
{% include 'v1alpha1/basic-http.yaml' %}
{% include 'v1alpha2/basic-http.yaml' %}
```

The following example uses the `weight` field to forward HTTP requests for
prefix `/bar` equally across service "my-trafficsplit-svc1" and service
"my-trafficsplit-svc2", i.e. traffic splitting:
The following example uses the `weight` field to forward 90% of HTTP requests to
`foo.example.com` to the "foo-v1" Service and the other 10% to the "foo-v2"
Service:
```yaml
{% include 'v1alpha1/http-trafficsplit.yaml' %}
{% include 'v1alpha2/traffic-splitting/traffic-split-2.yaml' %}
```

Reference the [backendRef][backendRef] API documentation for additional details
of `weight` and other fields.
on `weight` and other fields.

## Status

Expand Down

0 comments on commit 64c1a6b

Please sign in to comment.