---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: perconaservermongodbbackups.psmdb.percona.com
spec:
  group: psmdb.percona.com
  names:
    kind: PerconaServerMongoDBBackup
    listKind: PerconaServerMongoDBBackupList
    plural: perconaservermongodbbackups
    singular: perconaservermongodbbackup
    shortNames:
    - psmdb-backup
  scope: Namespaced
  versions:
    - name: v1
      storage: true
      served: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              x-kubernetes-preserve-unknown-fields: true
            status:
              type: object
              x-kubernetes-preserve-unknown-fields: true
      additionalPrinterColumns:
        - name: Cluster
          type: string
          description: Cluster name
          jsonPath: .spec.psmdbCluster
        - name: Storage
          type: string
          description: Storage name from pxc spec
          jsonPath: .spec.storageName
        - name: Destination
          type: string
          description: Backup destination
          jsonPath: .status.destination
        - name: Status
          type: string
          description: Job status
          jsonPath: .status.state
        - name: Completed
          description: Completed time
          type: date
          jsonPath: .status.completed
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp
      subresources:
        status: {}
