Abstract
CSI Driver LVM docs index
CSI driver LVM#
This driver requires that LVM be deployed on the nodes it runs on.
CSI driver LVM Chart#
This chart deploys a DaemonSet
that handles provisioning of local storage
resources.
- apiVersion
LVM Helm Chart
This file contains the settings required to set up a StorageClass that supports dynamic provisioning of Logical Volume Manager volumes.
Enable, if you want to install storage classes with v0.3.x backward-compatible
csi-lvm-sc-*
names### # ```{rubric} LVM Helm Chart # ``` # --- # This file contains the settings required to set up a {term}`StorageClass` that # supports dynamic provisioning of Logical Volume Manager volumes. # # Enable, if you want to install storage classes with v0.3.x # backward-compatible `csi-lvm-sc-*` names # # ```{literalinclude} /csi-driver-lvm/Chart.yaml # :language: yaml # ``` apiVersion: v1 appVersion: v0.6.0 description: local persisted storage for lvm home: https://metal-stack.io keywords: - storage - block-storage - volume name: csi-driver-lvm sources: - https://github.com/metal-stack version: 0.7.0
CSI driver LVM Values#
You can adjust the deployment of the CSI driver LVM with the contents
of the file csi-driver-lvm/values.yaml
.
- compat03x
CSI Driver LVM configuration
This file contains the settings required to set up a StorageClass that supports dynamic provisioning of Logical Volume Manager volumes.
Enable, if you want to install storage classes with v0.3.x backward-compatible
csi-lvm-sc-*
namescompat03x: false customCSISidecars: ### # To enable custom CSI Sidecars, you should # uncomment the lines in the code block below and set # `enabled: true`. # # Set to `false` by default. # # ```{code-block} yaml # :caption: CSI Sidecar Images # attacher: k8s.gcr.io/sig-storage/csi-attacher:v3.5.0 # livenessprobe: k8s.gcr.io/sig-storage/livenessprobe:v2.7.0 # provisioner: k8s.gcr.io/sig-storage/csi-provisioner:v3.2.1 # registrar: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.1 # resizer: k8s.gcr.io/sig-storage/csi-resizer:v1.6.0 # ``` enabled: false ### # Configure a custom {term}`kubelet` write path if necessary. kubernetes: kubeletPath: /var/lib/kubelet
- kubernetes
Configure a custom kubelet write path if necessary.
- lvm
Logical Volume Manager
This is where you will define the StorageClass for this driver along with a few other settings.
lvm: ### # This one you should change devicePattern: /dev/(nvme[0-9]n[0-9]|sd[a-z][0-9]) driverName: lvm.csi.metal-stack.io ### # You will want to change this for read-only file systems # For example, in Talos OS, set this to {file}`/var/etc/lvm`. hostWritePath: /etc/lvm ### # these are primarily for testing purposes storageClassStub: csi-lvm vgName: csi-lvm
- nodeSelector
Node Selection
The plugin DaemonSet will run on all nodes if it has a toleration, so it is not necessary to set a nodeSelector for it.
nodeSelector: plugin: kubernetes.io/os: linux provisioner: node-role.kubernetes.io/control-plane: true
- pluginImage
Plugin Image
Use this to configure settings for the CSI Plugin Image.
pluginImage: pullPolicy: IfNotPresent repository: ghcr.io/metal-stack/csi-driver-lvm tag: v0.5.2
- provisionerImage
Provisioner Image
Use this to configure settings for the CSI Provisioner Image
provisionerImage: pullPolicy: IfNotPresent repository: ghcr.io/metal-stack/csi-driver-lvm-provisioner tag: v0.5.2
- rbac
Role Based Access Control
Set
create: true
if you want to enable this.rbac: create: true pspEnabled: true sidecarImages: attacher: k8s.gcr.io/sig-storage/csi-attacher:v3.5.0 livenessprobe: k8s.gcr.io/sig-storage/livenessprobe:v2.7.0 provisioner: k8s.gcr.io/sig-storage/csi-provisioner:v3.2.1 registrar: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.1 resizer: k8s.gcr.io/sig-storage/csi-resizer:v1.6.0
- storageClasses
StorageClass configuration
There are three StorageClasses defined here, linear, mirror, and striped. These are what they sound like. That is linear will provision a plain PersistentVolume as block storage, mirror will provision something similar to a RAID 1 setup in the PersistentVolume, and striped will provision something similar to a RAID 0 setup in the PersistentVolume.
Mirror and Striped
The driver does not support combining modes to create RAID 10 setups, or or similar arrangements as of the time of this writing.
storageClasses: ### # This will configure plain block storage. # # ```{literalinclude} /csi-driver-lvm/values.yaml # :language: yaml # :start-at: " linear:\n" # :end-before: "####" # ``` linear: additionalAnnotations: [] enabled: false reclaimPolicy: Delete #### ### # This will configure something like RAID 1 storage. # # ```{literalinclude} /csi-driver-lvm/values.yaml # :language: yaml # :start-at: " mirror:\n" # :end-at: " reclaimPolicy: Delete\n" # ``` mirror: ### # This might be used to mark one of the {term}`StorageClass`es as default: # # ```{code-block} yaml # storageclass.kubernetes.io/is-default-class: "true" # ``` additionalAnnotations: [] enabled: false reclaimPolicy: Delete ### # This will configure something like RAID 0 storage. # # ```{literalinclude} /csi-driver-lvm/values.yaml # :language: yaml # :start-at: " striped:\n" # :end-at: " reclaimPolicy: Delete\n" # ``` striped: additionalAnnotations: [] enabled: false reclaimPolicy: Delete
- tolerations
Driver workload tolerations
Configure the driver to run on control plane or other tainted nodes by adding Tolerations here.
tolerations: plugin: # - key: node-role.kubernetes.io/master # operator: Exists # effect: NoSchedule # - key: node-role.kubernetes.io/control-plane # operator: Exists # effect: NoSchedule provisioner: # - key: node-role.kubernetes.io/master # operator: Exists # effect: NoSchedule # - key: node-role.kubernetes.io/control-plane # operator: Exists # effect: NoSchedule
Section author: Xander Harris xandertheharris@gmail.com