Files
my-rook-config/cluster/examples/kubernetes/ceph/ec-storageclass.yaml
T
Alexander Trost 2080330539 Add dataPool parameter to StorageClass
This change allows block storage to use a given Ceph pool for it's data.

Fixes #1733

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-08-17 16:28:08 +02:00

40 lines
1.5 KiB
YAML

apiVersion: ceph.rook.io/v1beta1
kind: Pool
metadata:
name: replicated-metadata-pool
namespace: rook-ceph
spec:
replicated:
size: 1
---
apiVersion: ceph.rook.io/v1beta1
kind: Pool
metadata:
name: ec-data-pool
namespace: rook-ceph
spec:
# Make sure you have enough nodes and OSDs running bluestore to support the replica size or erasure code chunks.
# For the below settings, you need at least 3 OSDs on different nodes (because the `failureDomain` is `host` by default).
erasureCoded:
dataChunks: 2
codingChunks: 1
---
# The nodes that are going to mount the erasure coded RBD block storage must have Linux kernel >= `4.11`.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-block
provisioner: ceph.rook.io/block
parameters:
# If you want to use erasure coded pool with RBD, you need to create two pools (as seen above): 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.
pool: replicated-metadata-pool
dataPool: ec-data-pool
# Specify the namespace of the rook cluster from which to create volumes.
# If not specified, it will use `rook` as the default namespace of the cluster.
# This is also the namespace where the cluster will be
clusterNamespace: rook-ceph
# Specify the filesystem type of the volume. If not specified, it will use `ext4`.
fstype: xfs