---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: corednsentries.coredns.mandelsoft.org
spec:
  group: coredns.mandelsoft.org
  names:
    kind: CoreDNSEntry
    listKind: CoreDNSEntryList
    plural: corednsentries
    shortNames:
    - cdnse
    singular: corednsentry
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.dnsNames
      name: DNSNames
      type: string
    - jsonPath: .spec.A
      name: A
      type: string
    - jsonPath: .spec.CNAME
      name: CNAME
      type: string
    - jsonPath: .spec.SRV.service
      name: SRV
      type: string
    - jsonPath: .status.state
      name: State
      type: string
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: CoreDNSEntry describes an additional coredns dns entry
        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: CoreDNSSpec is  the specification for an dns entry object
            properties:
              A:
                items:
                  type: string
                type: array
              AAAA:
                items:
                  type: string
                type: array
              CNAME:
                type: string
              SRV:
                description: ServiceSpec describes a service's SRV records
                properties:
                  records:
                    items:
                      description: SRVRecord is a service record
                      properties:
                        host:
                          description: Target of the service record
                          type: string
                        port:
                          description: Port of the service record
                          type: integer
                        priority:
                          description: Priority of the service record
                          type: integer
                        protocol:
                          description: Protocol of the service record (UDP/TCP)
                          type: string
                        weight:
                          description: Weight of the service record
                          type: integer
                      required:
                      - host
                      - port
                      - protocol
                      type: object
                    type: array
                  service:
                    type: string
                required:
                - records
                - service
                type: object
              TXT:
                items:
                  type: string
                type: array
              dnsNames:
                description: DNSNames is a list of DNSNames
                items:
                  type: string
                type: array
            required:
            - dnsNames
            type: object
          status:
            description: CoreDNSStatus describes the statuso an entry
            properties:
              message:
                description: Error message in case of an invalid entry
                type: string
              state:
                description: State of the dns entry object
                type: string
            type: object
        required:
        - spec
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
