apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: storageversionmigrations.migration.k8s.io
  annotations:
    "api-approved.kubernetes.io": "unapproved"
spec:
  group: migration.k8s.io
  names:
    kind: StorageVersionMigration
    listKind: StorageVersionMigrationList
    plural: storageversionmigrations
    singular: storageversionmigration
  scope: Cluster
  preserveUnknownFields: false
  subresources:
    status: {}
  version: v1alpha1
  versions:
    - name: v1alpha1
      served: true
      storage: true
  "validation":
    "openAPIV3Schema":
      description: StorageVersionMigration represents a migration of stored data to
        the latest storage version.
      type: object
      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: Specification of the migration.
          type: object
          required:
            - resource
          properties:
            continueToken:
              description: The token used in the list options to get the next chunk
                of objects to migrate. When the .status.conditions indicates the migration
                is "Running", users can use this token to check the progress of the
                migration.
              type: string
            resource:
              description: The resource that is being migrated. The migrator sends
                requests to the endpoint serving the resource. Immutable.
              type: object
              properties:
                group:
                  description: The name of the group.
                  type: string
                resource:
                  description: The name of the resource.
                  type: string
                version:
                  description: The name of the version.
                  type: string
        status:
          description: Status of the migration.
          type: object
          properties:
            conditions:
              description: The latest available observations of the migration's current
                state.
              type: array
              items:
                description: Describes the state of a migration at a certain point.
                type: object
                required:
                  - status
                  - type
                properties:
                  lastUpdateTime:
                    description: The last time this condition was updated.
                    type: string
                    format: date-time
                  message:
                    description: A human readable message indicating details about
                      the transition.
                    type: string
                  reason:
                    description: The reason for the condition's last transition.
                    type: string
                  status:
                    description: Status of the condition, one of True, False, Unknown.
                    type: string
                  type:
                    description: Type of the condition.
                    type: string
