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
This commit is contained in:
parent
818d2b10ad
commit
00f5c7797e
26 changed files with 197 additions and 815 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue