Skip to content

Commit

Permalink
correct rejection of azure-private-dns-zones not matching filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
saidst committed Jan 27, 2020
1 parent 432d069 commit 6ff3e03
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions provider/azure_private_dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,10 @@ func (p *AzurePrivateDNSProvider) zones(ctx context.Context) ([]privatedns.Priva
zone := i.Value()
log.Debugf("Validating Zone: %v", *zone.Name)

if zone.Name == nil {
continue
if zone.Name != nil && p.domainFilter.Match(*zone.Name) && p.zoneIDFilter.Match(*zone.ID) {
zones = append(zones, zone)
}

if !p.domainFilter.Match(*zone.Name) {
continue
}

if !p.zoneIDFilter.Match(*zone.ID) {
continue
}

zones = append(zones, zone)

err := i.NextWithContext(ctx)
if err != nil {
return nil, err
Expand Down

0 comments on commit 6ff3e03

Please sign in to comment.