DNSZone

DNSZone is a recorded grant of authority over a name space: the stone kept in the temple.

API versionkudurru.io/v1alpha1
KindDNSZone
ScopeCluster
Resourcednszones.kudurru.io
Short nameszone
Subresourcesstatus

Columns of kubectl get dnszones:

ColumnTypeValue
ZONEstring.spec.zoneName
TYPEstring.spec.type
SERIALinteger.status.serial
RECORDSinteger.status.recordCount
READYstring.status.conditions[?(@.type=="Ready")].status
AGEdate.metadata.creationTimestamp

Spec

DNSZoneSpec defines the desired state of a zone.

Validation: fallback is only supported for primary zones (!has(self.fallback) || self.type == 'primary')

Validation: secondary zones require secondary configuration (self.type != 'secondary' || has(self.secondary))

Validation: stub zones require nameserver configuration (self.type != 'stub' || has(self.stub))

FieldTypeDescription
spec.defaultTTLintegerDefault: 300
Format: int32
spec.dnssecobjectDNSSECSpec is reserved for v1.0 signing. The schema exists so that the seam is in place (dev-docs/design-record.md §13.1).
spec.dnssec.algorithmstringDefault: ECDSAP256SHA256
One of: ECDSAP256SHA256, ED25519
spec.dnssec.denialstringDefault: nsec
One of: nsec, nsec3
spec.dnssec.enabledbooleanRequired.
spec.dnssec.keySecretRefobjectObjectRef points at another kudurru object. Namespace is omitted for cluster-scoped kinds and for same-namespace references.
spec.dnssec.keySecretRef.namestringRequired.
Length: at least 1
spec.dnssec.keySecretRef.namespacestring
spec.externalobjectExternalSpec synthesizes records from Kubernetes objects (v0.2, D402). It takes effect only when the server runs with externalZones.enabled on the Kubernetes store driver. The elected replica derives one DNSRecordSet per source object and zone in the source's namespace; the zone's recordSetSelector decides which namespaces and labels may contribute (derived record sets carry the source's labels). Names are placed in the external zone with the longest matching apex. Sources are only read. The external-dns annotations external-dns.kubernetes.io/hostname, /target and /ttl (and their external-dns.alpha.kubernetes.io forms) add names, replace targets and set the TTL.
spec.external.gatewaybooleanGateway publishes the hostnames of Gateway API HTTPRoutes, GRPCRoutes and TLSRoutes that a parent Gateway has accepted, at that Gateway's status addresses. A route without hostnames uses its listener's.
spec.external.ingressbooleanIngress publishes networking.k8s.io/v1 Ingress rule and TLS hosts at the addresses in the Ingress status.
spec.external.loadBalancerServicesbooleanLoadBalancerServices publishes Services of type LoadBalancer that carry a hostname annotation, at their load balancer addresses.
spec.fallbackobjectFallback enables public resolution for names not defined locally. Omit it to remain authoritative for the entire zone. Generated apex SOA/NS records do not suppress fallback for other types at an unconfigured apex. Zones with fallback do not support zone transfers or NOTIFY.
spec.fallback.upstreamGroupstringUpstreamGroup selects a forwarding or recursive group. Empty uses normal resolver routing (client policy, conditional forwarding, then default).
spec.forwardobjectForwardSpec configures a forward zone.
spec.forward.dnssecValidationbooleanDNSSECValidation overrides the global dnssec.enabled default for this route. Omit it to inherit the default.
spec.forward.upstreamGroupstringUpstreamGroup names a group in the Kudurru settings.
Default: default
spec.nameservers[]string
spec.policyobjectZonePolicy controls who may query, transfer, be notified about and update the zone.
spec.policy.notifystringNotifyMode selects where NOTIFY messages are sent on serial change.
Default: none
One of: none, zoneNameServers, specified, both
spec.policy.notifySourcestringNotifySource is the local unicast IPv4/IPv6 address for outbound NOTIFY. Empty inherits notify.source, then the system-selected source if unset. No hostnames, ports, scoped or IPv4-mapped IPv6 addresses are accepted. Bind or address-family failure never falls back to another source.
Length: at most 45
Validation: must be empty or an unscoped unicast IPv4 or IPv6 address (self == '' || (isIP(self) && (ip(self).isGlobalUnicast() || ip(self).isLoopback() || ip(self).isLinkLocalUnicast())))
spec.policy.notifyTSIGKeyRefstringNotifyTSIGKeyRef selects the key for outbound NOTIFY independently of transfer authorization. Empty uses the first transferTSIGKeyRefs key; with neither configured NOTIFY is unsigned. A selected unavailable key fails delivery, without falling back to another key or unsigned traffic.
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: at most 254
Validation: must fit a DNS key name of 253 characters plus an optional trailing dot (self.endsWith('.') || size(self) <= 253)
spec.policy.notifyTargets[]string
spec.policy.queryACL[]stringQueryACL entries are CIDRs, optionally negated with a leading "!". Ordered, first match wins, default deny.
spec.policy.queryAccessstringAccessMode is Technitium's six-way access vocabulary applied to queries, transfers and dynamic updates.
Default: allow
One of: deny, allow, allowOnlyPrivate, allowOnlyZoneNameServers, useNetworkACL, zoneNameServersAndACL
spec.policy.transferACL[]string
spec.policy.transferTSIGKeyRefs[]string
spec.policy.updatestringUpdate controls RFC 2136 dynamic updates (v0.2).
Default: deny
One of: deny, allow, allowOnlyPrivate, allowOnlyZoneNameServers, useNetworkACL, zoneNameServersAndACL
spec.policy.updatePolicies[]object
spec.policy.updatePolicies[].namestringRequired. Name is an owner name or wildcard pattern within the zone.
spec.policy.updatePolicies[].tsigKeyRefstringRequired.
spec.policy.updatePolicies[].types[]string
spec.policy.zoneTransferstringAccessMode is Technitium's six-way access vocabulary applied to queries, transfers and dynamic updates.
Default: deny
One of: deny, allow, allowOnlyPrivate, allowOnlyZoneNameServers, useNetworkACL, zoneNameServersAndACL
spec.publish[]object
spec.publish[].integrationRefobjectRequired. ObjectRef points at another kudurru object. Namespace is omitted for cluster-scoped kinds and for same-namespace references.
spec.publish[].integrationRef.namestringRequired.
Length: at least 1
spec.publish[].integrationRef.namespacestring
spec.publish[].policystringDefault: sync
One of: sync, upsert-only, create-only
spec.publish[].selectorobjectA label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
spec.publish[].selector.matchExpressions[]objectmatchExpressions is a list of label selector requirements. The requirements are ANDed.
spec.publish[].selector.matchExpressions[].keystringRequired. key is the label key that the selector applies to.
spec.publish[].selector.matchExpressions[].operatorstringRequired. operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
spec.publish[].selector.matchExpressions[].values[]stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
spec.publish[].selector.matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
spec.publish[].types[]string
spec.recordSetSelectorobjectRecordSetSelector restricts which DNSRecordSets may add records to the zone.
spec.recordSetSelector.labelSelectorobjectA label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
spec.recordSetSelector.labelSelector.matchExpressions[]objectmatchExpressions is a list of label selector requirements. The requirements are ANDed.
spec.recordSetSelector.labelSelector.matchExpressions[].keystringRequired. key is the label key that the selector applies to.
spec.recordSetSelector.labelSelector.matchExpressions[].operatorstringRequired. operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
spec.recordSetSelector.labelSelector.matchExpressions[].values[]stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
spec.recordSetSelector.labelSelector.matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
spec.recordSetSelector.namespaces[]string
spec.secondaryobjectSecondarySpec configures a secondary zone (v0.2).
spec.secondary.primaries[]stringRequired. Primaries are ordered hostnames or IP addresses with optional ports (default 53). Use brackets around IPv6 addresses when specifying a port.
Items: at least 1
spec.secondary.transferProtocolstringTransferProtocol selects TCP or TLS with certificate and endpoint-name verification against the node's trust store. There is no plaintext fallback. Both protocols default to port 53; specify :853 for a standard TLS endpoint.
Default: tcp
One of: tcp, tls
spec.secondary.tsigKeyRefstringTSIGKeyRef names a key configured in every replica's local keyring.
spec.soaobjectSOASpec holds primary-zone SOA fields. The leader computes primary serials in status (D12); secondaries retain the external primary's complete SOA.
spec.soa.expireintegerDefault: 1209600
Format: int32
spec.soa.minimumintegerDefault: 300
Format: int32
spec.soa.mnamestring
spec.soa.refreshintegerDefault: 3600
Format: int32
spec.soa.retryintegerDefault: 900
Format: int32
spec.soa.rnamestring
spec.stubobjectStubSpec configures node-local authoritative-server discovery. It does not transfer the full zone or enable general iterative resolution.
spec.stub.nameservers[]stringRequired. Nameservers bootstrap SOA/NS/glue discovery outside the query path. Entries are hostnames or IP addresses with optional ports (default 53), optionally prefixed with udp:// or tcp://. UDP retries TCP on truncation; explicit TCP stays TCP. TLS is not supported for stub discovery. Discovered nameservers inherit the bootstrap transport and port.
Items: 1 to 16
spec.typestringRequired. ZoneType selects how a zone gets its data.
One of: primary, forward, secondary, stub, external, catalog, secondaryCatalog
spec.zoneNamestringRequired. ZoneName is the fully qualified zone name with a trailing dot.
Pattern: ^([a-zA-Z0-9_-]+\.)*$|^\.$
Length: at least 1
Validation: zoneName is immutable (self == oldSelf)

Status

DNSZoneStatus is the observed state of a zone.

FieldTypeDescription
status.conditions[]ConditionList type: map, keyed by type
status.contentHashstringContentHash is the sha256 of the canonical served RRsets. With committed primary status, it includes dynamic records from the exact durable head.
status.nameserverAddresses[]string
status.observedGenerationintegerFormat: int64
status.published[]object
status.published[].conflictsinteger
status.published[].driftinteger
status.published[].integrationstringRequired.
status.published[].lastSyncTimestringFormat: date-time
status.published[].managedinteger
status.recordCountinteger
status.serialintegerSerial describes committed primary data when the committed-status adapter is installed. Legacy controllers stamp max(prev+1, unix_now) when content changes. Secondary serials and counts belong to each replica's transferred data, not this shared status.
Format: int32

Example

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

apiVersion: kudurru.io/v1alpha1
kind: DNSZone
metadata:
  name: home-example-com
spec:
  zoneName: home.example.com.
  type: primary
  soa:
    mname: ns1.home.example.com.
    rname: hostmaster.example.com.
    refresh: 3600
    retry: 900
    expire: 1209600
    minimum: 300
  nameservers: [ns1.home.example.com., ns2.home.example.com.]
  policy:
    queryAccess: allow
    zoneTransfer: useNetworkACL
    transferACL: ["10.0.0.0/8"]
    notify: zoneNameServers
    update: deny
  recordSetSelector:
    namespaces: [dns, apps]
  # v0.2 split-horizon: publish labelled records to a Cloudflare sink.
  # publish:
  #   - integrationRef: { name: cf-public, namespace: dns }
  #     selector: { matchLabels: { kudurru.io/publish: cloudflare } }
  #     types: [A, AAAA, CNAME, TXT, MX, SRV, CAA]
  #     policy: sync

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