remove wildcard query functionality (#5019)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
parent
40a526b27f
commit
abaf938623
9 changed files with 30 additions and 178 deletions
|
@ -24,11 +24,7 @@ func (k *Kubernetes) External(state request.Request) ([]msg.Service, int) {
|
|||
// We are dealing with a fairly normal domain name here, but we still need to have the service
|
||||
// and the namespace:
|
||||
// service.namespace.<base>
|
||||
//
|
||||
// for service (and SRV) you can also say _tcp, and port (i.e. _http), we need those be picked
|
||||
// up, unless they are not specified, then we use an internal wildcard.
|
||||
port := "*"
|
||||
protocol := "*"
|
||||
var port, protocol string
|
||||
namespace := segs[last]
|
||||
if !k.namespaceExposed(namespace) {
|
||||
return nil, dns.RcodeNameError
|
||||
|
@ -69,7 +65,7 @@ func (k *Kubernetes) External(state request.Request) ([]msg.Service, int) {
|
|||
|
||||
for _, ip := range svc.ExternalIPs {
|
||||
for _, p := range svc.Ports {
|
||||
if !(match(port, p.Name) && match(protocol, string(p.Protocol))) {
|
||||
if !(matchPortAndProtocol(port, p.Name, protocol, string(p.Protocol))) {
|
||||
continue
|
||||
}
|
||||
rcode = dns.RcodeSuccess
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue