{{- if .Values.crds.managed }}
 
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.14.0
  name: imagelistpulljobs.apps.kruise.io
spec:
  group: apps.kruise.io
  names:
    kind: ImageListPullJob
    listKind: ImageListPullJobList
    plural: imagelistpulljobs
    singular: imagelistpulljob
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: Number of image pull job
      jsonPath: .status.desired
      name: TOTAL
      type: integer
    - description: Number of image pull job succeeded
      jsonPath: .status.succeeded
      name: SUCCEEDED
      type: integer
    - description: Number of ImagePullJobs which are finished
      jsonPath: .status.completed
      name: COMPLETED
      type: integer
    - description: CreationTimestamp is a timestamp representing the server time when
        this object was created. It is not guaranteed to be set in happens-before
        order across separate operations. Clients may not set this value. It is represented
        in RFC3339 form and is in UTC.
      jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: ImageListPullJob is the Schema for the imagelistpulljobs 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: ImageListPullJobSpec defines the desired state of ImageListPullJob
            properties:
              completionPolicy:
                description: |-
                  CompletionPolicy indicates the completion policy of the job.
                  Default is Always CompletionPolicyType.
                properties:
                  activeDeadlineSeconds:
                    description: |-
                      ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the job may be active
                      before the system tries to terminate it; value must be positive integer.
                      Only works for Always type.
                    format: int64
                    type: integer
                  ttlSecondsAfterFinished:
                    description: |-
                      ttlSecondsAfterFinished limits the lifetime of a Job that has finished
                      execution (either Complete or Failed). If this field is set,
                      ttlSecondsAfterFinished after the Job finishes, it is eligible to be
                      automatically deleted. When the Job is being deleted, its lifecycle
                      guarantees (e.g. finalizers) will be honored. If this field is unset,
                      the Job won't be automatically deleted. If this field is set to zero,
                      the Job becomes eligible to be deleted immediately after it finishes.
                      This field is alpha-level and is only honored by servers that enable the
                      TTLAfterFinished feature.
                      Only works for Always type
                    format: int32
                    type: integer
                  type:
                    description: |-
                      Type indicates the type of the CompletionPolicy.
                      Default is Always.
                    type: string
                type: object
              imagePullPolicy:
                description: |-
                  Image pull policy.
                  One of Always, IfNotPresent. Defaults to IfNotPresent.
                type: string
              images:
                description: Images is the image list to be pulled by the job
                items:
                  type: string
                type: array
              parallelism:
                anyOf:
                - type: integer
                - type: string
                description: |-
                  Parallelism is the requested parallelism, it can be set to any non-negative value. If it is unspecified,
                  it defaults to 1. If it is specified as 0, then the Job is effectively paused until it is increased.
                x-kubernetes-int-or-string: true
              podSelector:
                description: |-
                  PodSelector is a query over pods that should pull image on nodes of these pods.
                  Mutually exclusive with Selector.
                properties:
                  matchExpressions:
                    description: matchExpressions is a list of label selector requirements.
                      The requirements are ANDed.
                    items:
                      description: |-
                        A label selector requirement is a selector that contains values, a key, and an operator that
                        relates the key and values.
                      properties:
                        key:
                          description: key is the label key that the selector applies
                            to.
                          type: string
                        operator:
                          description: |-
                            operator represents a key's relationship to a set of values.
                            Valid operators are In, NotIn, Exists and DoesNotExist.
                          type: string
                        values:
                          description: |-
                            values is an array of string values. If the operator is In or NotIn,
                            the values array must be non-empty. If the operator is Exists or DoesNotExist,
                            the values array must be empty. This array is replaced during a strategic
                            merge patch.
                          items:
                            type: string
                          type: array
                      required:
                      - key
                      - operator
                      type: object
                    type: array
                  matchLabels:
                    additionalProperties:
                      type: string
                    description: |-
                      matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
                      map is equivalent to an element of matchExpressions, whose key field is "key", the
                      operator is "In", and the values array contains only "value". The requirements are ANDed.
                    type: object
                type: object
                x-kubernetes-map-type: atomic
              pullPolicy:
                description: |-
                  PullPolicy is an optional field to set parameters of the pulling task. If not specified,
                  the system will use the default values.
                properties:
                  backoffLimit:
                    description: |-
                      Specifies the number of retries before marking the pulling task failed.
                      Defaults to 3
                    format: int32
                    type: integer
                  timeoutSeconds:
                    description: |-
                      Specifies the timeout of the pulling task.
                      Defaults to 600
                    format: int32
                    type: integer
                type: object
              pullSecrets:
                description: |-
                  ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling the image.
                  If specified, these secrets will be passed to individual puller implementations for them to use.  For example,
                  in the case of docker, only DockerConfig type secrets are honored.
                items:
                  type: string
                type: array
              sandboxConfig:
                description: SandboxConfig support attach metadata in PullImage CRI
                  interface during ImagePulljobs
                properties:
                  annotations:
                    additionalProperties:
                      type: string
                    type: object
                  labels:
                    additionalProperties:
                      type: string
                    type: object
                type: object
              selector:
                description: |-
                  Selector is a query over nodes that should match the job.
                  nil to match all nodes.
                properties:
                  matchExpressions:
                    description: matchExpressions is a list of label selector requirements.
                      The requirements are ANDed.
                    items:
                      description: |-
                        A label selector requirement is a selector that contains values, a key, and an operator that
                        relates the key and values.
                      properties:
                        key:
                          description: key is the label key that the selector applies
                            to.
                          type: string
                        operator:
                          description: |-
                            operator represents a key's relationship to a set of values.
                            Valid operators are In, NotIn, Exists and DoesNotExist.
                          type: string
                        values:
                          description: |-
                            values is an array of string values. If the operator is In or NotIn,
                            the values array must be non-empty. If the operator is Exists or DoesNotExist,
                            the values array must be empty. This array is replaced during a strategic
                            merge patch.
                          items:
                            type: string
                          type: array
                      required:
                      - key
                      - operator
                      type: object
                    type: array
                  matchLabels:
                    additionalProperties:
                      type: string
                    description: |-
                      matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
                      map is equivalent to an element of matchExpressions, whose key field is "key", the
                      operator is "In", and the values array contains only "value". The requirements are ANDed.
                    type: object
                  names:
                    description: Names specify a set of nodes to execute the job.
                    items:
                      type: string
                    type: array
                type: object
                x-kubernetes-map-type: atomic
            required:
            - completionPolicy
            - images
            type: object
          status:
            description: ImageListPullJobStatus defines the observed state of ImageListPullJob
            properties:
              active:
                description: The number of running ImagePullJobs which are acknowledged
                  by the imagepulljob controller.
                format: int32
                type: integer
              completed:
                description: The number of ImagePullJobs which are finished
                format: int32
                type: integer
              completionTime:
                description: |-
                  Represents time when the all the image pull job was completed. It is not guaranteed to
                  be set in happens-before order across separate operations.
                  It is represented in RFC3339 form and is in UTC.
                format: date-time
                type: string
              desired:
                description: The desired number of ImagePullJobs, this is typically
                  equal to the number of len(spec.Images).
                format: int32
                type: integer
              failedImageStatuses:
                description: The status of ImagePullJob which has the failed nodes(status.Failed>0)
                  .
                items:
                  description: FailedImageStatus the state of ImagePullJob which has
                    the failed nodes(status.Failed>0)
                  properties:
                    imagePullJob:
                      description: The name of ImagePullJob which has the failed nodes(status.Failed>0)
                      type: string
                    message:
                      description: The text prompt for job running status.
                      type: string
                    name:
                      description: Name of the image
                      type: string
                  type: object
                type: array
              startTime:
                description: |-
                  Represents time when the job was acknowledged by the job controller.
                  It is not guaranteed to be set in happens-before order across separate operations.
                  It is represented in RFC3339 form and is in UTC.
                format: date-time
                type: string
              succeeded:
                description: The number of image pull job which are finished and status.Succeeded==status.Desired.
                format: int32
                type: integer
            required:
            - desired
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
{{- end }}
