apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: middlewarerestores.harmonycloud.cn
spec:
  conversion:
    strategy: None
  group: harmonycloud.cn
  names:
    kind: MiddlewareRestore
    listKind: MiddlewareRestoreList
    plural: middlewarerestores
    singular: middlewarerestore
  scope: Namespaced
  versions:
    - name: v1
      schema:
        openAPIV3Schema:
          description: MiddlewareBackup is the Schema for the middlewarebackups 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: MiddlewareRestoreSpec defines the desired state of MiddlewareRestore
              properties:
                name:
                  type: string
                type:
                  type: string
                pod:
                  type: string
                backupName:
                  type: string
                restoreBind:
                  additionalProperties:
                    type: string
                  type: object
              type: object
            status:
              description: MiddlewareBackupStatus defines the observed state of MiddlewareBackup
              properties:
                creationTimestamp:
                  format: date-time
                  type: string
#                records:
#                  description: MiddlewareBackupRecords defines the observed state of MiddlewareBackupStatus
#                  items:
#                    properties:
#                      creationTimestamp:
#                        format: date-time
#                        type: string
#                      details:
#                        items:
#                          properties:
#                            name:
#                              type: string
#                            pod:
#                              type: string
#                            pvc:
#                              type: string
#                            volumeSnapshot:
#                              type: string
#                            phase:
#                              type: string
#                            reason:
#                              type: string
#                          type: object
#                        type: array
#                    type: object
#                  type: array
                phase:
                  type: string
                reason:
                  type: string
              type: object
          type: object
      served: true
      storage: true
      subresources:
        status: { }