diff options
author | 2023-06-19 05:42:17 -0700 | |
---|---|---|
committer | 2023-06-19 08:42:17 -0400 | |
commit | 5b5a6ac6ad94e9ef1e23bd76a2cd1f3987cbe8df (patch) | |
tree | b77e4493f968be7bb1236bd7fa47063ff4c4ee8a /plugin/kubernetes/kubernetes.go | |
parent | 7e6d3bb5334527abc1f5e6ef039fae95a666225a (diff) | |
download | coredns-5b5a6ac6ad94e9ef1e23bd76a2cd1f3987cbe8df.tar.gz coredns-5b5a6ac6ad94e9ef1e23bd76a2cd1f3987cbe8df.tar.zst coredns-5b5a6ac6ad94e9ef1e23bd76a2cd1f3987cbe8df.zip |
plugin/kubernetes: filter ExternalName services from matching double subdomain wildcard (#6162)
remove double subdomain reference from review feedback
not subdoman
Signed-off-by: emaildanwilson <dan@controlplane.com>
Co-authored-by: emaildanwilson <dan@controlplane.com>
Diffstat (limited to 'plugin/kubernetes/kubernetes.go')
-rw-r--r-- | plugin/kubernetes/kubernetes.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/kubernetes/kubernetes.go b/plugin/kubernetes/kubernetes.go index 14ea031a0..cea23d860 100644 --- a/plugin/kubernetes/kubernetes.go +++ b/plugin/kubernetes/kubernetes.go @@ -445,8 +445,8 @@ func (k *Kubernetes) findServices(r recordRequest, zone string) (services []msg. // External service if svc.Type == api.ServiceTypeExternalName { - //External services cannot have endpoints, so skip this service if an endpoint is present in the request - if r.endpoint != "" { + // External services do not have endpoints, nor can we accept port/protocol pseudo subdomains in an SRV query, so skip this service if endpoint, port, or protocol is non-empty in the request + if r.endpoint != "" || r.port != "" || r.protocol != "" { continue } s := msg.Service{Key: strings.Join([]string{zonePath, Svc, svc.Namespace, svc.Name}, "/"), Host: svc.ExternalName, TTL: k.ttl} |