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.

FieldTypeDescription
spec.defaultTTLintegerDefault: 300
Format: int32
spec.dnssecobjectDNSSECSpec is reserved for v1.0 signing. The schema exists so that the seam is in place (docs/architecture.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 synthesises records from Kubernetes objects (v0.2).
spec.external.gatewayboolean
spec.external.ingressboolean
spec.external.loadBalancerServicesboolean
spec.forwardobjectForwardSpec configures a forward zone.
spec.forward.dnssecValidationboolean
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.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.
spec.secondary.transferProtocolstringDefault: tcp
One of: tcp, tls
spec.secondary.tsigKeyRefstring
spec.soaobjectSOASpec holds the SOA fields the operator controls. The serial is computed by the leader and lives in status (decision D12).
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 a stub zone (v0.2).
spec.stub.nameservers[]stringRequired.
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 RRsets.
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 is stamped by the leader as max(prev+1, unix_now) whenever ContentHash changes. Replicas serve this value.
Format: int32

Example

config/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: site/content/reference/crds/dnszone.md