---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: cephfilesystems.ceph.rook.io
spec:
  group: ceph.rook.io
  names:
    kind: CephFilesystem
    listKind: CephFilesystemList
    plural: cephfilesystems
    singular: cephfilesystem
  scope: Namespaced
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                metadataServer:
                  type: object
                  properties:
                    activeCount:
                      minimum: 1
                      maximum: 10
                      type: integer
                    activeStandby:
                      type: boolean
                    annotations:
                      type: object
                      nullable: true
                      x-kubernetes-preserve-unknown-fields: true
                    placement:
                      type: object
                      nullable: true
                      x-kubernetes-preserve-unknown-fields: true
                    resources:
                      type: object
                      nullable: true
                      x-kubernetes-preserve-unknown-fields: true
                    priorityClassName:
                      type: string
                    labels:
                      type: object
                      nullable: true
                      x-kubernetes-preserve-unknown-fields: true
                metadataPool:
                  type: object
                  nullable: true
                  properties:
                    failureDomain:
                      type: string
                    deviceClass:
                      type: string
                    crushRoot:
                      type: string
                    replicated:
                      type: object
                      nullable: true
                      properties:
                        size:
                          minimum: 0
                          maximum: 10
                          type: integer
                        requireSafeReplicaSize:
                          type: boolean
                        replicasPerFailureDomain:
                          type: integer
                        subFailureDomain:
                          type: string
                    parameters:
                      type: object
                      x-kubernetes-preserve-unknown-fields: true
                    erasureCoded:
                      type: object
                      nullable: true
                      properties:
                        dataChunks:
                          minimum: 0
                          maximum: 10
                          type: integer
                        codingChunks:
                          minimum: 0
                          maximum: 10
                          type: integer
                    compressionMode:
                      type: string
                      enum:
                        - ""
                        - none
                        - passive
                        - aggressive
                        - force
                dataPools:
                  type: array
                  nullable: true
                  items:
                    type: object
                    properties:
                      failureDomain:
                        type: string
                      deviceClass:
                        type: string
                      crushRoot:
                        type: string
                      replicated:
                        type: object
                        nullable: true
                        properties:
                          size:
                            minimum: 0
                            maximum: 10
                            type: integer
                          requireSafeReplicaSize:
                            type: boolean
                          replicasPerFailureDomain:
                            type: integer
                          subFailureDomain:
                            type: string
                      erasureCoded:
                        type: object
                        nullable: true
                        properties:
                          dataChunks:
                            minimum: 0
                            maximum: 10
                            type: integer
                          codingChunks:
                            minimum: 0
                            maximum: 10
                            type: integer
                      compressionMode:
                        type: string
                        enum:
                          - ""
                          - none
                          - passive
                          - aggressive
                          - force
                      parameters:
                        type: object
                        nullable: true
                        x-kubernetes-preserve-unknown-fields: true
                preservePoolsOnDelete:
                  type: boolean
                preserveFilesystemOnDelete:
                  type: boolean
            status:
              type: object
              x-kubernetes-preserve-unknown-fields: true
      additionalPrinterColumns:
        - name: ActiveMDS
          type: string
          description: Number of desired active MDS daemons
          jsonPath: .spec.metadataServer.activeCount
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp
      subresources:
        status: {}
