mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
plugin/k8s_external: Fix rcode for headless services (#5657)
Signed-off-by: Miciah Masters <miciah.masters@gmail.com> Signed-off-by: Miciah Masters <miciah.masters@gmail.com>
This commit is contained in:
committed by
GitHub
parent
4e449b666a
commit
6cb5e10707
@@ -116,6 +116,7 @@ func (k *Kubernetes) External(state request.Request, headless bool) ([]msg.Servi
|
||||
if !(matchPortAndProtocol(port, p.Name, protocol, p.Protocol)) {
|
||||
continue
|
||||
}
|
||||
rcode = dns.RcodeSuccess
|
||||
s := msg.Service{Host: addr.IP, Port: int(p.Port), TTL: k.ttl}
|
||||
s.Key = strings.Join([]string{zonePath, svc.Namespace, svc.Name, endpointHostname(addr, k.endpointNameMode)}, "/")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user