K8s Test Cleanup and Service PTR

Change the CI setup for K8s to be simpler. Now it just creates a
set of objects via a yaml file, making it very easy to modify
the tests.

Implement PTR for services.
This commit is contained in:
John Belamaric 2016-11-14 19:31:08 +00:00
parent 137fc33b8f
commit afe4368c34
10 changed files with 248 additions and 314 deletions

View file

@ -71,6 +71,19 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, error) {
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.") {
continue
}
k8s.primaryZone = i
break
}
if k8s.primaryZone == -1 {
return nil, errors.New("A non-reverse zone name must be given for Kubernetes.")
}
for c.NextBlock() {
switch c.Val() {
case "template":