mirror of
https://github.com/coredns/coredns.git
synced 2025-10-30 01:34:21 -04:00
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:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user