Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ To run the provider, you must provide the following Environment Variables:
| INFOBLOX_DEFAULT_TTL | 300 | false |
| INFOBLOX_EXTENSIBLE_ATTRIBUTES_JSON | {} | false |

### INFOBLOX_CREATE_PTR

When infoblox `INFOBLOX_CREATE_PTR` is set to `true`, make shure that `DOMAIN_FILTER` contains the zone for reversed lookup.

```bash
DOMAIN_FILTER="cloud.example, 1.2.3.0/24"
```

**external-dns-infoblox-webhook Environment Variables**:

Expand Down
8 changes: 5 additions & 3 deletions internal/infoblox/infoblox.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ func (mrb *ExtendedRequestBuilder) BuildRequest(t ibclient.RequestType, obj ibcl
}

// if we are not doing a ZoneAuth query, support the name filter
if !zoneAuthQuery && mrb.nameRegEx != "" {
_, isPTR := obj.(*ibclient.RecordPTR)
if !isPTR && !zoneAuthQuery && mrb.nameRegEx != "" {
query.Set("name~", mrb.nameRegEx)
}

Expand Down Expand Up @@ -363,7 +364,7 @@ func (p *Provider) submitChanges(changes []*infobloxChange) error {
}

changesByZone := p.ChangesByZone(zonePointerConverter(zones), changes)
for _, changes := range changesByZone {
for zone, changes := range changesByZone {
for _, change := range changes {
record, err := p.buildRecord(change)
if err != nil {
Expand All @@ -374,6 +375,7 @@ func (p *Provider) submitChanges(changes []*infobloxChange) error {
return err
}
logFields["action"] = change.Action
logFields["zone"] = zone
if p.config.DryRun {
log.WithFields(logFields).Info("Dry run: skipping..")
continue
Expand Down Expand Up @@ -712,7 +714,7 @@ func (p *Provider) recordSet(ep *endpoint.Endpoint, getObject bool) (recordSet i
obj.Ttl = &ttl
obj.UseTtl = &ptrToBoolTrue
if getObject {
queryParams := ibclient.NewQueryParams(false, map[string]string{"name": *obj.PtrdName})
queryParams := ibclient.NewQueryParams(false, map[string]string{"ptrdname": *obj.PtrdName, "ipv4addr": *obj.Ipv4Addr})
err = p.client.GetObject(obj, "", queryParams, &res)
if err != nil && !isNotFoundError(err) {
return
Expand Down
Loading