rbd.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. apiVersion: ceph.rook.io/v1
  2. kind: CephBlockPool
  3. metadata:
  4. name: replicapool
  5. namespace: alephtwo-ns
  6. spec:
  7. failureDomain: host
  8. replicated:
  9. size: 2
  10. ---
  11. apiVersion: storage.k8s.io/v1
  12. kind: StorageClass
  13. metadata:
  14. name: rook-ceph-block
  15. # Change "rook-ceph" provisioner prefix to match the operator namespace if needed
  16. provisioner: rook-ceph.rbd.csi.ceph.com
  17. parameters:
  18. # clusterID is the namespace where the rook cluster is running
  19. clusterID: alephtwo-ns
  20. # Ceph pool into which the RBD image shall be created
  21. pool: ceph-blockpool
  22. # (optional) mapOptions is a comma-separated list of map options.
  23. # For krbd options refer
  24. # https://docs.ceph.com/docs/master/man/8/rbd/#kernel-rbd-krbd-options
  25. # For nbd options refer
  26. # https://docs.ceph.com/docs/master/man/8/rbd-nbd/#options
  27. # mapOptions: lock_on_read,queue_depth=1024
  28. # (optional) unmapOptions is a comma-separated list of unmap options.
  29. # For krbd options refer
  30. # https://docs.ceph.com/docs/master/man/8/rbd/#kernel-rbd-krbd-options
  31. # For nbd options refer
  32. # https://docs.ceph.com/docs/master/man/8/rbd-nbd/#options
  33. # unmapOptions: force
  34. # RBD image format. Defaults to "2".
  35. imageFormat: "2"
  36. # RBD image features
  37. # Available for imageFormat: "2". Older releases of CSI RBD
  38. # support only the `layering` feature. The Linux kernel (KRBD) supports the
  39. # full complement of features as of 5.4
  40. # `layering` alone corresponds to Ceph's bitfield value of "2" ;
  41. # `layering` + `fast-diff` + `object-map` + `deep-flatten` + `exclusive-lock` together
  42. # correspond to Ceph's OR'd bitfield value of "63". Here we use
  43. # a symbolic, comma-separated format:
  44. # For 5.4 or later kernels:
  45. #imageFeatures: layering,fast-diff,object-map,deep-flatten,exclusive-lock
  46. # For 5.3 or earlier kernels:
  47. imageFeatures: layering
  48. # The secrets contain Ceph admin credentials.
  49. csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner
  50. csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
  51. csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner
  52. csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
  53. csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node
  54. csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
  55. # Specify the filesystem type of the volume. If not specified, csi-provisioner
  56. # will set default as `ext4`. Note that `xfs` is not recommended due to potential deadlock
  57. # in hyperconverged settings where the volume is mounted on the same node as the osds.
  58. csi.storage.k8s.io/fstype: ext4
  59. # Delete the rbd volume when a PVC is deleted
  60. reclaimPolicy: Delete
  61. # Optional, if you want to add dynamic resize for PVC.
  62. # For now only ext3, ext4, xfs resize support provided, like in Kubernetes itself.
  63. allowVolumeExpansion: true