ceph: configuration fixes
[infra/stack/kubernetes.git] / apps / ceph / kubespray / playbooks / roles / install / templates / crds.yaml.j2
1 # ============LICENSE_START=======================================================
2 #  Copyright (C) 2021 The Nordix Foundation. All rights reserved.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
18
19 ###################################################################################################################
20 # Create the common resources that are necessary to start the operator and the ceph cluster.
21 # These resources *must* be created before the operator.yaml and cluster.yaml or their variants.
22 # The samples all assume that a single operator will manage a single cluster crd in the same "rook-ceph" namespace.
23 #
24 # If the operator needs to manage multiple clusters (in different namespaces), see the section below
25 # for "cluster-specific resources". The resources below that section will need to be created for each namespace
26 # where the operator needs to manage the cluster. The resources above that section do not be created again.
27 #
28 # Most of the sections are prefixed with a 'OLM' keyword which is used to build our CSV for an OLM (Operator Life Cycle manager)
29 ###################################################################################################################
30
31 # Namespace where the operator and other rook resources are created
32 apiVersion: v1
33 kind: Namespace
34 metadata:
35   name: rook-ceph
36 # The CRD declarations
37 ---
38 apiVersion: apiextensions.k8s.io/v1beta1
39 kind: CustomResourceDefinition
40 metadata:
41   name: cephclusters.ceph.rook.io
42 spec:
43   group: ceph.rook.io
44   names:
45     kind: CephCluster
46     listKind: CephClusterList
47     plural: cephclusters
48     singular: cephcluster
49   scope: Namespaced
50   version: v1
51   validation:
52     openAPIV3Schema:
53       properties:
54         spec:
55           properties:
56             annotations: {}
57             cephVersion:
58               properties:
59                 allowUnsupported:
60                   type: boolean
61                 image:
62                   type: string
63             dashboard:
64               properties:
65                 enabled:
66                   type: boolean
67                 urlPrefix:
68                   type: string
69                 port:
70                   type: integer
71                   minimum: 0
72                   maximum: 65535
73                 ssl:
74                   type: boolean
75             dataDirHostPath:
76               pattern: ^/(\S+)
77               type: string
78             disruptionManagement:
79               properties:
80                 machineDisruptionBudgetNamespace:
81                   type: string
82                 managePodBudgets:
83                   type: boolean
84                 osdMaintenanceTimeout:
85                   type: integer
86                 pgHealthCheckTimeout:
87                   type: integer
88                 manageMachineDisruptionBudgets:
89                   type: boolean
90             skipUpgradeChecks:
91               type: boolean
92             continueUpgradeAfterChecksEvenIfNotHealthy:
93               type: boolean
94             waitTimeoutForHealthyOSDInMinutes:
95               type: integer
96             mon:
97               properties:
98                 allowMultiplePerNode:
99                   type: boolean
100                 count:
101                   maximum: 9
102                   minimum: 0
103                   type: integer
104                 volumeClaimTemplate: {}
105             mgr:
106               properties:
107                 modules:
108                   items:
109                     properties:
110                       name:
111                         type: string
112                       enabled:
113                         type: boolean
114             network:
115               properties:
116                 hostNetwork:
117                   type: boolean
118                 provider:
119                   type: string
120                 selectors: {}
121             storage:
122               properties:
123                 disruptionManagement:
124                   properties:
125                     machineDisruptionBudgetNamespace:
126                       type: string
127                     managePodBudgets:
128                       type: boolean
129                     osdMaintenanceTimeout:
130                       type: integer
131                     pgHealthCheckTimeout:
132                       type: integer
133                     manageMachineDisruptionBudgets:
134                       type: boolean
135                 useAllNodes:
136                   type: boolean
137                 nodes:
138                   items:
139                     properties:
140                       name:
141                         type: string
142                       config:
143                         properties:
144                           metadataDevice:
145                             type: string
146                           storeType:
147                             type: string
148                             pattern: ^(bluestore)$
149                           databaseSizeMB:
150                             type: string
151                           walSizeMB:
152                             type: string
153                           journalSizeMB:
154                             type: string
155                           osdsPerDevice:
156                             type: string
157                           encryptedDevice:
158                             type: string
159                             pattern: ^(true|false)$
160                       useAllDevices:
161                         type: boolean
162                       deviceFilter:
163                         type: string
164                       devicePathFilter:
165                         type: string
166                       devices:
167                         type: array
168                         items:
169                           properties:
170                             name:
171                               type: string
172                             config: {}
173                       resources: {}
174                 useAllDevices:
175                   type: boolean
176                 deviceFilter:
177                   type: string
178                 devicePathFilter:
179                   type: string
180                 config: {}
181                 storageClassDeviceSets: {}
182             driveGroups:
183               type: array
184               items:
185                 properties:
186                   name:
187                     type: string
188                   spec: {}
189                   placement: {}
190                 required:
191                 - name
192                 - spec
193             monitoring:
194               properties:
195                 enabled:
196                   type: boolean
197                 rulesNamespace:
198                   type: string
199                 externalMgrEndpoints:
200                   type: array
201                   items:
202                     properties:
203                       ip:
204                         type: string
205             removeOSDsIfOutAndSafeToRemove:
206               type: boolean
207             external:
208               properties:
209                 enable:
210                   type: boolean
211             cleanupPolicy:
212               properties:
213                 confirmation:
214                   type: string
215                   pattern: ^$|^yes-really-destroy-data$
216                 sanitizeDisks:
217                   properties:
218                     method:
219                       type: string
220                       pattern: ^(complete|quick)$
221                     dataSource:
222                       type: string
223                       pattern: ^(zero|random)$
224                     iteration:
225                       type: integer
226                       format: int32
227             security: {}
228             logCollector: {}
229             placement: {}
230             resources: {}
231             healthCheck: {}
232   subresources:
233     status: {}
234   additionalPrinterColumns:
235     - name: DataDirHostPath
236       type: string
237       description: Directory used on the K8s nodes
238       JSONPath: .spec.dataDirHostPath
239     - name: MonCount
240       type: string
241       description: Number of MONs
242       JSONPath: .spec.mon.count
243     - name: Age
244       type: date
245       JSONPath: .metadata.creationTimestamp
246     - name: Phase
247       type: string
248       description: Phase
249       JSONPath: .status.phase
250     - name: Message
251       type: string
252       description: Message
253       JSONPath: .status.message
254     - name: Health
255       type: string
256       description: Ceph Health
257       JSONPath: .status.ceph.health
258
259 ---
260 apiVersion: apiextensions.k8s.io/v1beta1
261 kind: CustomResourceDefinition
262 metadata:
263   name: cephclients.ceph.rook.io
264 spec:
265   group: ceph.rook.io
266   names:
267     kind: CephClient
268     listKind: CephClientList
269     plural: cephclients
270     singular: cephclient
271   scope: Namespaced
272   version: v1
273   validation:
274     openAPIV3Schema:
275       properties:
276         spec:
277           properties:
278             caps:
279               type: object
280   subresources:
281     status: {}
282
283 ---
284 apiVersion: apiextensions.k8s.io/v1beta1
285 kind: CustomResourceDefinition
286 metadata:
287   name: cephrbdmirrors.ceph.rook.io
288 spec:
289   group: ceph.rook.io
290   names:
291     kind: CephRBDMirror
292     listKind: CephRBDMirrorList
293     plural: cephrbdmirrors
294     singular: cephrbdmirror
295   scope: Namespaced
296   version: v1
297   validation:
298     openAPIV3Schema:
299       properties:
300         spec:
301           properties:
302             count:
303               type: integer
304               minimum: 1
305               maximum: 100
306             peers:
307               properties:
308                 secretNames:
309                   type: array
310   subresources:
311     status: {}
312
313 ---
314 apiVersion: apiextensions.k8s.io/v1beta1
315 kind: CustomResourceDefinition
316 metadata:
317   name: cephfilesystems.ceph.rook.io
318 spec:
319   group: ceph.rook.io
320   names:
321     kind: CephFilesystem
322     listKind: CephFilesystemList
323     plural: cephfilesystems
324     singular: cephfilesystem
325   scope: Namespaced
326   version: v1
327   validation:
328     openAPIV3Schema:
329       properties:
330         spec:
331           properties:
332             metadataServer:
333               properties:
334                 activeCount:
335                   minimum: 1
336                   maximum: 10
337                   type: integer
338                 activeStandby:
339                   type: boolean
340                 annotations: {}
341                 placement: {}
342                 resources: {}
343             metadataPool:
344               properties:
345                 failureDomain:
346                   type: string
347                 crushRoot:
348                   type: string
349                 replicated:
350                   properties:
351                     size:
352                       minimum: 0
353                       maximum: 10
354                       type: integer
355                     requireSafeReplicaSize:
356                       type: boolean
357                 erasureCoded:
358                   properties:
359                     dataChunks:
360                       minimum: 0
361                       maximum: 10
362                       type: integer
363                     codingChunks:
364                       minimum: 0
365                       maximum: 10
366                       type: integer
367                 compressionMode:
368                   type: string
369                   enum:
370                   - ""
371                   - none
372                   - passive
373                   - aggressive
374                   - force
375             dataPools:
376               type: array
377               items:
378                 properties:
379                   failureDomain:
380                     type: string
381                   crushRoot:
382                     type: string
383                   replicated:
384                     properties:
385                       size:
386                         minimum: 0
387                         maximum: 10
388                         type: integer
389                       requireSafeReplicaSize:
390                         type: boolean
391                   erasureCoded:
392                     properties:
393                       dataChunks:
394                         minimum: 0
395                         maximum: 10
396                         type: integer
397                       codingChunks:
398                         minimum: 0
399                         maximum: 10
400                         type: integer
401                   compressionMode:
402                     type: string
403                     enum:
404                     - ""
405                     - none
406                     - passive
407                     - aggressive
408                     - force
409                   parameters:
410                     type: object
411             preservePoolsOnDelete:
412               type: boolean
413             preserveFilesystemOnDelete:
414               type: boolean
415   additionalPrinterColumns:
416     - name: ActiveMDS
417       type: string
418       description: Number of desired active MDS daemons
419       JSONPath: .spec.metadataServer.activeCount
420     - name: Age
421       type: date
422       JSONPath: .metadata.creationTimestamp
423   subresources:
424     status: {}
425
426 ---
427 apiVersion: apiextensions.k8s.io/v1beta1
428 kind: CustomResourceDefinition
429 metadata:
430   name: cephnfses.ceph.rook.io
431 spec:
432   group: ceph.rook.io
433   names:
434     kind: CephNFS
435     listKind: CephNFSList
436     plural: cephnfses
437     singular: cephnfs
438     shortNames:
439     - nfs
440   scope: Namespaced
441   version: v1
442   validation:
443     openAPIV3Schema:
444       properties:
445         spec:
446           properties:
447             rados:
448               properties:
449                 pool:
450                   type: string
451                 namespace:
452                   type: string
453             server:
454               properties:
455                 active:
456                   type: integer
457                 annotations: {}
458                 placement: {}
459                 resources: {}
460   subresources:
461     status: {}
462
463 ---
464 apiVersion: apiextensions.k8s.io/v1beta1
465 kind: CustomResourceDefinition
466 metadata:
467   name: cephobjectstores.ceph.rook.io
468 spec:
469   group: ceph.rook.io
470   names:
471     kind: CephObjectStore
472     listKind: CephObjectStoreList
473     plural: cephobjectstores
474     singular: cephobjectstore
475   scope: Namespaced
476   version: v1
477   validation:
478     openAPIV3Schema:
479       properties:
480         spec:
481           properties:
482             gateway:
483               properties:
484                 type:
485                   type: string
486                 sslCertificateRef: {}
487                 port:
488                   type: integer
489                   minimum: 0
490                   maximum: 65535
491                 securePort:
492                   type: integer
493                   minimum: 0
494                   maximum: 65535
495                 instances:
496                   type: integer
497                 externalRgwEndpoints:
498                   type: array
499                   items:
500                     properties:
501                       ip:
502                         type: string
503                 annotations: {}
504                 placement: {}
505                 resources: {}
506             metadataPool:
507               properties:
508                 failureDomain:
509                   type: string
510                 crushRoot:
511                   type: string
512                 replicated:
513                   properties:
514                     size:
515                       type: integer
516                     requireSafeReplicaSize:
517                       type: boolean
518                 erasureCoded:
519                   properties:
520                     dataChunks:
521                       type: integer
522                     codingChunks:
523                       type: integer
524                 compressionMode:
525                   type: string
526                   enum:
527                   - ""
528                   - none
529                   - passive
530                   - aggressive
531                   - force
532                 parameters:
533                   type: object
534             dataPool:
535               properties:
536                 failureDomain:
537                   type: string
538                 crushRoot:
539                   type: string
540                 replicated:
541                   properties:
542                     size:
543                       type: integer
544                     requireSafeReplicaSize:
545                       type: boolean
546                 erasureCoded:
547                   properties:
548                     dataChunks:
549                       type: integer
550                     codingChunks:
551                       type: integer
552                 compressionMode:
553                   type: string
554                   enum:
555                   - ""
556                   - none
557                   - passive
558                   - aggressive
559                   - force
560                 parameters:
561                   type: object
562             preservePoolsOnDelete:
563               type: boolean
564             healthCheck:
565               properties:
566                 bucket:
567                   properties:
568                     disabled:
569                       type: boolean
570                     interval:
571                       type: string
572                     timeout:
573                       type: string
574                 livenessProbe:
575                   type: object
576                   properties:
577                     disabled:
578                       type: boolean
579   subresources:
580     status: {}
581
582 ---
583 apiVersion: apiextensions.k8s.io/v1beta1
584 kind: CustomResourceDefinition
585 metadata:
586   name: cephobjectstoreusers.ceph.rook.io
587 spec:
588   group: ceph.rook.io
589   names:
590     kind: CephObjectStoreUser
591     listKind: CephObjectStoreUserList
592     plural: cephobjectstoreusers
593     singular: cephobjectstoreuser
594     shortNames:
595     - rcou
596     - objectuser
597   scope: Namespaced
598   version: v1
599   subresources:
600     status: {}
601
602 ---
603 apiVersion: apiextensions.k8s.io/v1beta1
604 kind: CustomResourceDefinition
605 metadata:
606   name: cephobjectrealms.ceph.rook.io
607 spec:
608   group: ceph.rook.io
609   names:
610     kind: CephObjectRealm
611     listKind: CephObjectRealmList
612     plural: cephobjectrealms
613     singular: cephobjectrealm
614   scope: Namespaced
615   version: v1
616   subresources:
617     status: {}
618
619 ---
620 apiVersion: apiextensions.k8s.io/v1beta1
621 kind: CustomResourceDefinition
622 metadata:
623   name: cephobjectzonegroups.ceph.rook.io
624 spec:
625   group: ceph.rook.io
626   names:
627     kind: CephObjectZoneGroup
628     listKind: CephObjectZoneGroupList
629     plural: cephobjectzonegroups
630     singular: cephobjectzonegroup
631   scope: Namespaced
632   version: v1
633   subresources:
634     status: {}
635
636 ---
637 apiVersion: apiextensions.k8s.io/v1beta1
638 kind: CustomResourceDefinition
639 metadata:
640   name: cephobjectzones.ceph.rook.io
641 spec:
642   group: ceph.rook.io
643   names:
644     kind: CephObjectZone
645     listKind: CephObjectZoneList
646     plural: cephobjectzones
647     singular: cephobjectzone
648   scope: Namespaced
649   version: v1
650   subresources:
651     status: {}
652
653 ---
654 apiVersion: apiextensions.k8s.io/v1beta1
655 kind: CustomResourceDefinition
656 metadata:
657   name: cephblockpools.ceph.rook.io
658 spec:
659   group: ceph.rook.io
660   names:
661     kind: CephBlockPool
662     listKind: CephBlockPoolList
663     plural: cephblockpools
664     singular: cephblockpool
665   scope: Namespaced
666   version: v1
667   validation:
668     openAPIV3Schema:
669       properties:
670         spec:
671           properties:
672             failureDomain:
673                 type: string
674             crushRoot:
675                 type: string
676             replicated:
677               properties:
678                 size:
679                   type: integer
680                   minimum: 0
681                   maximum: 9
682                 targetSizeRatio:
683                   type: number
684                 requireSafeReplicaSize:
685                   type: boolean
686             erasureCoded:
687               properties:
688                 dataChunks:
689                   type: integer
690                   minimum: 0
691                   maximum: 9
692                 codingChunks:
693                   type: integer
694                   minimum: 0
695                   maximum: 9
696             compressionMode:
697               type: string
698               enum:
699               - ""
700               - none
701               - passive
702               - aggressive
703               - force
704             enableRBDStats:
705               description: EnableRBDStats is used to enable gathering of statistics
706                 for all RBD images in the pool
707               type: boolean
708             parameters:
709               type: object
710             mirroring:
711               properties:
712                 enabled:
713                   type: boolean
714                 mode:
715                   type: string
716                   enum:
717                   - image
718                   - pool
719                 snapshotSchedules:
720                   type: object
721                   properties:
722                     interval:
723                       type: string
724                     startTime:
725                       type: string
726   subresources:
727     status: {}
728
729 ---
730 apiVersion: apiextensions.k8s.io/v1beta1
731 kind: CustomResourceDefinition
732 metadata:
733   name: volumes.rook.io
734 spec:
735   group: rook.io
736   names:
737     kind: Volume
738     listKind: VolumeList
739     plural: volumes
740     singular: volume
741     shortNames:
742     - rv
743   scope: Namespaced
744   version: v1alpha2
745   subresources:
746     status: {}
747
748 ---
749 apiVersion: apiextensions.k8s.io/v1beta1
750 kind: CustomResourceDefinition
751 metadata:
752   name: objectbuckets.objectbucket.io
753 spec:
754   group: objectbucket.io
755   versions:
756     - name: v1alpha1
757       served: true
758       storage: true
759   names:
760     kind: ObjectBucket
761     listKind: ObjectBucketList
762     plural: objectbuckets
763     singular: objectbucket
764     shortNames:
765       - ob
766       - obs
767   scope: Cluster
768   subresources:
769     status: {}
770
771 ---
772 apiVersion: apiextensions.k8s.io/v1beta1
773 kind: CustomResourceDefinition
774 metadata:
775   name: objectbucketclaims.objectbucket.io
776 spec:
777   versions:
778     - name: v1alpha1
779       served: true
780       storage: true
781   group: objectbucket.io
782   names:
783     kind: ObjectBucketClaim
784     listKind: ObjectBucketClaimList
785     plural: objectbucketclaims
786     singular: objectbucketclaim
787     shortNames:
788       - obc
789       - obcs
790   scope: Namespaced
791   subresources:
792     status: {}