* feat(metrics): add source wrapper metrics for invalid and deduplicated endpoints
Add GaugeVecMetric.Reset() to clear stale label combinations between cycles.
Introduce invalidEndpoints and deduplicatedEndpoints gauge vectors in the
source wrappers package, partitioned by record_type and source_type. The
dedup source wrapper now tracks rejected (invalid) and de-duplicated
endpoints per collection cycle.
Update the metrics documentation and bump the known metrics count.
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
* feat(source): add PTR source wrapper for automatic reverse DNS
Implement ptrSource, a source wrapper that generates PTR endpoints from
A/AAAA records. The wrapper supports:
- Global default via WithCreatePTR (maps to --create-ptr flag)
- Per-endpoint override via record-type provider-specific property
- Grouping multiple hostnames sharing an IP into a single PTR endpoint
- Skipping wildcard DNS names
Add WithPTRSupported and WithCreatePTR options to the wrapper Config
and wire the PTR wrapper into the WrapSources chain when PTR is in
managed-record-types.
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
* feat(config): add --create-ptr flag and deprecate --rfc2136-create-ptr
Add the generic --create-ptr boolean flag to Config, enabling automatic
PTR record creation for any provider. Add IsPTRSupported() helper that
checks whether PTR is included in --managed-record-types.
Add validation: --create-ptr (or legacy --rfc2136-create-ptr) now
requires PTR in --managed-record-types, preventing misconfiguration.
Mark --rfc2136-create-ptr as deprecated in the flag description.
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
* refactor(rfc2136): remove inline PTR logic in favor of PTR source wrapper
Remove the createPTR field, AddReverseRecord, RemoveReverseRecord, and
GenerateReverseRecord methods from the rfc2136 provider. PTR record
generation is now handled generically by the PTR source wrapper before
records reach the provider.
Update the PTR creation test to supply pre-generated PTR endpoints
(simulating what the source wrapper produces) instead of relying on
the provider to create them internally.
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
* feat(controller): wire PTR source wrapper into buildSource
Pass the top-level Config to buildSource so it can read IsPTRSupported()
and the CreatePTR / RFC2136CreatePTR flags. When PTR is in
managed-record-types, the PTR source wrapper is installed in the
wrapper chain with the combined create-ptr default.
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
* chore(pdns): remove stale comment and fix whitespace
Remove an outdated comment about a single-target-per-tuple assumption
that no longer applies.
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
* docs: add PTR records documentation and update existing guides
Add docs/advanced/ptr-records.md covering the --create-ptr flag,
per-resource annotation overrides, prerequisites, and usage examples.
Update:
- annotations.md: document record-type annotation
- flags.md: add --create-ptr, mark --rfc2136-create-ptr as deprecated
- tutorials/rfc2136.md: point to generic --create-ptr flag
- contributing/source-wrappers.md: add PTR wrapper to the chain
- mkdocs.yml: add PTR Records navigation entry
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
* feat(rfc2136)!: remove rfc2136-create-ptr in favor of create-ptr
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
---------
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
* test(pdns): regex pitfalls in domain-filter zone partitioning
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* test(pdns): regex pitfalls in domain-filter zone partitioning
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* test(pdns): regex pitfalls in domain-filter zone partitioning
I'll enable https://github.com/ldez/usetesting
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
* test(pdns): regex pitfalls in domain-filter zone partitioning
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* test(pdns): regex pitfalls in domain-filter zone partitioning
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* test(pdns): regex pitfalls in domain-filter zone partitioning
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* test(pdns): regex pitfalls in domain-filter zone partitioning
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* test(pdns): regex pitfalls in domain-filter zone partitioning
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* docs(regexfilter): pitfalls in domain-filter zone partitioning
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
* docs(regexfilter): pitfalls in domain-filter zone partitioning
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
* refactor(controller): move provider construction to provider/factory package
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactor(controller): move provider construction to provider/factory package
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactor(provider): introduce factory package with per-provider New constructors
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactor(provider): introduce factory package with per-provider New constructors
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactor(provider): introduce factory package with per-provider New constructors
* refactor(provider): introduce factory package with per-provider New constructors
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactor(provider): introduce factory package with per-provider New constructors
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* fix(pdns): ensure trailing dot for NS records
* Fix formatting test typos, make trailing types to list, refer to types with const
* Simplify trailing dot condition
* Move trailing types comment to correct location
PNDS provider is the only one which uses MatchParent functionality. The
MatchParent functionality breaks domain and regex domain filters. It
also makes PDNS provider behave differently than other providers while
having the same configuration. MatchParent can be replaced by using
multiple domain filters. After discussion with maintainers we concluded
that MatchParent should be removed.
All of the providers have TLS enabled by default so this change will
make PDNS provider behave as exected. Additionally, enabling TLS
by default is a good practice and previous bahaviour was a bit
misleading. It was possible to pass `--tls-ca` without
`--pdns-tls-enabled` and the PDNS provider would ignore the tls and
instantiate client with disabled tls. This change adds a flag to disable
the tls: `--pdns-skip-tls-verify`. Similar flag is used by pihole and
bluecat providers.
Additionaly this change makes providing custom TLS CA optional. It if is
not provided. A system certificates will be used. This makes PDNS behave
the same as other providers.
If you had an RRSet that contained multiple records, the provider would
end up generating multiple endpoints where really it needs to produce a
single endpoint with multiple targets.