From b19106768d3f263bac8697f4991febdbce0b32ee Mon Sep 17 00:00:00 2001 From: Michal Kuritka Date: Thu, 13 Jun 2024 13:44:19 +0200 Subject: [PATCH 1/2] README - Example of filter usage in the documentation --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 695d048..e53a32b 100644 --- a/README.md +++ b/README.md @@ -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 robust - 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 From e8f9a3158757d0e646f9f33354ba9d0ba509008a Mon Sep 17 00:00:00 2001 From: Kuritka Date: Thu, 13 Jun 2024 14:30:53 +0200 Subject: [PATCH 2/2] Update README.md Co-authored-by: Donovan Muller --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e53a32b..1c29784 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Read data by HTTP GET to `/records`, see: 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 robust - in some cases tens of thousands of records, it is advisable to use filters to reduce the +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`.