{
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "DNSRecordSpec defines the desired state of DNSRecord",
      "properties": {
        "endpoint": {
          "description": "Endpoint is a high-level way of a connection between a service and an IP",
          "properties": {
            "dnsName": {
              "description": "DNSName is the hostname of the DNS record. It is at most 253 characters, or 254\nwritten as an absolute name with a trailing dot.",
              "maxLength": 254,
              "minLength": 1,
              "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_])?\\.?$",
              "type": "string",
              "x-kubernetes-validations": [
                {
                  "message": "dnsName must be at most 253 characters, or 254 including the trailing dot",
                  "rule": "self.size() <= (self.endsWith('.') ? 254 : 253)"
                }
              ]
            },
            "labels": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "Labels stores labels defined for the Endpoint",
              "type": "object"
            },
            "providerSpecific": {
              "description": "ProviderSpecific stores provider specific config",
              "items": {
                "description": "ProviderSpecificProperty holds the name and value of a configuration which is specific to individual DNS providers",
                "properties": {
                  "name": {
                    "description": "Name of the provider-specific property. Accepted names are provider\ndependent; see the tutorial for the provider in use.",
                    "maxLength": 253,
                    "minLength": 1,
                    "type": "string"
                  },
                  "value": {
                    "description": "Value of the provider-specific property.",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "maxItems": 100,
              "type": "array"
            },
            "recordTTL": {
              "description": "RecordTTL is the TTL of the record in seconds. 0 means \"not set\" and lets\nthe provider apply its own default. The upper bound is the RFC 2181 \u00a78 maximum.",
              "format": "int64",
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer"
            },
            "recordType": {
              "description": "RecordType is the DNS record type.",
              "enum": [
                "A",
                "AAAA",
                "CNAME",
                "DNAME",
                "MX",
                "NAPTR",
                "NS",
                "PTR",
                "SRV",
                "TLSA",
                "TXT"
              ],
              "type": "string"
            },
            "setIdentifier": {
              "description": "SetIdentifier distinguishes multiple records with the same name and type\n(e.g. Route53 records with routing policies other than 'simple').",
              "maxLength": 255,
              "type": "string"
            },
            "targets": {
              "description": "Targets are the values the DNS record points to. Leaving it empty is only\nmeaningful when --default-targets is configured.",
              "items": {
                "maxLength": 4096,
                "minLength": 1,
                "type": "string"
              },
              "maxItems": 1000,
              "type": "array"
            }
          },
          "required": [
            "dnsName",
            "recordType"
          ],
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "SRV targets must be '<priority> <weight> <port> <host>' with an absolute host, e.g. '10 5 5060 sip.example.com.'",
              "rule": "self.recordType != 'SRV' || !has(self.targets) || self.targets.all(t, t.endsWith('.'))"
            },
            {
              "message": "NAPTR targets must be absolute and end with a dot",
              "rule": "self.recordType != 'NAPTR' || !has(self.targets) || self.targets.all(t, t.endsWith('.'))"
            },
            {
              "message": "PTR dnsName must be a reverse DNS name under .in-addr.arpa or .ip6.arpa, written without a trailing dot, e.g. '1.0.0.10.in-addr.arpa'",
              "rule": "self.recordType != 'PTR' || self.dnsName.lowerAscii().endsWith('.in-addr.arpa') || self.dnsName.lowerAscii().endsWith('.ip6.arpa')"
            }
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "endpoint"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "DNSRecordStatus defines the observed state of DNSRecord",
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observations of the DNSRecord state.",
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis 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.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith 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.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis 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.",
                "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",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
