aboutsummaryrefslogtreecommitdiff
path: root/middleware/kubernetes/parse.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-08-14 08:49:26 +0100
committerGravatar GitHub <noreply@github.com> 2017-08-14 08:49:26 +0100
commit00f5c7797e265dc2fecad5acbfcfdad9797e48e5 (patch)
tree92d2e98f10a8d25f8b8a9a9239b88ff85f2866b6 /middleware/kubernetes/parse.go
parent818d2b10adc6e69b2f94a50a56ac292a12278861 (diff)
downloadcoredns-00f5c7797e265dc2fecad5acbfcfdad9797e48e5.tar.gz
coredns-00f5c7797e265dc2fecad5acbfcfdad9797e48e5.tar.zst
coredns-00f5c7797e265dc2fecad5acbfcfdad9797e48e5.zip
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
Diffstat (limited to 'middleware/kubernetes/parse.go')
-rw-r--r--middleware/kubernetes/parse.go9
1 files changed, 3 insertions, 6 deletions
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
}