Use server block defaults (#894)

* mw/k8s: Test Federation parsing

The test case was there, but there was nothing testing it?!?!?!
Add it and split it out of the main setup test which is too long
already.

Also allow kubernetes a not have a ZONE, just default to the serverblock
in that case. Remove test that was blocking that.

Cleanup up the readme more.

* rewrite README
This commit is contained in:
Miek Gieben 2017-08-11 12:50:12 +01:00 committed by GitHub
parent 6e91408f61
commit 28b8a09240
3 changed files with 91 additions and 138 deletions

View file

@ -87,10 +87,6 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, error) {
}
}
if k8s.Zones == nil || len(k8s.Zones) < 1 {
return nil, errors.New("zone name must be provided for kubernetes middleware")
}
k8s.primaryZone = -1
for i, z := range k8s.Zones {
if strings.HasSuffix(z, "in-addr.arpa.") || strings.HasSuffix(z, "ip6.arpa.") {