apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: migrations.openmcp.k8s.io
  annotations:
    "api-approved.kubernetes.io": "https://github.com/kubernetes/kubernetes/pull/78458"
spec:
  group: openmcp.k8s.io
  names:
    kind: Migration
    listKind: MigrationList
    plural: migrations
    singular: migration
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Migration is the Schema for the Migrations 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: MigrationSpec defines the desired state of Migration
            properties:
              MigrationServiceSource:
                description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
                  Important: Run "make" to regenerate code after modifying this file'
                items:
                  properties:
                    MigrationSource:
                      description: container service spec
                      items:
                        properties:
                          ResourceName:
                            type: string
                          ResourceType:
                            description: Migration source
                            type: string
                        required:
                        - ResourceName
                        - ResourceType
                        type: object
                      type: array
                    NameSpace:
                      type: string
                    ServiceName:
                      type: string
                    SourceCluster:
                      type: string
                    TargetCluster:
                      type: string
                  required:
                  - MigrationSource
                  - NameSpace
                  - ServiceName
                  - SourceCluster
                  - TargetCluster
                  type: object
                type: array
            required:
            - MigrationServiceSource
            type: object
          status:
            description: MigrationStatus defines the observed state of Migration
            properties:
              MigrationStatus:
                description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
                  of cluster Important: Run "make" to regenerate code after modifying
                  this file'
                type: boolean
              Reason:
                type: string
            required:
            - MigrationStatus
            - Reason
            type: object
        type: object
    served: true
    storage: true
