BlockList

BlockList is a named, refreshable set of block or allow entries.

API versionkudurru.io/v1alpha1
KindBlockList
ScopeNamespaced
Resourceblocklists.kudurru.io
Short namesblocklist
Subresourcesstatus

Columns of kubectl get blocklists:

ColumnTypeValue
MODEstring.spec.mode
ENTRIESinteger.status.entries
LAST-FETCHdate.status.lastFetched
READYstring.status.conditions[?(@.type=="Ready")].status

Spec

BlockListSpec defines a set of sources compiled into one matcher chain.

Validation: response customIP requires the customIP block (!has(self.response) || self.response != 'customIP' || has(self.customIP))

Validation: RPZ sources require block mode (!has(self.mode) || self.mode != 'allow' || self.sources.all(s, !has(s.rpz)))

FieldTypeDescription
spec.clientGroupRefs[]stringClientGroupRefs restricts this list to clients whose captured winning membership includes at least one of these namespace-local groups. It does not attach policies or grant identity. Omitted means unrestricted, except ui-allow-<group>/ui-deny-<group> retain their legacy group scope.
Items: at most 64
List type: set
spec.customIPobjectCustomIP is the answer for BlockResponse customIP.
spec.customIP.v4string
spec.customIP.v6string
spec.modestringListMode says whether entries block or allow.
Default: block
One of: block, allow
spec.refreshIntervalstringRefreshInterval overrides blocking.refreshInterval for this list. When omitted, the current cluster default applies, including hot reloads.
spec.responsestringBlockResponse is how a blocked query is answered: nxdomain, zeroIP (0.0.0.0 / ::), refused, customIP (the customIP addresses) or blockPage (the addresses of the block page listener, blockPage.ipv4/ipv6, so browsers show why the name is blocked).
One of: nxdomain, zeroIP, refused, customIP, blockPage
spec.sources[]objectRequired.
Items: 1 to 256
spec.sources[].configMapRefobjectObjectRef points at another kudurru object. Namespace is omitted for cluster-scoped kinds and for same-namespace references.
spec.sources[].configMapRef.namestringRequired.
Length: at least 1
spec.sources[].configMapRef.namespacestring
spec.sources[].enabledbooleanEnabled false switches this one source off without removing it, like Pi-hole's per-adlist switch: it is not fetched and not compiled, its cached body and status digest are kept, and status.sources[] reports it with enabled: false. Omitted means true. The kudurru.io/enabled annotation switches the whole list off.
spec.sources[].entries[]objectEntries are structured entries (value, type, switch, comment, provenance), as the dashboard's Allowlist and Denylist write them. They compile as adblock rules; format and subdomains do not apply.
Items: at most 10000
spec.sources[].entries[].commentstringLength: at most 500
spec.sources[].entries[].createdstringFormat: date-time
spec.sources[].entries[].createdBystringCreatedBy is the actor that added the entry ("user:alice").
Length: at most 300
spec.sources[].entries[].enabledbooleanEnabled false keeps the entry without applying it. Omitted means true.
spec.sources[].entries[].modifiedstringFormat: date-time
spec.sources[].entries[].originstringEntryOrigin records how a structured entry was added.
One of: manual, querylog, unblock, api, migrated
spec.sources[].entries[].requeststringRequest is the UnblockRequest ("namespace/name") whose approval added the entry.
Length: at most 300
spec.sources[].entries[].typestringEntryType is how a structured list entry matches.
Default: exact
One of: exact, wildcard, regex
spec.sources[].entries[].valuestringRequired. Value is the canonical form for Type: "ads.example.com" (exact), "*.example.com" (wildcard) or the RE2 expression without slashes (regex).
Length: 1 to 1024
spec.sources[].exclude[]stringExclude switches off single entries of this source without editing it, also for URL and ConfigMap sources: each value is a rule as the source's format normalises it ("ads.example.com" for a hosts line "0.0.0.0 ads.example.com", "||ads.example.com^", "/regex/"), as GET /blocklists/{namespace}/{name}/sources/{source}/entries lists them. Excluded rules are not compiled; the exclusions survive refreshes, and values that match nothing in the current body are reported in status.sources[].staleExcludes.
Items: at most 10000
List type: set
spec.sources[].formatstringListFormat is the syntax of a blocklist source.
Default: auto
One of: auto, hosts, domains, adblock, regex, rpz
spec.sources[].inline[]string
spec.sources[].namestring
spec.sources[].rpzobjectRPZ transfers a complete policy zone using AXFR/IXFR. Missing or expired enabled data fails closed for policies selecting this required source.
spec.sources[].rpz.primaries[]stringRequired. Primaries are ordered transfer endpoints (host or host:port). IPv6 endpoints with a port use brackets. TLS verifies the endpoint hostname.
Items: 1 to 32
spec.sources[].rpz.transferProtocolstringDefault: tcp
One of: tcp, tls
spec.sources[].rpz.tsigKeyRefstringTSIGKeyRef names an operator-managed key, never secret material.
Length: at most 253
spec.sources[].rpz.zoneNamestringRequired. ZoneName is the non-root absolute policy-zone origin.
Pattern: ^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.?$
Length: 1 to 253
spec.sources[].subdomainsbooleanSubdomains makes the hosts and plain-domain entries of this source match their subdomains too, for lists published as "domains with subdomains". Adblock and wildcard rules are not affected.
spec.sources[].urlstring

Status

BlockListStatus is the observed state of a block list.

FieldTypeDescription
status.conditions[]ConditionList type: map, keyed by type
status.entriesinteger
status.invalidinteger
status.lastFetchedstringFormat: date-time
status.observedGenerationintegerFormat: int64
status.ruleCountinteger
status.sources[]object
status.sources[].digeststringDigest is the sha256 of the fetched body; replicas pull by digest from the leader (decision D15).
status.sources[].enabledbooleanEnabled is false for a source switched off with spec.sources[].enabled and absent otherwise. A disabled source keeps the digest, etag, lastFetched and counts of its last fetch and reports no error; status.entries leaves it out.
status.sources[].entriesinteger
status.sources[].errorstring
status.sources[].etagstring
status.sources[].excludedintegerExcluded counts the entries of this source that are switched off (spec.sources[].exclude hits, or entries with enabled: false); they are not in Entries.
status.sources[].invalidinteger
status.sources[].lastFetchedstringFormat: date-time
status.sources[].namestringRequired.
status.sources[].staleExcludes[]stringStaleExcludes are spec.sources[].exclude values that match no rule of the current body (at most 50): the list dropped the entry, or the value is not written the way the source's format normalises it.
status.unsupportedintegerUnsupported counts valid rules this version parses but does not apply, including hosts rewrites and RPZ triggers requiring resolver NS provenance. Supported modifiers are not counted as unsupported.

Example

deploy/kustomize/samples/kudurru.io_v1alpha1_blocklist.yaml:

apiVersion: kudurru.io/v1alpha1
kind: BlockList
metadata:
  name: default-ads
  namespace: dns
spec:
  mode: block
  sources:
    - url: https://big.oisd.nl/
      format: auto
  refreshInterval: 24h

Source: docs-site/content/reference/crds/blocklist.md