diff options
Diffstat (limited to 'middleware/kubernetes/handler.go')
-rw-r--r-- | middleware/kubernetes/handler.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/middleware/kubernetes/handler.go b/middleware/kubernetes/handler.go index 44de8da3d..168b65508 100644 --- a/middleware/kubernetes/handler.go +++ b/middleware/kubernetes/handler.go @@ -11,15 +11,15 @@ import ( func (k Kubernetes) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - fmt.Println("[debug] here entering ServeDNS: ctx:%v dnsmsg:%v", ctx, r) + fmt.Printf("[debug] here entering ServeDNS: ctx:%v dnsmsg:%v\n", ctx, r) state := middleware.State{W: w, Req: r} if state.QClass() != dns.ClassINET { return dns.RcodeServerFailure, fmt.Errorf("can only deal with ClassINET") } - // Check that query matches one of the zones served by this middleware, - // otherwise delegate to the next in the pipeline. + // Check that query matches one of the zones served by this middleware, + // otherwise delegate to the next in the pipeline. zone := middleware.Zones(k.Zones).Matches(state.Name()) if zone == "" { if k.Next == nil { @@ -43,6 +43,9 @@ func (k Kubernetes) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.M records, err = k.AAAA(zone, state, nil) case "TXT": records, err = k.TXT(zone, state) + // TODO: change lookup to return appropriate error. Then add code below + // this switch to check for the error and return not implemented. + //return dns.RcodeNotImplemented, nil case "CNAME": records, err = k.CNAME(zone, state) case "MX": |