Files
my-rook-config/cluster/examples/kubernetes/ceph/storageclass-ec.yaml
T
travisn ceb2be1aca refactor the ceph cluster crd and related example yamls
The RBAC is tedious to copy everywhere with the cluster.yaml and is confusing to newcomers.
The common resources are now factored into the operator-common.yaml for the common scenario
of creating a single cluster. Examples are now added for configuration of the operator
and cluster crds to provide a more complete set.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-04 12:42:07 -06:00

47 lines
2.0 KiB
YAML

#################################################################################################################
# Create a storage class with a data pool that uses erasure coding for a production environment.
# A metadata pool is created with replication enabled. A minimum of 3 nodes with OSDs are required in this
# example since the default failureDomain is host.
# kubectl create -f storageclass-ec.yaml
#################################################################################################################
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: replicated-metadata-pool
namespace: rook-ceph
spec:
replicated:
size: 2
---
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
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 `blockPool` parameter, it is used for the metadata of the images.
# The erasure coded pool must be set as the `dataBlockPool` parameter below.
blockPool: replicated-metadata-pool
dataBlockPool: 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