Documentation/Storage-Configuration/Ceph-CSI/csi-configuration.md
CSI drivers are managed by the ceph-csi-operator. This means CSI tuning is done
through CSI operator custom resources (OperatorConfig and Driver) and the ConfigMap rook-csi-operator-image-set-configmap.
!!! important
The Rook ConfigMap rook-ceph-operator-config no longer applies CSI settings.
This document provides some example CSI settings that may need to be customized.
Per the ceph-csi-operator design,
OperatorConfig holds operator-wide defaults. Each Driver CR manages one driver instance and
allows per-driver customization. Driver spec fields take precedence over matching
driverSpecDefaults on OperatorConfig.
Many settings can be set on either resource. Use them as follows:
OperatorConfig (ceph-csi-operator-config) — one per operator namespace. Set
spec.driverSpecDefaults for defaults that apply to all CSI drivers (RBD, CephFS, NFS, and
others), such as shared images, log level, controller replica count, or node plugin kubelet path.Driver — one CR per driver type (for example rook-ceph.rbd.csi.ceph.com). Use spec on
a Driver to override those defaults for a single driver, or to set options that only apply
to that driver (for example deployCsiAddons on RBD only, or cephFsClientType on CephFS).The default CSI settings are applied by Rook in deploy/examples/operator.yaml (the section after the operator ConfigMap).
For the complete list of ceph-csi-operator chart settings, see: Ceph-CSI Drivers chart configuration.
Previously: CSI_ENABLE_CSIADDONS in rook-ceph-operator-config.
Now set deployCsiAddons on OperatorConfig or Driver.
# OperatorConfig (manifest)
apiVersion: csi.ceph.io/v1
kind: OperatorConfig
metadata:
name: ceph-csi-operator-config
namespace: rook-ceph
spec:
driverSpecDefaults:
deployCsiAddons: true
Previously: CSI_*_IMAGE keys in rook-ceph-operator-config. Now use the ImageSet ConfigMap referenced by OperatorConfig.
See deploy/examples/operator.yaml.
Previously: CSI_PROVISIONER_REPLICAS in rook-ceph-operator-config.
Now use controllerPlugin.replicas and controllerPlugin.deploymentStrategy.
# OperatorConfig (manifest)
spec:
driverSpecDefaults:
controllerPlugin:
replicas: 1
deploymentStrategy:
type: Recreate
Previously: CSI_FORCE_CEPHFS_KERNEL_CLIENT in rook-ceph-operator-config.
Now use cephFsClientType on OperatorConfig or the CephFS Driver.
# Driver-specific override (manifest)
apiVersion: csi.ceph.io/v1
kind: Driver
metadata:
name: rook-ceph.cephfs.csi.ceph.com
namespace: rook-ceph
spec:
cephFsClientType: fuse
Previously: CSI_DRIVER_NAME_PREFIX in rook-ceph-operator-config.
Now the Driver CR metadata.name is the provisioner name used in StorageClasses and
VolumeSnapshotClasses.
apiVersion: csi.ceph.io/v1
kind: Driver
metadata:
name: my-prefix.rbd.csi.ceph.com
namespace: rook-ceph
spec:
controllerPlugin: {}
nodePlugin:
updateStrategy:
type: RollingUpdate
Previously: NFS CSI deployment was reconciled by the Rook operator.
Now create the NFS Driver CR.
kubectl apply -f deploy/examples/csi/nfs/driver.yaml
Previously: CSI_KUBELET_DIR_PATH and CSI_PLUGIN_ENABLE_SELINUX_HOST_MOUNT in
rook-ceph-operator-config.
Now use nodePlugin.kubeletDirPath and nodePlugin.enableSeLinuxHostMount.
# OperatorConfig (manifest)
spec:
driverSpecDefaults:
nodePlugin:
kubeletDirPath: /var/lib/kubelet
enableSeLinuxHostMount: true