aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/kubernetes/parse.go')
-rw-r--r--plugin/kubernetes/parse.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugin/kubernetes/parse.go b/plugin/kubernetes/parse.go
index c16adc4ca..7b909005c 100644
--- a/plugin/kubernetes/parse.go
+++ b/plugin/kubernetes/parse.go
@@ -2,8 +2,6 @@ package kubernetes
import (
"github.com/coredns/coredns/plugin/pkg/dnsutil"
- "github.com/coredns/coredns/request"
-
"github.com/miekg/dns"
)
@@ -26,7 +24,7 @@ type recordRequest struct {
// parseRequest parses the qname to find all the elements we need for querying k8s. Anything
// that is not parsed will have the wildcard "*" value (except r.endpoint).
// Potential underscores are stripped from _port and _protocol.
-func parseRequest(state request.Request) (r recordRequest, err error) {
+func parseRequest(name, zone string) (r recordRequest, err error) {
// 3 Possible cases:
// 1. _port._protocol.service.namespace.pod|svc.zone
// 2. (endpoint): endpoint.service.namespace.pod|svc.zone
@@ -34,7 +32,7 @@ func parseRequest(state request.Request) (r recordRequest, err error) {
//
// Federations are handled in the federation plugin. And aren't parsed here.
- base, _ := dnsutil.TrimZone(state.Name(), state.Zone)
+ base, _ := dnsutil.TrimZone(name, zone)
// return NODATA for apex queries
if base == "" || base == Svc || base == Pod {
return r, nil