Handle K8s middleware NS record (#662)
* commit for testing in cluster * commit for testing in cluster * refactor and add ns.dns record * Release 007 * reduce heap allocations * gofmt * revert accidental Makefile commits * restore prior rcode for disabled pod mode * revert Makefile deltas * add unit tests * more unit tests * make isRequestInReverseRange easier to test * more unit tests * addressing review feedback * commit setup.go
This commit is contained in:
parent
024f56682d
commit
7f950e496a
9 changed files with 537 additions and 97 deletions
|
@ -32,7 +32,7 @@ func (k Kubernetes) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.M
|
|||
// If this is a PTR request, and the request is in a defined
|
||||
// pod/service cidr range, process the request in this middleware,
|
||||
// otherwise pass to next middleware.
|
||||
if !k.isRequestInReverseRange(state) {
|
||||
if !k.isRequestInReverseRange(state.Name()) {
|
||||
return middleware.NextOrFailure(k.Name(), k.Next, ctx, w, r)
|
||||
}
|
||||
// Set the zone to this specific request.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue