Skip to content

Commit

Permalink
README - Example of filter usage in the documentation (#15)
Browse files Browse the repository at this point in the history
* README - Example of filter usage in the documentation

* Update README.md

Co-authored-by: Donovan Muller <[email protected]>

---------

Co-authored-by: Donovan Muller <[email protected]>
  • Loading branch information
kuritka and donovanmuller authored Jun 14, 2024
1 parent 534beb4 commit aa2c32d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,27 @@ Infoblox Provider is a simple web server with several clearly defined routers:
| /adjustendpoints | POST |

#### Reading Data
Read data by HTTP GET to `/records`, see:
```shell
curl -H 'Accept: application/external.dns.webhook+json;version=1' localhost:8888/records
```
If you set DOMAIN_FILTER, DNS will return all records from this domain(s). Because the returned data for a given
domain can be large - in some cases tens of thousands of records, it is advisable to use filters to reduce the
data to the desired result. Filters are specified via environment variables: `DOMAIN_FILTER`,`EXCLUDE_DOMAIN_FILTER`,
`REGEXP_DOMAIN_FILTER`,`REGEXP_DOMAIN_FILTER_EXCLUSION`,`REGEXP_NAME_FILTER`.

The following example demonstrates the use of a filter:
```shell
# We are looking for all records in these two domains.
# Unfortunately, they may contain tens of thousands of records.
DOMAIN_FILTER=org.eu.cloud.example.com,org-hq.us.cloud.example.com

# Using regex, we further restrict the domains to org.eu.cloud.example.comorg-hq.us.cloud.example.com
REGEXP_DOMAIN_FILTER=(eu.cloud|org-hq.us).cloud.example.com

# Finally, we filter only those records that have `my-project.org-hq` or `.us.cloud` in the name
REGEXP_NAME_FILTER=(my-project.org-hq|.us.cloud)
```

#### Writing Data

Expand Down

0 comments on commit aa2c32d

Please sign in to comment.