# ============LICENSE_START======================================================= # Copyright (C) 2021 The Nordix Foundation. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= ################################################################################################################### # Create the common resources that are necessary to start the operator and the ceph cluster. # These resources *must* be created before the operator.yaml and cluster.yaml or their variants. # The samples all assume that a single operator will manage a single cluster crd in the same "rook-ceph" namespace. # # If the operator needs to manage multiple clusters (in different namespaces), see the section below # for "cluster-specific resources". The resources below that section will need to be created for each namespace # where the operator needs to manage the cluster. The resources above that section do not be created again. # # Most of the sections are prefixed with a 'OLM' keyword which is used to build our CSV for an OLM (Operator Life Cycle manager) ################################################################################################################### # Namespace where the operator and other rook resources are created apiVersion: v1 kind: Namespace metadata: name: rook-ceph # The CRD declarations --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephclusters.ceph.rook.io spec: group: ceph.rook.io names: kind: CephCluster listKind: CephClusterList plural: cephclusters singular: cephcluster scope: Namespaced version: v1 validation: openAPIV3Schema: properties: spec: properties: annotations: {} cephVersion: properties: allowUnsupported: type: boolean image: type: string dashboard: properties: enabled: type: boolean urlPrefix: type: string port: type: integer minimum: 0 maximum: 65535 ssl: type: boolean dataDirHostPath: pattern: ^/(\S+) type: string disruptionManagement: properties: machineDisruptionBudgetNamespace: type: string managePodBudgets: type: boolean osdMaintenanceTimeout: type: integer pgHealthCheckTimeout: type: integer manageMachineDisruptionBudgets: type: boolean skipUpgradeChecks: type: boolean continueUpgradeAfterChecksEvenIfNotHealthy: type: boolean waitTimeoutForHealthyOSDInMinutes: type: integer mon: properties: allowMultiplePerNode: type: boolean count: maximum: 9 minimum: 0 type: integer volumeClaimTemplate: {} mgr: properties: modules: items: properties: name: type: string enabled: type: boolean network: properties: hostNetwork: type: boolean provider: type: string selectors: {} storage: properties: disruptionManagement: properties: machineDisruptionBudgetNamespace: type: string managePodBudgets: type: boolean osdMaintenanceTimeout: type: integer pgHealthCheckTimeout: type: integer manageMachineDisruptionBudgets: type: boolean useAllNodes: type: boolean nodes: items: properties: name: type: string config: properties: metadataDevice: type: string storeType: type: string pattern: ^(bluestore)$ databaseSizeMB: type: string walSizeMB: type: string journalSizeMB: type: string osdsPerDevice: type: string encryptedDevice: type: string pattern: ^(true|false)$ useAllDevices: type: boolean deviceFilter: type: string devicePathFilter: type: string devices: type: array items: properties: name: type: string config: {} resources: {} useAllDevices: type: boolean deviceFilter: type: string devicePathFilter: type: string config: {} storageClassDeviceSets: {} driveGroups: type: array items: properties: name: type: string spec: {} placement: {} required: - name - spec monitoring: properties: enabled: type: boolean rulesNamespace: type: string externalMgrEndpoints: type: array items: properties: ip: type: string removeOSDsIfOutAndSafeToRemove: type: boolean external: properties: enable: type: boolean cleanupPolicy: properties: confirmation: type: string pattern: ^$|^yes-really-destroy-data$ sanitizeDisks: properties: method: type: string pattern: ^(complete|quick)$ dataSource: type: string pattern: ^(zero|random)$ iteration: type: integer format: int32 security: {} logCollector: {} placement: {} resources: {} healthCheck: {} subresources: status: {} additionalPrinterColumns: - name: DataDirHostPath type: string description: Directory used on the K8s nodes JSONPath: .spec.dataDirHostPath - name: MonCount type: string description: Number of MONs JSONPath: .spec.mon.count - name: Age type: date JSONPath: .metadata.creationTimestamp - name: Phase type: string description: Phase JSONPath: .status.phase - name: Message type: string description: Message JSONPath: .status.message - name: Health type: string description: Ceph Health JSONPath: .status.ceph.health --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephclients.ceph.rook.io spec: group: ceph.rook.io names: kind: CephClient listKind: CephClientList plural: cephclients singular: cephclient scope: Namespaced version: v1 validation: openAPIV3Schema: properties: spec: properties: caps: type: object subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephrbdmirrors.ceph.rook.io spec: group: ceph.rook.io names: kind: CephRBDMirror listKind: CephRBDMirrorList plural: cephrbdmirrors singular: cephrbdmirror scope: Namespaced version: v1 validation: openAPIV3Schema: properties: spec: properties: count: type: integer minimum: 1 maximum: 100 peers: properties: secretNames: type: array subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephfilesystems.ceph.rook.io spec: group: ceph.rook.io names: kind: CephFilesystem listKind: CephFilesystemList plural: cephfilesystems singular: cephfilesystem scope: Namespaced version: v1 validation: openAPIV3Schema: properties: spec: properties: metadataServer: properties: activeCount: minimum: 1 maximum: 10 type: integer activeStandby: type: boolean annotations: {} placement: {} resources: {} metadataPool: properties: failureDomain: type: string crushRoot: type: string replicated: properties: size: minimum: 0 maximum: 10 type: integer requireSafeReplicaSize: type: boolean erasureCoded: 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 items: properties: failureDomain: type: string crushRoot: type: string replicated: properties: size: minimum: 0 maximum: 10 type: integer requireSafeReplicaSize: type: boolean erasureCoded: 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 preservePoolsOnDelete: type: boolean preserveFilesystemOnDelete: type: boolean 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: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephnfses.ceph.rook.io spec: group: ceph.rook.io names: kind: CephNFS listKind: CephNFSList plural: cephnfses singular: cephnfs shortNames: - nfs scope: Namespaced version: v1 validation: openAPIV3Schema: properties: spec: properties: rados: properties: pool: type: string namespace: type: string server: properties: active: type: integer annotations: {} placement: {} resources: {} subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephobjectstores.ceph.rook.io spec: group: ceph.rook.io names: kind: CephObjectStore listKind: CephObjectStoreList plural: cephobjectstores singular: cephobjectstore scope: Namespaced version: v1 validation: openAPIV3Schema: properties: spec: properties: gateway: properties: type: type: string sslCertificateRef: {} port: type: integer minimum: 0 maximum: 65535 securePort: type: integer minimum: 0 maximum: 65535 instances: type: integer externalRgwEndpoints: type: array items: properties: ip: type: string annotations: {} placement: {} resources: {} metadataPool: properties: failureDomain: type: string crushRoot: type: string replicated: properties: size: type: integer requireSafeReplicaSize: type: boolean erasureCoded: properties: dataChunks: type: integer codingChunks: type: integer compressionMode: type: string enum: - "" - none - passive - aggressive - force parameters: type: object dataPool: properties: failureDomain: type: string crushRoot: type: string replicated: properties: size: type: integer requireSafeReplicaSize: type: boolean erasureCoded: properties: dataChunks: type: integer codingChunks: type: integer compressionMode: type: string enum: - "" - none - passive - aggressive - force parameters: type: object preservePoolsOnDelete: type: boolean healthCheck: properties: bucket: properties: disabled: type: boolean interval: type: string timeout: type: string livenessProbe: type: object properties: disabled: type: boolean subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephobjectstoreusers.ceph.rook.io spec: group: ceph.rook.io names: kind: CephObjectStoreUser listKind: CephObjectStoreUserList plural: cephobjectstoreusers singular: cephobjectstoreuser shortNames: - rcou - objectuser scope: Namespaced version: v1 subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephobjectrealms.ceph.rook.io spec: group: ceph.rook.io names: kind: CephObjectRealm listKind: CephObjectRealmList plural: cephobjectrealms singular: cephobjectrealm scope: Namespaced version: v1 subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephobjectzonegroups.ceph.rook.io spec: group: ceph.rook.io names: kind: CephObjectZoneGroup listKind: CephObjectZoneGroupList plural: cephobjectzonegroups singular: cephobjectzonegroup scope: Namespaced version: v1 subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephobjectzones.ceph.rook.io spec: group: ceph.rook.io names: kind: CephObjectZone listKind: CephObjectZoneList plural: cephobjectzones singular: cephobjectzone scope: Namespaced version: v1 subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cephblockpools.ceph.rook.io spec: group: ceph.rook.io names: kind: CephBlockPool listKind: CephBlockPoolList plural: cephblockpools singular: cephblockpool scope: Namespaced version: v1 validation: openAPIV3Schema: properties: spec: properties: failureDomain: type: string crushRoot: type: string replicated: properties: size: type: integer minimum: 0 maximum: 9 targetSizeRatio: type: number requireSafeReplicaSize: type: boolean erasureCoded: properties: dataChunks: type: integer minimum: 0 maximum: 9 codingChunks: type: integer minimum: 0 maximum: 9 compressionMode: type: string enum: - "" - none - passive - aggressive - force enableRBDStats: description: EnableRBDStats is used to enable gathering of statistics for all RBD images in the pool type: boolean parameters: type: object mirroring: properties: enabled: type: boolean mode: type: string enum: - image - pool snapshotSchedules: type: object properties: interval: type: string startTime: type: string subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: volumes.rook.io spec: group: rook.io names: kind: Volume listKind: VolumeList plural: volumes singular: volume shortNames: - rv scope: Namespaced version: v1alpha2 subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: objectbuckets.objectbucket.io spec: group: objectbucket.io versions: - name: v1alpha1 served: true storage: true names: kind: ObjectBucket listKind: ObjectBucketList plural: objectbuckets singular: objectbucket shortNames: - ob - obs scope: Cluster subresources: status: {} --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: objectbucketclaims.objectbucket.io spec: versions: - name: v1alpha1 served: true storage: true group: objectbucket.io names: kind: ObjectBucketClaim listKind: ObjectBucketClaimList plural: objectbucketclaims singular: objectbucketclaim shortNames: - obc - obcs scope: Namespaced subresources: status: {}