healhcheck: various cleanups (#1106)

* healhcheck: various cleanups

Network wasn't used. IgnorePaths wasn't used. Move checkdown function to
common function shared between proxy protocols. And some naming fixed.

Also reset the Fails on a succesful healthcheck back to 0.

remove newlines from log

* compile

* fix test
This commit is contained in:
Miek Gieben 2017-09-24 19:37:43 +01:00 committed by GitHub
parent 102cfbd7fe
commit 148a99442d
8 changed files with 65 additions and 118 deletions

View file

@ -190,9 +190,9 @@ func (k *Kubernetes) getClientConfig() (*rest.Config, error) {
down := false
uh.CheckMu.Lock()
uh.Lock()
until := uh.OkUntil
uh.CheckMu.Unlock()
uh.Unlock()
if !until.IsZero() && time.Now().After(until) {
down = true