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>
This commit is contained in:
Dan Wilson 2023-06-19 05:42:17 -07:00 committed by GitHub
parent 7e6d3bb533
commit 5b5a6ac6ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -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}