mw/kubernetes: rewrite parseRequest

Stop looking at the qtype in parseRequest and make k.Namespace a map.
Fallout from this is that pkg/strings as it is not used anymore. Also
add a few helper functions to make unexposed namespaces easier to see in
the code.

Add wildcard tests to the middleware tests.
This commit is contained in:
Miek Gieben
2017-08-18 19:40:12 +01:00
parent 627687b11f
commit 118ef3dfa0
7 changed files with 128 additions and 127 deletions

View File

@@ -15,6 +15,6 @@ func (k *Kubernetes) Reverse(state request.Request, exact bool, opt middleware.O
return nil, nil, nil
}
records := k.getServiceRecordForIP(ip, state.Name())
records := k.serviceRecordForIP(ip, state.Name())
return records, nil, nil
}