From 00f5c7797e265dc2fecad5acbfcfdad9797e48e5 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 14 Aug 2017 08:49:26 +0100 Subject: mw/kubernetes: remove federation and cidr (#916) * mw/kubernetes: remove federation and cidr Remove both as we have a corefile syntax change that handles cidr and remove federation because that is going to be its own middleware. * backwards incompat changes This PR: * removes cidr from kubernetes (core Corefile feature now) * removes federation from kubernets (comes back as new middleware) * [remove autopath - which was already gone, so that already was backwards incompat] * adds `fallthrough` to the *etcd* middleware and makes you enable it. * Fail on unknown properties * documentation * Disable TestHealthCheck as it uses realtime and fails --- middleware/kubernetes/parse.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'middleware/kubernetes/parse.go') diff --git a/middleware/kubernetes/parse.go b/middleware/kubernetes/parse.go index 1ab8fd1c6..c582f904e 100644 --- a/middleware/kubernetes/parse.go +++ b/middleware/kubernetes/parse.go @@ -19,14 +19,13 @@ type recordRequest struct { namespace string // A each name can be for a pod or a service, here we track what we've seen. This value is true for // pods and false for services. If we ever need to extend this well use a typed value. - podOrSvc string - zone string - federation string + podOrSvc string + zone string } // parseRequest parses the qname to find all the elements we need for querying k8s. func (k *Kubernetes) parseRequest(state request.Request) (r recordRequest, err error) { - // 3 Possible cases + // 3 Possible cases: TODO(chris): remove federations comments here. // SRV Request: _port._protocol.service.namespace.[federation.]type.zone // A Request (endpoint): endpoint.service.namespace.[federation.]type.zone // A Request (service): service.namespace.[federation.]type.zone @@ -35,7 +34,6 @@ func (k *Kubernetes) parseRequest(state request.Request) (r recordRequest, err e segs := dns.SplitDomainName(base) r.zone = state.Zone - r.federation, segs = k.stripFederation(segs) if state.QType() == dns.TypeNS { return r, nil @@ -112,6 +110,5 @@ func (r recordRequest) String() string { s += "." + r.namespace s += "." + r.podOrSvc s += "." + r.zone - s += "." + r.federation return s } -- cgit v1.2.3