Add fallthrough support for Kubernetes (#626)

* Add fallthrough support for Kubernetes

This enables registering other services in the same zone as
Kubernetes services. This also re-orders the middleware chain
so that Kubernetes comes before other types, in order to make
this work out-of-the-box.

* Remove extra line
This commit is contained in:
John Belamaric 2017-04-19 16:08:30 -04:00 committed by GitHub
parent 5a60090933
commit 1c53d4130e
7 changed files with 122 additions and 9 deletions

View file

@ -155,6 +155,13 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, error) {
continue
}
return nil, c.ArgErr()
case "fallthrough":
args := c.RemainingArgs()
if len(args) == 0 {
k8s.Fallthrough = true
continue
}
return nil, c.ArgErr()
}
}
return k8s, nil