Allow setting load balancer method and sticky using service annotations

This commit is contained in:
Brian Akins 2017-01-25 08:11:00 -05:00 committed by Ed Robinson
parent 7cc91a8244
commit 490427f94d
No known key found for this signature in database
GPG key ID: EC501FCA6421CCF0
4 changed files with 293 additions and 11 deletions

View file

@ -766,7 +766,7 @@ watch = true
# filename = "docker.tmpl"
# Expose containers by default in traefik
# If set to false, containers that don't have `traefik.enable=true` will be ignored
# If set to false, containers that don't have `traefik.enable=true` will be ignored
#
# Optional
# Default: true
@ -1061,6 +1061,11 @@ Annotations can be used on containers to override default behaviour for the whol
- `traefik.frontend.rule.type: PathPrefixStrip`: override the default frontend rule type (Default: `PathPrefix`).
Annotations can be used on the Kubernetes service to override default behaviour:
- `traefik.backend.loadbalancer.method=drr`: override the default `wrr` load balancer algorithm
- `traefik.backend.loadbalancer.sticky=true`: enable backend sticky sessions
You can find here an example [ingress](https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/cheese-ingress.yaml) and [replication controller](https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/traefik.yaml).
## Consul backend