Ignore srvRecords from domain level entries (#7742)

Fixes #7741
master
Harshavardhana 6 years ago committed by GitHub
parent 74efbb4153
commit d16a409943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      pkg/dns/etcd_dns.go

@ -56,7 +56,12 @@ func (c *coreDNS) List() ([]SrvRecord, error) {
if err != nil {
return nil, err
}
srvRecords = append(srvRecords, records...)
for _, record := range records {
if record.Key == "" {
continue
}
srvRecords = append(srvRecords, record)
}
}
return srvRecords, nil
}
@ -130,7 +135,7 @@ func (c *coreDNS) list(key string) ([]SrvRecord, error) {
// /skydns/net/miniocloud/10.0.0.1 that may exist as
// dns entry for the server (rather than the bucket
// itself).
if srvRecord.Key == "" || srvRecord.Key == etcdPathSeparator {
if srvRecord.Key == "" {
continue
}

Loading…
Cancel
Save