Files
matsandClaude Sonnet 5.5 88479b9a12 Add AddressOverride and DomainRule objects for what lived in a ConfigMap and the config file
The address redirects page rewrote an RPZ ConfigMap through the resolver's own
service account, and the domains page rewrote allow_entries/block_entries in the
config file. Both become cluster objects like the rest.

AddressOverride is one name answered with fixed addresses (the name and
everything under it), exactly what an RPZ "name A address" line did. DomainRule
is a block or allow list of inline names. The resolver reads both with the
existing watch: overrides are rendered into the managed RPZ source the blocklist
manager already has, and rule names join the config's inline entries in the
merged overlay, so the file's config is never written to.

Names are checked to be DNS names or wildcard patterns before they are used,
because they are joined into line-oriented parser input and a newline or a
comment character in one would otherwise add a rule of its own.

The console edits both: the address-overrides and domains endpoints now write
objects. The console keeps its added rules in one DomainRule per action
(inline-block, inline-allow) instead of an object per name, and removes a name
from whichever DomainRule holds it, wildcard or not. An end-to-end test drives
the pages' endpoints and checks the resolver's answers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 10:08:08 +02:00

55 lines
1.1 KiB
YAML

apiVersion: fancydns.k6n.net/v1alpha1
kind: DNSZone
metadata:
name: home
namespace: dns
spec:
zone: home.example.com
ttl: 300
records:
- {name: "@", type: NS, value: ns1.home.example.com.}
- {name: ns1, type: A, value: 10.0.0.53}
- {name: nas, type: A, value: 10.0.0.20}
- {name: "*.apps", type: A, value: 10.0.0.30}
---
apiVersion: fancydns.k6n.net/v1alpha1
kind: ClientGroup
metadata:
name: kids
namespace: dns
spec:
priority: 10
policy: block_only
match:
cidrs: [10.0.20.0/24]
deny_domains: ["**.tiktok.com"]
---
apiVersion: fancydns.k6n.net/v1alpha1
kind: BlockList
metadata:
name: stevenblack
namespace: dns
spec:
url: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
format: hosts
refresh: 24h
categories: [ads, malware]
---
apiVersion: fancydns.k6n.net/v1alpha1
kind: AddressOverride
metadata:
name: k6n-net
namespace: dns
spec:
domain: k6n.net
addresses: [10.10.3.10]
---
apiVersion: fancydns.k6n.net/v1alpha1
kind: DomainRule
metadata:
name: inline-block
namespace: dns
spec:
action: block
names: ["*.tracker.example"]