dont match external services when endpoint is specified (#5734)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
parent
ead84e1fa8
commit
47c99dc73b
2 changed files with 20 additions and 8 deletions
|
@ -517,6 +517,10 @@ 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 != "" {
|
||||
continue
|
||||
}
|
||||
s := msg.Service{Key: strings.Join([]string{zonePath, Svc, svc.Namespace, svc.Name}, "/"), Host: svc.ExternalName, TTL: k.ttl}
|
||||
if t, _ := s.HostType(); t == dns.TypeCNAME {
|
||||
s.Key = strings.Join([]string{zonePath, Svc, svc.Namespace, svc.Name}, "/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue