Files
my-rook-config/deploy/examples/csi/rbd/storageclass-test.yaml
T

55 lines
2.4 KiB
YAML
Raw Normal View History

2019-08-01 16:31:50 -06:00
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: replicapool
namespace: rook-ceph # namespace:cluster
2019-08-01 16:31:50 -06:00
spec:
2021-03-02 16:06:34 -07:00
failureDomain: osd
2019-08-01 16:31:50 -06:00
replicated:
size: 1
2020-02-20 11:37:09 +01:00
# Disallow setting pool with replica 1, this could lead to data loss without recovery.
# Make sure you're *ABSOLUTELY CERTAIN* that is what you want
requireSafeReplicaSize: false
# gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity of a given pool
# for more info: https://docs.ceph.com/docs/master/rados/operations/placement-groups/#specifying-expected-pool-size
#targetSizeRatio: .5
2019-08-01 16:31:50 -06:00
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
2021-03-08 12:18:21 +05:30
name: rook-ceph-block
provisioner: rook-ceph.rbd.csi.ceph.com # csi-provisioner-name
2019-08-01 16:31:50 -06:00
parameters:
2021-03-08 12:18:21 +05:30
# clusterID is the namespace where the rook cluster is running
# If you change this namespace, also change the namespace below where the secret namespaces are defined
clusterID: rook-ceph # namespace:cluster
2019-08-01 16:31:50 -06:00
2021-03-08 12:18:21 +05:30
# If you want to use erasure coded pool with RBD, you need to create
# two pools. one erasure coded and one replicated.
# You need to specify the replicated pool here in the `pool` parameter, it is
# used for the metadata of the images.
# The erasure coded pool must be set as the `dataPool` parameter below.
#dataPool: ec-data-pool
pool: replicapool
2019-08-01 16:31:50 -06:00
2021-03-08 12:18:21 +05:30
# RBD image format. Defaults to "2".
imageFormat: "2"
2019-08-01 16:31:50 -06:00
2021-03-08 12:18:21 +05:30
# RBD image features. Available for imageFormat: "2". CSI RBD currently supports only `layering` feature.
imageFeatures: layering
2019-08-01 16:31:50 -06:00
2021-03-08 12:18:21 +05:30
# The secrets contain Ceph admin credentials. These are generated automatically by the operator
# in the same namespace as the cluster.
csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph # namespace:cluster
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph # namespace:cluster
csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph # namespace:cluster
# Specify the filesystem type of the volume. If not specified, csi-provisioner
# will set default as `ext4`.
csi.storage.k8s.io/fstype: ext4
2019-08-01 16:31:50 -06:00
# uncomment the following to use rbd-nbd as mounter on supported nodes
#mounter: rbd-nbd
2020-01-21 13:34:23 +05:30
allowVolumeExpansion: true
2019-08-01 16:31:50 -06:00
reclaimPolicy: Delete