Support mirroring request body
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com> Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com>
This commit is contained in:
parent
09c07f45ee
commit
cf7f0f878a
20 changed files with 454 additions and 44 deletions
|
@ -65,6 +65,7 @@
|
|||
[http.services.Service02]
|
||||
[http.services.Service02.mirroring]
|
||||
service = "foobar"
|
||||
maxBodySize = 42
|
||||
|
||||
[[http.services.Service02.mirroring.mirrors]]
|
||||
name = "foobar"
|
||||
|
|
|
@ -72,6 +72,7 @@ http:
|
|||
Service02:
|
||||
mirroring:
|
||||
service: foobar
|
||||
maxBodySize: 42
|
||||
mirrors:
|
||||
- name: foobar
|
||||
percent: 42
|
||||
|
|
|
@ -65,6 +65,8 @@ spec:
|
|||
kind: TraefikService
|
||||
mirrors:
|
||||
- name: s2
|
||||
# Optional
|
||||
maxBodySize: 2000000000
|
||||
# Optional, as it is the default value
|
||||
kind: Service
|
||||
percent: 20
|
||||
|
|
|
@ -174,6 +174,7 @@
|
|||
| `traefik/http/services/Service01/loadBalancer/sticky/cookie/httpOnly` | `true` |
|
||||
| `traefik/http/services/Service01/loadBalancer/sticky/cookie/name` | `foobar` |
|
||||
| `traefik/http/services/Service01/loadBalancer/sticky/cookie/secure` | `true` |
|
||||
| `traefik/http/services/Service02/mirroring/maxBodySize` | `42` |
|
||||
| `traefik/http/services/Service02/mirroring/mirrors/0/name` | `foobar` |
|
||||
| `traefik/http/services/Service02/mirroring/mirrors/0/percent` | `42` |
|
||||
| `traefik/http/services/Service02/mirroring/mirrors/1/name` | `foobar` |
|
||||
|
|
|
@ -462,6 +462,8 @@ http:
|
|||
### Mirroring (service)
|
||||
|
||||
The mirroring is able to mirror requests sent to a service to other services.
|
||||
Please note that by default the whole request is buffered in memory while it is being mirrored.
|
||||
See the maxBodySize option in the example below for how to modify this behaviour.
|
||||
|
||||
!!! info "Supported Providers"
|
||||
|
||||
|
@ -473,6 +475,10 @@ The mirroring is able to mirror requests sent to a service to other services.
|
|||
[http.services.mirrored-api]
|
||||
[http.services.mirrored-api.mirroring]
|
||||
service = "appv1"
|
||||
# maxBodySize is the maximum size in bytes allowed for the body of the request.
|
||||
# If the body is larger, the request is not mirrored.
|
||||
# Default value is -1, which means unlimited size.
|
||||
maxBodySize = 1024
|
||||
[[http.services.mirrored-api.mirroring.mirrors]]
|
||||
name = "appv2"
|
||||
percent = 10
|
||||
|
@ -495,6 +501,10 @@ http:
|
|||
mirrored-api:
|
||||
mirroring:
|
||||
service: appv1
|
||||
# maxBodySize is the maximum size allowed for the body of the request.
|
||||
# If the body is larger, the request is not mirrored.
|
||||
# Default value is -1, which means unlimited size.
|
||||
maxBodySize = 1024
|
||||
mirrors:
|
||||
- name: appv2
|
||||
percent: 10
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue