Skip to content

Commit

Permalink
docs(*) TrafficRoute updates
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
  • Loading branch information
Nikolay Nikolaev committed Nov 17, 2020
1 parent 2f0c601 commit 0d9dbd2
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 67 deletions.
108 changes: 57 additions & 51 deletions docs/docs/0.7.3/documentation/http-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1277,23 +1277,25 @@ curl http://localhost:5681/meshes/mesh-1/traffic-routes/web-to-backend
}
}
],
"conf": [
{
"weight": 90,
"destination": {
"region": "us-east-1",
"service": "backend",
"version": "v2"
}
},
{
"weight": 10,
"destination": {
"service": "backend",
"version": "v3"
}
}
]
"conf": {
"split": [
{
"weight": 90,
"destination": {
"region": "us-east-1",
"service": "backend",
"version": "v2"
}
},
{
"weight": 10,
"destination": {
"service": "backend",
"version": "v3"
}
}
]
}
}
```

Expand Down Expand Up @@ -1327,23 +1329,25 @@ curl -XPUT http://localhost:5681/meshes/mesh-1/traffic-routes/web-to-backend --d
}
}
],
"conf": [
{
"weight": 90,
"destination": {
"region": "us-east-1",
"service": "backend",
"version": "v2"
}
},
{
"weight": 10,
"destination": {
"service": "backend",
"version": "v3"
}
}
]
"conf": {
"split": [
{
"weight": 90,
"destination": {
"region": "us-east-1",
"service": "backend",
"version": "v2"
}
},
{
"weight": 10,
"destination": {
"service": "backend",
"version": "v3"
}
}
]
}
}
```

Expand Down Expand Up @@ -1381,23 +1385,25 @@ curl http://localhost:5681/meshes/mesh-1/traffic-routes
}
}
],
"conf": [
{
"weight": 90,
"destination": {
"region": "us-east-1",
"service": "backend",
"version": "v2"
}
},
{
"weight": 10,
"destination": {
"service": "backend",
"version": "v3"
}
}
]
"conf": {
"split": [
{
"weight": 90,
"destination": {
"region": "us-east-1",
"service": "backend",
"version": "v2"
}
},
{
"weight": 10,
"destination": {
"service": "backend",
"version": "v3"
}
}
]
}
}
],
"next": "http://localhost:5681/meshes/mesh-1/traffic-routes?offset=1"
Expand Down
34 changes: 18 additions & 16 deletions docs/docs/0.7.3/policies/traffic-route.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ spec:
- match:
kuma.io/service: redis_default_svc_6379
conf:
- weight: 90
destination:
kuma.io/service: redis_default_svc_6379
version: '1.0'
- weight: 10
destination:
kuma.io/service: redis_default_svc_6379
version: '2.0'
split:
- weight: 90
destination:
kuma.io/service: redis_default_svc_6379
version: '1.0'
- weight: 10
destination:
kuma.io/service: redis_default_svc_6379
version: '2.0'
```
We will apply the configuration with `kubectl apply -f [..]`.
Expand All @@ -48,14 +49,15 @@ destinations:
- match:
kuma.io/service: redis
conf:
- weight: 90
destination:
kuma.io/service: redis
version: '1.0'
- weight: 10
destination:
kuma.io/service: redis
version: '2.0'
split:
- weight: 90
destination:
kuma.io/service: redis
version: '1.0'
- weight: 10
destination:
kuma.io/service: redis
version: '2.0'
```

We will apply the configuration with `kumactl apply -f [..]` or via the [HTTP API](/docs/0.7.3/documentation/http-api).
Expand Down

0 comments on commit 0d9dbd2

Please sign in to comment.