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:
|
2020-09-23 17:02:11 +00:00
|
|
|
# (required) 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.
|
2020-06-10 06:23:03 +00:00
|
|
|
# Ensure to create an entry in the configmap named ceph-csi-config, based on
|
2019-04-22 21:35:39 +00:00
|
|
|
# csi-config-map-sample.yaml, to accompany the string chosen to
|
|
|
|
# represent the Ceph cluster in clusterID below
|
|
|
|
clusterID: <cluster-id>
|
2020-09-23 08:29:17 +00:00
|
|
|
|
|
|
|
# (optional) If you want to use erasure coded pool with RBD, you need to
|
|
|
|
# create two pools. one erasure coded and one replicated.
|
2019-09-10 09:56:08 +00:00
|
|
|
# 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.
|
2020-09-23 08:29:17 +00:00
|
|
|
# dataPool: <ec-data-pool>
|
|
|
|
|
|
|
|
# (required) Ceph pool into which the RBD image shall be created
|
2024-02-26 13:59:58 +00:00
|
|
|
# (optional) If the topologyConstrainedPools is provided
|
2020-09-23 08:29:17 +00:00
|
|
|
# eg: pool: rbdpool
|
|
|
|
pool: <rbd-pool-name>
|
2018-07-18 14:49:15 +00:00
|
|
|
|
2022-02-17 06:24:47 +00:00
|
|
|
# (optional) RBD image features, CSI creates image with image-format 2 CSI
|
2022-02-17 06:01:34 +00:00
|
|
|
# RBD currently supports `layering`, `journaling`, `exclusive-lock`,
|
2022-03-01 05:54:13 +00:00
|
|
|
# `object-map`, `fast-diff`, `deep-flatten` features.
|
|
|
|
# Refer https://docs.ceph.com/en/latest/rbd/rbd-config-ref/#image-features
|
|
|
|
# for image feature dependencies.
|
2021-09-16 10:38:04 +00:00
|
|
|
# imageFeatures: layering,journaling,exclusive-lock,object-map,fast-diff
|
|
|
|
imageFeatures: "layering"
|
2018-08-09 13:07:00 +00:00
|
|
|
|
2023-02-23 17:07:43 +00:00
|
|
|
# (optional) Options to pass to the `mkfs` command while creating the
|
|
|
|
# filesystem on the RBD device. Check the man-page for the `mkfs` command
|
|
|
|
# for the filesystem for more details. When `mkfsOptions` is set here, the
|
|
|
|
# defaults will not be used, consider including them in this parameter.
|
|
|
|
#
|
|
|
|
# The default options depend on the csi.storage.k8s.io/fstype setting:
|
|
|
|
# - ext4: "-m0 -Enodiscard,lazy_itable_init=1,lazy_journal_init=1"
|
2023-10-17 21:04:30 +00:00
|
|
|
# - xfs: "-K"
|
2023-02-23 17:07:43 +00:00
|
|
|
#
|
|
|
|
# mkfsOptions: "-m0 -Ediscard -i1024"
|
|
|
|
|
2021-10-05 10:47:11 +00:00
|
|
|
# (optional) Specifies whether to try other mounters in case if the current
|
|
|
|
# mounter fails to mount the rbd image for any reason. True means fallback
|
|
|
|
# to next mounter, default is set to false.
|
|
|
|
# Note: tryOtherMounters is currently useful to fallback from krbd to rbd-nbd
|
|
|
|
# in case if any of the specified imageFeatures is not supported by krbd
|
|
|
|
# driver on node scheduled for application pod launch, but in the future this
|
|
|
|
# should work with any mounter type.
|
|
|
|
# tryOtherMounters: false
|
|
|
|
|
2020-09-23 17:02:11 +00:00
|
|
|
# (optional) mapOptions is a comma-separated list of map options.
|
2020-09-08 05:23:28 +00:00
|
|
|
# For krbd options refer
|
|
|
|
# https://docs.ceph.com/docs/master/man/8/rbd/#kernel-rbd-krbd-options
|
|
|
|
# For nbd options refer
|
|
|
|
# https://docs.ceph.com/docs/master/man/8/rbd-nbd/#options
|
2021-11-16 13:14:00 +00:00
|
|
|
# Format:
|
|
|
|
# mapOptions: "<mounter>:op1,op2;<mounter>:op1,op2"
|
|
|
|
# An empty mounter field is treated as krbd type for compatibility.
|
|
|
|
# eg:
|
|
|
|
# mapOptions: "krbd:lock_on_read,queue_depth=1024;nbd:try-netlink"
|
2020-09-08 05:23:28 +00:00
|
|
|
|
2020-09-23 17:02:11 +00:00
|
|
|
# (optional) unmapOptions is a comma-separated list of unmap options.
|
2020-09-08 05:23:28 +00:00
|
|
|
# For krbd options refer
|
|
|
|
# https://docs.ceph.com/docs/master/man/8/rbd/#kernel-rbd-krbd-options
|
|
|
|
# For nbd options refer
|
|
|
|
# https://docs.ceph.com/docs/master/man/8/rbd-nbd/#options
|
2021-11-16 13:14:00 +00:00
|
|
|
# Format:
|
|
|
|
# unmapOptions: "<mounter>:op1,op2;<mounter>:op1,op2"
|
|
|
|
# An empty mounter field is treated as krbd type for compatibility.
|
|
|
|
# eg:
|
|
|
|
# unmapOptions: "krbd:force;nbd:force"
|
2020-09-08 05:23:28 +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
|
2020-09-23 17:02:11 +00:00
|
|
|
|
|
|
|
# (optional) Specify the filesystem type of the volume. If not specified,
|
2019-08-13 10:55:52 +00:00
|
|
|
# csi-provisioner will set default as `ext4`.
|
2019-09-24 09:06:50 +00:00
|
|
|
csi.storage.k8s.io/fstype: ext4
|
2020-09-23 17:02:11 +00:00
|
|
|
|
|
|
|
# (optional) uncomment the following to use rbd-nbd as mounter
|
|
|
|
# on supported nodes
|
2019-02-07 09:59:26 +00:00
|
|
|
# mounter: rbd-nbd
|
2019-12-13 11:41:32 +00:00
|
|
|
|
2021-08-18 07:21:23 +00:00
|
|
|
# (optional) ceph client log location, eg: rbd-nbd
|
|
|
|
# By default host-path /var/log/ceph of node is bind-mounted into
|
2021-09-01 11:53:43 +00:00
|
|
|
# csi-rbdplugin pod at /var/log/ceph mount path. This is to configure
|
|
|
|
# target bindmount path used inside container for ceph clients logging.
|
2024-11-12 20:42:00 +00:00
|
|
|
# See docs/design/proposals/rbd-nbd.md for available configuration options.
|
2021-08-18 07:21:23 +00:00
|
|
|
# cephLogDir: /var/log/ceph
|
|
|
|
|
2021-09-01 11:53:43 +00:00
|
|
|
# (optional) ceph client log strategy
|
|
|
|
# By default, log file belonging to a particular volume will be deleted
|
|
|
|
# on unmap, but you can choose to just compress instead of deleting it
|
|
|
|
# or even preserve the log file in text format as it is.
|
|
|
|
# Available options `remove` or `compress` or `preserve`
|
|
|
|
# cephLogStrategy: remove
|
|
|
|
|
2020-09-23 17:02:11 +00:00
|
|
|
# (optional) Prefix to use for naming RBD images.
|
2020-05-22 05:08:55 +00:00
|
|
|
# If omitted, defaults to "csi-vol-".
|
|
|
|
# volumeNamePrefix: "foo-bar-"
|
|
|
|
|
2020-09-23 17:02:11 +00:00
|
|
|
# (optional) 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
|
|
|
|
2022-07-07 16:31:38 +00:00
|
|
|
# (optional) Select the encryption type when encrypted: "true" above.
|
|
|
|
# Valid values are:
|
|
|
|
# "file": Enable file encryption on the mounted filesystem
|
|
|
|
# "block": Encrypt RBD block device
|
|
|
|
# When unspecified assume type "block". "file" and "block" are
|
2024-09-04 08:13:03 +00:00
|
|
|
# mutually exclusive.
|
2022-07-07 16:31:38 +00:00
|
|
|
# encryptionType: "block"
|
|
|
|
|
2020-09-23 17:02:11 +00:00
|
|
|
# (optional) Use external key management system for encryption passphrases by
|
|
|
|
# specifying a unique ID matching KMS ConfigMap. The ID is only used for
|
|
|
|
# correlation to configmap 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
|
|
|
|
2022-05-24 03:38:42 +00:00
|
|
|
# Image striping, Refer https://docs.ceph.com/en/latest/man/8/rbd/#striping
|
|
|
|
# For more details
|
|
|
|
# (optional) stripe unit in bytes.
|
|
|
|
# stripeUnit: <>
|
|
|
|
# (optional) objects to stripe over before looping.
|
|
|
|
# stripeCount: <>
|
|
|
|
# (optional) The object size in bytes.
|
|
|
|
# objectSize: <>
|
2018-07-18 14:49:15 +00:00
|
|
|
reclaimPolicy: Delete
|
2019-11-27 12:16:11 +00:00
|
|
|
allowVolumeExpansion: true
|
2023-10-17 21:04:30 +00:00
|
|
|
|
|
|
|
# If filesystem is xfs, nouuid will be automatically added to mountOptions
|
2019-07-03 11:45:23 +00:00
|
|
|
mountOptions:
|
|
|
|
- discard
|