mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
Merge pull request #739 from shashidharatd/nilmap
Fix nil map access of endpoint labels
This commit is contained in:
commit
db13a3d5d7
@ -98,13 +98,11 @@ func (im *TXTRegistry) Records() ([]*endpoint.Endpoint, error) {
|
||||
}
|
||||
|
||||
for _, ep := range endpoints {
|
||||
ep.Labels = endpoint.NewLabels()
|
||||
if labels, ok := labelMap[ep.DNSName]; ok {
|
||||
for k, v := range labels {
|
||||
ep.Labels[k] = v
|
||||
}
|
||||
} else {
|
||||
//this indicates that owner could not be identified, as there is no corresponding TXT record
|
||||
ep.Labels = endpoint.NewLabels()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user