---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: tags.tagger.dev
spec:
  group: tagger.dev 
  names:
    kind: Tag
    listKind: TagList
    plural: tags
    singular: tag
  preserveUnknownFields: false
  scope: Namespaced
  versions:
  - name: v1beta1
    served: true
    storage: true
    additionalPrinterColumns:
    - description: Current generation
      jsonPath: .spec.generation
      name: generation
      type: integer
    - description: Mirroring
      jsonPath: .spec.mirror
      name: mirror
      type: boolean
    - description: Current image source
      jsonPath: .spec.from
      name: from
      type: string
    subresources:
      status: {}
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            properties:
              from:
                type: string
              generation:
                type: integer
              mirror:
                type: boolean
          status:
            type: object
            properties:
              generation:
                type: integer
              references:
                type: array
                nullable: true
                items:
                  type: object
                  properties:
                    generation:
                      type: integer
                    from:
                      type: string
                    importedAt:
                      type: string
                    imageReference:
                      type: string
              lastImportAttempt:
                type: object
                properties:
                  when:
                    type: string
                    nullable: true
                  succeed:
                    type: boolean
                  reason:
                    type: string
