---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.17.2
    helm.sh/resource-policy: keep
  name: backups.postgresql.cnpg.io
spec:
  group: postgresql.cnpg.io
  names:
    kind: Backup
    listKind: BackupList
    plural: backups
    singular: backup
  scope: Namespaced
  versions:
    - additionalPrinterColumns:
        - jsonPath: .metadata.creationTimestamp
          name: Age
          type: date
        - jsonPath: .spec.cluster.name
          name: Cluster
          type: string
        - jsonPath: .spec.method
          name: Method
          type: string
        - jsonPath: .status.phase
          name: Phase
          type: string
        - jsonPath: .status.error
          name: Error
          type: string
      name: v1
      schema:
        openAPIV3Schema:
          properties:
            apiVersion:
              type: string
            kind:
              type: string
            metadata:
              type: object
            spec:
              properties:
                cluster:
                  properties:
                    name:
                      type: string
                  required:
                    - name
                  type: object
                method:
                  default: barmanObjectStore
                  enum:
                    - barmanObjectStore
                    - volumeSnapshot
                    - plugin
                  type: string
                online:
                  type: boolean
                onlineConfiguration:
                  properties:
                    immediateCheckpoint:
                      type: boolean
                    waitForArchive:
                      default: true
                      type: boolean
                  type: object
                pluginConfiguration:
                  properties:
                    name:
                      type: string
                    parameters:
                      additionalProperties:
                        type: string
                      type: object
                  required:
                    - name
                  type: object
                target:
                  enum:
                    - primary
                    - prefer-standby
                  type: string
              required:
                - cluster
              type: object
            status:
              properties:
                azureCredentials:
                  properties:
                    connectionString:
                      properties:
                        key:
                          type: string
                        name:
                          type: string
                      required:
                        - key
                        - name
                      type: object
                    inheritFromAzureAD:
                      type: boolean
                    storageAccount:
                      properties:
                        key:
                          type: string
                        name:
                          type: string
                      required:
                        - key
                        - name
                      type: object
                    storageKey:
                      properties:
                        key:
                          type: string
                        name:
                          type: string
                      required:
                        - key
                        - name
                      type: object
                    storageSasToken:
                      properties:
                        key:
                          type: string
                        name:
                          type: string
                      required:
                        - key
                        - name
                      type: object
                  type: object
                backupId:
                  type: string
                backupLabelFile:
                  format: byte
                  type: string
                backupName:
                  type: string
                beginLSN:
                  type: string
                beginWal:
                  type: string
                commandError:
                  type: string
                commandOutput:
                  type: string
                destinationPath:
                  type: string
                encryption:
                  type: string
                endLSN:
                  type: string
                endWal:
                  type: string
                endpointCA:
                  properties:
                    key:
                      type: string
                    name:
                      type: string
                  required:
                    - key
                    - name
                  type: object
                endpointURL:
                  type: string
                error:
                  type: string
                googleCredentials:
                  properties:
                    applicationCredentials:
                      properties:
                        key:
                          type: string
                        name:
                          type: string
                      required:
                        - key
                        - name
                      type: object
                    gkeEnvironment:
                      type: boolean
                  type: object
                instanceID:
                  properties:
                    ContainerID:
                      type: string
                    podName:
                      type: string
                  type: object
                method:
                  type: string
                online:
                  type: boolean
                phase:
                  type: string
                pluginMetadata:
                  additionalProperties:
                    type: string
                  type: object
                s3Credentials:
                  properties:
                    accessKeyId:
                      properties:
                        key:
                          type: string
                        name:
                          type: string
                      required:
                        - key
                        - name
                      type: object
                    inheritFromIAMRole:
                      type: boolean
                    region:
                      properties:
                        key:
                          type: string
                        name:
                          type: string
                      required:
                        - key
                        - name
                      type: object
                    secretAccessKey:
                      properties:
                        key:
                          type: string
                        name:
                          type: string
                      required:
                        - key
                        - name
                      type: object
                    sessionToken:
                      properties:
                        key:
                          type: string
                        name:
                          type: string
                      required:
                        - key
                        - name
                      type: object
                  type: object
                serverName:
                  type: string
                snapshotBackupStatus:
                  properties:
                    elements:
                      items:
                        properties:
                          name:
                            type: string
                          tablespaceName:
                            type: string
                          type:
                            type: string
                        required:
                          - name
                          - type
                        type: object
                      type: array
                  type: object
                startedAt:
                  format: date-time
                  type: string
                stoppedAt:
                  format: date-time
                  type: string
                tablespaceMapFile:
                  format: byte
                  type: string
              type: object
          required:
            - metadata
            - spec
          type: object
      served: true
      storage: true
      subresources:
        status: {}
