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:
parent
137fc33b8f
commit
afe4368c34
10 changed files with 248 additions and 314 deletions
|
@ -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":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue