2019-02-07 09:59:26 +00:00
|
|
|
---
|
2018-07-18 14:49:15 +00:00
|
|
|
apiVersion: storage.k8s.io/v1
|
|
|
|
kind: StorageClass
|
|
|
|
metadata:
|
2019-05-07 14:49:45 +00:00
|
|
|
name: csi-rbd-sc
|
2019-03-13 05:09:58 +00:00
|
|
|
provisioner: rbd.csi.ceph.com
|
2020-01-24 16:26:56 +00:00
|
|
|
# If topology based provisioning is desired, delayed provisioning of
|
|
|
|
# PV is required and is enabled using the following attribute
|
|
|
|
# For further information read TODO<doc>
|
|
|
|
# volumeBindingMode: WaitForFirstConsumer
|
2018-07-18 14:49:15 +00:00
|
|
|
parameters:
|
2019-03-12 15:57:36 +00:00
|
|
|
# String representing a Ceph cluster to provision storage from.
|
2019-03-13 13:46:56 +00:00
|
|
|
# Should be unique across all Ceph clusters in use for provisioning,
|
2019-03-12 15:57:36 +00:00
|
|
|
# cannot be greater than 36 bytes in length, and should remain immutable for
|
|
|
|
# the lifetime of the StorageClass in use.
|
2019-04-22 21:35:39 +00:00
|
|
|
# Ensure to create an entry in the config map named ceph-csi-config, based on
|
|
|
|
# csi-config-map-sample.yaml, to accompany the string chosen to
|
|
|
|
# represent the Ceph cluster in clusterID below
|
|
|
|
clusterID: <cluster-id>
|
2019-09-10 09:56:08 +00:00
|
|
|
# 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
|
2019-02-07 09:59:26 +00:00
|
|
|
pool: rbd
|
2018-07-18 14:49:15 +00:00
|
|
|
|
2019-09-11 07:08:55 +00:00
|
|
|
# RBD image features, CSI creates image with image-format 2
|
2019-02-07 09:59:26 +00:00
|
|
|
# CSI RBD currently supports only `layering` feature.
|
|
|
|
imageFeatures: layering
|
2018-08-09 13:07:00 +00:00
|
|
|
|
2019-06-01 21:26:42 +00:00
|
|
|
# The secrets have to contain Ceph credentials with required access
|
|
|
|
# to the 'pool'.
|
2019-02-07 09:59:26 +00:00
|
|
|
csi.storage.k8s.io/provisioner-secret-name: csi-rbd-secret
|
|
|
|
csi.storage.k8s.io/provisioner-secret-namespace: default
|
2019-11-27 12:16:11 +00:00
|
|
|
csi.storage.k8s.io/controller-expand-secret-name: csi-rbd-secret
|
|
|
|
csi.storage.k8s.io/controller-expand-secret-namespace: default
|
2019-07-03 10:02:36 +00:00
|
|
|
csi.storage.k8s.io/node-stage-secret-name: csi-rbd-secret
|
|
|
|
csi.storage.k8s.io/node-stage-secret-namespace: default
|
2019-08-13 10:55:52 +00:00
|
|
|
# Specify the filesystem type of the volume. If not specified,
|
|
|
|
# csi-provisioner will set default as `ext4`.
|
2019-09-24 09:06:50 +00:00
|
|
|
csi.storage.k8s.io/fstype: ext4
|
2019-02-07 09:59:26 +00:00
|
|
|
# uncomment the following to use rbd-nbd as mounter on supported nodes
|
|
|
|
# mounter: rbd-nbd
|
2019-12-13 11:41:32 +00:00
|
|
|
|
2020-05-22 05:08:55 +00:00
|
|
|
# Prefix to use for naming RBD images.
|
|
|
|
# If omitted, defaults to "csi-vol-".
|
|
|
|
# volumeNamePrefix: "foo-bar-"
|
|
|
|
|
2019-12-13 11:41:32 +00:00
|
|
|
# Instruct the plugin it has to encrypt the volume
|
examples: rbd/storageclass.yaml causes Python excetion with yamllint
While running the 'make test' target and have 'yamllint' available, the
test fails with the following exception:
yamllint -s -d {extends: default, rules: {line-length: {allow-non-breakable-inline-mappings: true}},ignore: charts/*/templates/*.yaml} ./examples/rbd/storageclass.yaml
Traceback (most recent call last):
File "/usr/local/bin/yamllint", line 11, in <module>
sys.exit(run())
File "/usr/local/lib/python3.6/site-packages/yamllint/cli.py", line 181, in run
problems = linter.run(f, conf, filepath)
File "/usr/local/lib/python3.6/site-packages/yamllint/linter.py", line 237, in run
content = input.read()
File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1947: ordinal not in range(128)
The quotes used in the comments seem to be non-ascii characters.
Replacing these with standard " makes the test pass again.
This problem occurred while running tests in a container based on the
Ceph image (CentOS-7) with Python 3. Travis CI might still use Python 2
for yamllint, and hide the problem.
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-03-24 07:48:27 +00:00
|
|
|
# By default it is disabled. Valid values are "true" or "false".
|
|
|
|
# A string is expected here, i.e. "true", not true.
|
2019-12-13 11:41:32 +00:00
|
|
|
# encrypted: "true"
|
2020-01-29 11:44:45 +00:00
|
|
|
|
2020-02-06 16:23:14 +00:00
|
|
|
# Use external key management system for encryption passphrases by specifying
|
|
|
|
# a unique ID matching KMS ConfigMap. The ID is only used for correlation to
|
|
|
|
# config map entry.
|
2020-01-29 11:44:45 +00:00
|
|
|
# encryptionKMSID: <kms-config-id>
|
2020-01-24 16:26:56 +00:00
|
|
|
|
|
|
|
# Add topology constrained pools configuration, if topology based pools
|
|
|
|
# are setup, and topology constrained provisioning is required.
|
|
|
|
# For further information read TODO<doc>
|
|
|
|
# topologyConstrainedPools: |
|
|
|
|
# [{"poolName":"pool0",
|
2020-04-06 20:19:13 +00:00
|
|
|
# "dataPool":"ec-pool0" # optional, erasure-coded pool for data
|
|
|
|
# "domainSegments":[
|
|
|
|
# {"domainLabel":"region","value":"east"},
|
|
|
|
# {"domainLabel":"zone","value":"zone1"}]},
|
2020-01-24 16:26:56 +00:00
|
|
|
# {"poolName":"pool1",
|
2020-04-06 20:19:13 +00:00
|
|
|
# "dataPool":"ec-pool1" # optional, erasure-coded pool for data
|
|
|
|
# "domainSegments":[
|
|
|
|
# {"domainLabel":"region","value":"east"},
|
|
|
|
# {"domainLabel":"zone","value":"zone2"}]},
|
2020-01-24 16:26:56 +00:00
|
|
|
# {"poolName":"pool2",
|
2020-04-06 20:19:13 +00:00
|
|
|
# "dataPool":"ec-pool2" # optional, erasure-coded pool for data
|
|
|
|
# "domainSegments":[
|
|
|
|
# {"domainLabel":"region","value":"west"},
|
|
|
|
# {"domainLabel":"zone","value":"zone1"}]}
|
|
|
|
# ]
|
2020-01-24 16:26:56 +00:00
|
|
|
|
2018-07-18 14:49:15 +00:00
|
|
|
reclaimPolicy: Delete
|
2019-11-27 12:16:11 +00:00
|
|
|
allowVolumeExpansion: true
|
2019-07-03 11:45:23 +00:00
|
|
|
mountOptions:
|
|
|
|
- discard
|