Skip to content

Warnings on field format

Deal with canonical names

For some resources such as CNAME, PTR, MX, SRV, the records field MUST be in canonical format (end with a dot "."). See following examples.

CNAME

---
apiVersion: dns.cav.enablers.ob/v1alpha1
kind: RRset
metadata:
  name: test4.helloworld.com
spec:
  type: CNAME
  name: test4
  ttl: 300
  records:
    - test1.helloworld.com.
  zoneRef:
    name: helloworld.com

PTR

---
apiVersion: dns.cav.enablers.ob/v1alpha1
kind: RRset
metadata:
  name: 1.1.168.192.in-addr.arpa.helloworld.com
spec:
  type: PTR
  name: "1"
  ttl: 300
  records:
    - mailserver.helloworld.com.
  zoneRef:
    name: 1.168.192.in-addr.arpa

MX

---
apiVersion: dns.cav.enablers.ob/v1alpha1
kind: RRset
metadata:
  name: mx.helloworld.com
spec:
  type: MX
  name: "helloworld.com."
  ttl: 300
  records:
    - "10 mailserver1.helloworld.com."
    - "20 mailserver2.helloworld.com."
  zoneRef:
    name: helloworld.com

SRV

---
apiVersion: dns.cav.enablers.ob/v1alpha1
kind: RRset
metadata:
  name: database.srv.helloworld.com
spec:
  type: SRV
  name: "_database._tcp.myapp"
  ttl: 300
  records:
    - 1 50 25565 test2.helloworld.com.
  zoneRef:
    name: helloworld.com

TXT Records

Sometime, you may encounter the following error when applying a RRset custom resource:

status:
  syncErrorDescription: 'Record helloworld.com./TXT ''Welcome to the helloworld.com
    domain'': Parsing record content (try ''pdnsutil check-zone''): Data field in
    DNS should start with quote (") at position 0 of ''Welcome to the helloworld.com
    domain'''
  syncStatus: Failed

This error is due to a wrong format for the RRset.
TXT records MUST start AND end with an escaped quote (\"). See following example.

---
apiVersion: dns.cav.enablers.ob/v1alpha1
kind: RRset
metadata:
  name: txt.helloworld.com
spec:
  type: TXT
  name: "helloworld.com."
  ttl: 300
  records:
    - "\"Welcome to the helloworld.com domain\""
  zoneRef:
    name: helloworld.com