Files
coredns-manager-operator/config/crd/bases/monkale.monkale.io_dnszones.yaml
105cf45897 Bug fix complex ns1 hostname (#10) (#11)
* Update issue templates

* remove bug template

* Create SECURITY.md

* docs - add medium article.

* bugFix - fix validation expression; regen manifests

* security: update version

* update to 1.0.3

* qa - new test scenario

* changelog - 1.0.3

---------

Co-authored-by: Nikolay Udovik <[email protected]>
2024-06-13 13:46:06 -05:00

258 lines
12 KiB
YAML

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: dnszones.monkale.monkale.io
spec:
group: monkale.monkale.io
names:
kind: DNSZone
listKind: DNSZoneList
plural: dnszones
singular: dnszone
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Domain name
jsonPath: .spec.domain
name: Domain Name
type: string
- description: Record Count. Without SOA and First NS
jsonPath: .status.recordCount
name: Record Count
type: integer
- description: Last Change
jsonPath: .status.conditions[?(@.type=="Ready")].lastTransitionTime
name: Last Change
type: string
- description: Represents the current version of the zonefile
jsonPath: .status.currentZoneSerial
name: Current Serial
type: string
- description: DNSZone state
jsonPath: .status.conditions[?(@.type=="Ready")].reason
name: State
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: DNSZone is the Schema for the dnszones API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: DNSZoneSpec defines the desired state of DNSZone. DNSZoneSpec
creates the new zone file with the SOA record. DNSZoneSpec creates DNSRecords
of type NS.
properties:
cmPrefix:
default: coredns-zone-
description: cmPrefix specifies the prefix for the zone file configmap.
The default value is coredns-zone-. The CM Name format is "prefix"
+ "metadata.name",
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(-)?$
type: string
connectorName:
description: connectorName is the pointer to the DNSConnector Resource.
Must contain the name of the DNSConnector Resource.
type: string
domain:
description: domain specifies domain in which DNSRecors are valid.
type: string
expireTime:
default: 1209600
description: expireTime defines how long the secondary server should
wait before discarding the zone data if it cannot reach the primary
server. The default value is 1209600 seconds (2 weeks)
type: integer
minimumTTL:
default: 86400
description: minimumTTL is the minimum amount of time that should
be allowed for caching the DNS records. If individual records do
not specify a TTL, this value should be used. The default value
is 86400 seconds (24 hours)
type: integer
primaryNS:
description: primaryNS defines NS record for the zone, and its A/AAAA
record.
properties:
hostname:
default: ns1
description: hostname is the server name of the primary name server
for this zone. The default value is "ns1".
maxLength: 253
minLength: 1
pattern: ^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*$
type: string
ipAddress:
description: ipAddress defines IP address to the dns server where
the zone hosted. If the zone is managed by k8s coredns specify
IP of kubernetes lb/node. Provide either ipv4, or ipv6.
type: string
recordType:
default: A
description: recordType defines the type of the record to be created
for the NS's A record. In case of ipv6 set it to "AAAA". The
default value is "A".
enum:
- A
- AAAA
type: string
required:
- ipAddress
- recordType
type: object
refreshRate:
default: 7200
description: refreshRate defines the time a secondary DNS server waits
before querying the primary DNS server to check for updates. If
the zone file has changed, secondary servers will refresh their
data. these records should be cached by DNS resolvers. The default
value is 7200 seconds (2 hours)
type: integer
respPersonEmail:
description: respPersonEmail is responsible party's email for the
domain. Typically formatted as [email protected] but represented
with a dot (.) instead of an at (@) in DNS records. The first dot
separates the user name from the domain.
pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$
type: string
retryInterval:
default: 3600
description: retryInterval defines how long secondary server failed
should wait before trying again to reconnect to the primary again.
The default value is 3600 seconds (1 hour)
type: integer
ttl:
default: 86400
description: ttl specified default Time to Lieve for the zone's records,
indicates how long these records should be cached by DNS resolvers.
The default value is 86400 seconds (24 hours)
type: integer
required:
- domain
- primaryNS
- respPersonEmail
type: object
status:
description: DNSZoneStatus defines the observed state of DNSZone
properties:
checkpoint:
description: checkpoint flag indicates whether the DNSZone was previously
active. This flag is used to instruct the DNSConnector to preserve
the old version of the DNSZone in case the update process encounters
an issue.
type: boolean
conditions:
description: conditions indidicate the status of a DNSZone.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be when
the underlying condition changed. If that is not known, then
using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if .metadata.generation
is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values and
meanings for this field, and whether the values are considered
a guaranteed API. The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be useful
(see .node.status.conditions), the ability to deconflict is
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
currentZoneSerial:
default: "000000001"
description: currentZoneSerial is a version number that changes update
of the zone file, signaling to secondary DNS servers when they should
synchronize their data. In our reality we use it to represent the
zone file version. Zone Serial implemented as time now formatted
to MMDDHHMMSS. Zone Serial represents the current version of the
zone file.
type: string
recordCount:
default: 0
description: recordCount is the number of records in the zone. Does
not include SOA and NS.
type: integer
validationPassed:
description: validationPassed displays whether the zonefile passed
syntax validation check
type: boolean
zoneConfigmap:
description: zoneConfigmap displays the name of the generated zone
config map
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}