mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 09:36:58 +02:00
Smarter way to skip zone not matching view
This commit is contained in:
parent
b9d8a4ac63
commit
cf966d0cbb
@ -232,7 +232,11 @@ func (p *InfobloxProvider) ApplyChanges(ctx context.Context, changes *plan.Chang
|
||||
|
||||
func (p *InfobloxProvider) zones() ([]ibclient.ZoneAuth, error) {
|
||||
var res, result []ibclient.ZoneAuth
|
||||
obj := ibclient.NewZoneAuth(ibclient.ZoneAuth{})
|
||||
obj := ibclient.NewZoneAuth(
|
||||
ibclient.ZoneAuth{
|
||||
View: p.view,
|
||||
},
|
||||
)
|
||||
err := p.client.GetObject(obj, "", &res)
|
||||
|
||||
if err != nil {
|
||||
@ -248,11 +252,6 @@ func (p *InfobloxProvider) zones() ([]ibclient.ZoneAuth, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
// Skip zones not matching the view
|
||||
if p.view != "" && zone.View != p.view {
|
||||
continue
|
||||
}
|
||||
|
||||
result = append(result, zone)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user