mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-07 01:56:57 +02:00
fix private names
This commit is contained in:
parent
47236fd8bf
commit
43b218880e
@ -648,7 +648,7 @@ func (p *CloudFlareProvider) newCloudFlareChange(action string, endpoint *endpoi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewDNSRecordIndex(r cloudflare.DNSRecord) DNSRecordIndex {
|
func newDNSRecordIndex(r cloudflare.DNSRecord) DNSRecordIndex {
|
||||||
return DNSRecordIndex{Name: r.Name, Type: r.Type, Content: r.Content}
|
return DNSRecordIndex{Name: r.Name, Type: r.Type, Content: r.Content}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -672,7 +672,7 @@ func (p *CloudFlareProvider) listDNSRecordsWithAutoPagination(ctx context.Contex
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, r := range pageRecords {
|
for _, r := range pageRecords {
|
||||||
records[NewDNSRecordIndex(r)] = r
|
records[newDNSRecordIndex(r)] = r
|
||||||
}
|
}
|
||||||
params.ResultInfo = resultInfo.Next()
|
params.ResultInfo = resultInfo.Next()
|
||||||
if params.ResultInfo.Done() {
|
if params.ResultInfo.Done() {
|
||||||
@ -682,7 +682,7 @@ func (p *CloudFlareProvider) listDNSRecordsWithAutoPagination(ctx context.Contex
|
|||||||
return records, nil
|
return records, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewCustomHostnameIndex(ch cloudflare.CustomHostname) CustomHostnameIndex {
|
func newCustomHostnameIndex(ch cloudflare.CustomHostname) CustomHostnameIndex {
|
||||||
return CustomHostnameIndex{Hostname: ch.Hostname}
|
return CustomHostnameIndex{Hostname: ch.Hostname}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -707,7 +707,7 @@ func (p *CloudFlareProvider) listCustomHostnamesWithPagination(ctx context.Conte
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
for _, ch := range pageCustomHostnameListResponse {
|
for _, ch := range pageCustomHostnameListResponse {
|
||||||
chs[NewCustomHostnameIndex(ch)] = ch
|
chs[newCustomHostnameIndex(ch)] = ch
|
||||||
}
|
}
|
||||||
resultInfo = result.Next()
|
resultInfo = result.Next()
|
||||||
if resultInfo.Done() {
|
if resultInfo.Done() {
|
||||||
|
@ -1312,7 +1312,7 @@ func TestCloudflareGroupByNameAndType(t *testing.T) {
|
|||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
records := make(DNSRecordsMap)
|
records := make(DNSRecordsMap)
|
||||||
for _, r := range tc.Records {
|
for _, r := range tc.Records {
|
||||||
records[NewDNSRecordIndex(r)] = r
|
records[newDNSRecordIndex(r)] = r
|
||||||
}
|
}
|
||||||
endpoints := groupByNameAndTypeWithCustomHostnames(records, CustomHostnamesMap{})
|
endpoints := groupByNameAndTypeWithCustomHostnames(records, CustomHostnamesMap{})
|
||||||
// Targets order could be random with underlying map
|
// Targets order could be random with underlying map
|
||||||
|
Loading…
Reference in New Issue
Block a user