Make Traefik health checks label-configurable with Marathon.
For the two existing health check parameters (path and interval), we add support for Marathon labels. Changes in detail: - Extend the Marathon provider and template. - Refactor Server.loadConfig to reduce duplication. - Refactor the healthcheck package slightly to accommodate the changes and allow extending by future parameters. - Update documentation.
This commit is contained in:
parent
441d5442a1
commit
d57f83c31c
8 changed files with 371 additions and 45 deletions
|
@ -20,6 +20,11 @@
|
|||
[backends."backend{{getFrontendBackend . }}".circuitbreaker]
|
||||
expression = "{{getCircuitBreakerExpression . }}"
|
||||
{{end}}
|
||||
{{ if hasHealthCheckLabels . }}
|
||||
[backends."backend{{getFrontendBackend . }}".healthcheck]
|
||||
path = "{{getHealthCheckPath . }}"
|
||||
interval = "{{getHealthCheckInterval . }}"
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
[frontends]{{range .Applications}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue