1
0
Fork 0

clarify automatic service creation/assignment with labels

This commit is contained in:
mpl 2019-09-26 12:48:05 +02:00 committed by Traefiker Bot
parent c8fa059064
commit c6e783e7c3
6 changed files with 156 additions and 5 deletions

View file

@ -10,7 +10,7 @@ See also [Marathon user guide](../../user-guides/marathon.md).
!!! info "Labels"
- Labels are case insensitive.
- The complete list of labels can be found [the reference page](../../reference/dynamic-configuration/marathon.md)
- The complete list of labels can be found in [the reference page](../../reference/dynamic-configuration/marathon.md).
### General
@ -19,6 +19,32 @@ Traefik creates, for each Marathon application, a corresponding [service](../ser
The Service automatically gets a server per instance of the application,
and the router automatically gets a rule defined by defaultRule (if no rule for it was defined in labels).
#### Service definition
--8<-- "content/routing/providers/service-by-label.md"
??? example "Automatic service assignment with labels"
Service myservice gets automatically assigned to router myproxy.
```json
labels: {
"traefik.http.routers.myproxy.rule": "Host(`foo.com`)",
"traefik.http.services.myservice.loadbalancer.server.port": "80"
}
```
??? example "Automatic service creation and assignment with labels"
No service specified or defined, and yet one gets automatically created.
and assigned to router myproxy.
```json
labels: {
"traefik.http.routers.myproxy.rule": "Host(`foo.com`)"
}
```
### Routers
To update the configuration of the Router automatically attached to the application,