apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: clusterimageexports.raczylo.com
  annotations:
    controller-gen.kubebuilder.io/version: v0.17.1
  labels:
  {{- include "chart.labels" . | nindent 4 }}
spec:
  group: raczylo.com
  names:
    kind: ClusterImageExport
    listKind: ClusterImageExportList
    plural: clusterimageexports
    singular: clusterimageexport
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.basePath
      name: BasePath
      type: string
    - jsonPath: .spec.storage.target
      name: Storage
      type: string
    - jsonPath: .status.progress
      name: Progress
      type: string
    - jsonPath: .status.completedImages
      name: Images
      type: string
    - jsonPath: .status.totalImages
      name: Total
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: ClusterImageExport is the Schema for the clusterimageexports
          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: ClusterImageExportSpec defines the desired state of ClusterImageExport
            properties:
              additionalImages:
                items:
                  type: string
                type: array
              basePath:
                description: Base path for the export - both file and S3
                maxLength: 255
                minLength: 1
                type: string
              createdAt:
                format: date-time
                type: string
              excludedNamespaces:
                items:
                  type: string
                type: array
              excludes:
                description: Exclude images which contain these strings
                items:
                  type: string
                type: array
              imagePullSecrets:
                items:
                  description: |-
                    LocalObjectReference contains enough information to let you locate the
                    referenced object inside the same namespace.
                  properties:
                    name:
                      default: ""
                      description: |-
                        Name of the referent.
                        This field is effectively required, but due to backwards compatibility is
                        allowed to be empty. Instances of this type with an empty value here are
                        almost certainly wrong.
                        More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                      type: string
                  type: object
                  x-kubernetes-map-type: atomic
                type: array
              includes:
                description: Include only images which contain these strings
                items:
                  type: string
                type: array
              jobAnnotations:
                additionalProperties:
                  type: string
                type: object
              maxConcurrentJobs:
                default: 5
                maximum: 100
                minimum: 1
                type: integer
              name:
                type: string
              namespaces:
                items:
                  type: string
                type: array
              storage:
                description: ClusterImageStorageSpec defines the desired state of
                  ClusterImageStorage
                properties:
                  s3:
                    properties:
                      accessKey:
                        description: S3 bucket credentials
                        type: string
                      bucket:
                        description: Bucket name
                        type: string
                      endpoint:
                        description: |-
                          Defines the endpoint for the S3 storage
                          If none specified - default AWS endpoint will be used
                        type: string
                      region:
                        type: string
                      roleARN:
                        description: RoleARN is the ARN of the role to be used for
                          the deployment
                        type: string
                      secretKey:
                        type: string
                      secretName:
                        description: Defines the secret name for credentials
                        type: string
                      useRole:
                        type: boolean
                    required:
                    - bucket
                    - region
                    type: object
                  target:
                    enum:
                    - FILE
                    - S3
                    type: string
                required:
                - target
                type: object
            required:
            - basePath
            - maxConcurrentJobs
            - name
            - storage
            type: object
          status:
            description: ClusterImageExportStatus defines the observed state of ClusterImageExport
            properties:
              completedImages:
                description: Number of images that have completed export
                type: integer
              progress:
                type: string
              totalImages:
                description: Total number of images to be exported
                type: integer
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
