Add HTTP headers to healthcheck.

This commit is contained in:
Ludovic Fernandez 2018-04-18 18:16:03 +02:00 committed by Traefiker Bot
parent e6ce61fdf0
commit 36dcfbfe2d
4 changed files with 11 additions and 9 deletions

6
Gopkg.lock generated
View file

@ -263,8 +263,8 @@
[[projects]]
name = "github.com/containous/traefik-extra-service-fabric"
packages = ["."]
revision = "2889df8d4f84315e6e527588554ed0ce9d062305"
version = "v1.1.5"
revision = "08668650856571f3529bde394a36a5c9cf16a991"
version = "v1.2.0"
[[projects]]
name = "github.com/coreos/bbolt"
@ -1674,6 +1674,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "c7d91203842be1915ca08a31917a079489bff7ffc6f2e494330e9556b4730a06"
inputs-digest = "43f8acdb9c80004418ca3fd30c4c82f47589f96845fbaf2eaca5924b137eeed6"
solver-name = "gps-cdcl"
solver-version = 1

View file

@ -66,7 +66,7 @@
[[constraint]]
name = "github.com/containous/traefik-extra-service-fabric"
version = "1.1.5"
version = "1.2.0"
[[constraint]]
name = "github.com/coreos/go-systemd"

View file

@ -27,11 +27,6 @@ const (
DefaultBackendMaxconnExtractorFunc = "request.host"
DefaultBackendLoadbalancerStickinessCookieName = ""
DefaultBackendHealthCheckPort = 0
// TODO need to be remove in extra-service-fabric
DefaultWeightInt = 1 // Deprecated
DefaultPassHostHeaderBool = true // Deprecated
DefaultFrontendPriorityInt = 0 // Deprecated
)
var (

View file

@ -54,6 +54,13 @@ const tmpl = `
path = "{{ $healthCheck.Path }}"
port = {{ $healthCheck.Port }}
interval = "{{ $healthCheck.Interval }}"
hostname = "{{ $healthCheck.Hostname }}"
{{if $healthCheck.Headers }}
[backends."{{ $backendName }}".healthCheck.headers]
{{range $k, $v := $healthCheck.Headers }}
{{$k}} = "{{$v}}"
{{end}}
{{end}}
{{end}}
{{range $instance := $partition.Instances}}