apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: dnsowners.dns.gardener.cloud
  labels:
    gardener.cloud/deletion-protected: "true"
spec:
  group: dns.gardener.cloud
  names:
    kind: DNSOwner
    listKind: DNSOwnerList
    plural: dnsowners
    shortNames:
      - dnso
    singular: dnsowner
  scope: Cluster
  versions:
    - additionalPrinterColumns:
        - jsonPath: .spec.ownerId
          name: OwnerId
          type: string
        - jsonPath: .spec.active
          name: Active
          type: boolean
        - jsonPath: .status.entries.amount
          name: Usages
          type: integer
        - description: expiration date
          format: date-time
          jsonPath: .spec.validUntil
          name: Valid
          type: string
        - description: creation timestamp
          jsonPath: .metadata.creationTimestamp
          name: AGE
          type: date
      name: v1alpha1
      schema:
        openAPIV3Schema:
          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:
              properties:
                active:
                  description: state of the ownerid for the DNS controller observing entry using this owner id (default:true)
                  type: boolean
                ownerId:
                  description: owner id used to tag entries in external DNS system
                  type: string
                validUntil:
                  description: optional time this owner should be active if active flag is not false
                  format: date-time
                  type: string
              required:
                - ownerId
              type: object
            status:
              properties:
                entries:
                  description: Entry statistic for this owner id
                  properties:
                    amount:
                      description: number of entries using this owner id
                      type: integer
                    types:
                      additionalProperties:
                        type: integer
                      description: number of entries per provider type
                      type: object
                  type: object
              type: object
          required:
            - spec
          type: object
      served: true
      storage: true
      subresources:
        status: {}