mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
Update endpoint.go with Key function
This commit is contained in:
parent
cea0496a95
commit
a3826d541b
@ -295,7 +295,8 @@ func FilterEndpointsByOwnerID(ownerID string, eps []*Endpoint) []*Endpoint {
|
||||
filtered := []*Endpoint{}
|
||||
visited := make(map[EndpointKey]bool) // Initialize the visited map
|
||||
for _, ep := range eps {
|
||||
key := EndpointKey{DNSName: ep.DNSName, RecordType: ep.RecordType, SetIdentifier: ep.SetIdentifier}
|
||||
//key := EndpointKey{DNSName: ep.DNSName, RecordType: ep.RecordType, SetIdentifier: ep.SetIdentifier} --< this line passes the unit tests but I think it's wrong
|
||||
key := ep.Key() // This function should be the primary key for endpoints but it's only considering DNSName, RecordType & SetIdentifier.
|
||||
if visited[key] { //Do not contain duplicated endpoints
|
||||
log.Debugf(`Already loaded endpoint %v `, ep)
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user