SCSIStorageClass
Scope: Cluster
Version: v1alpha1
SCSIStorageClass is a Kubernetes Custom Resource that defines a configuration for a Kubernetes Storage class.
- spec
Required value
Defines a Kubernetes Storage class configuration.
- spec.reclaimPolicy
Required value
Reclaim policy defines the policy for reclaiming the SCSI device when the PersistentVolume is deleted.
Allowed values:
Delete
,Retain
- spec.scsiDeviceSelector
Required value
Selector for choosing SCSIDevice resources to be used for PV provisioning by the CSI driver. Only SCSIDevice objects that satisfy the criteria defined below will be eligible for selection by the CSI driver for this StorageClass.
- spec.scsiDeviceSelector.matchExpressions
An array of label selector requirements. Each requirement specifies a key, an operator, and an optional list of values. An SCSIDevice must meet these conditions to be selected.
- spec.scsiDeviceSelector.matchExpressions.key
The label key that the selector applies to.
- spec.scsiDeviceSelector.matchExpressions.operator
The operator to apply for the key.
Allowed values:
In
,NotIn
,Exists
,DoesNotExist
- spec.scsiDeviceSelector.matchExpressions.values
A list of string values. Required for operators such as In or NotIn, and ignored for Exists or DoesNotExist.
- spec.scsiDeviceSelector.matchLabels
A map of key-value pairs that must exactly match the labels on a SCSIDevice. Devices that do not have all of the specified labels with the exact values will be excluded.
- spec.volumeCleanup
VolumeCleanup defines the policy for cleaning up the SCSI device when the PersistentVolume is deleted. If ommited, no cleanup will be performed:
Discard
— sends a SCSI TRIM or discard command to the device, marking the blocks as free without necessarily overwriting the data. This option is typically faster but may not securely erase data.RandomFillSinglePass
— overwrites the entire device with random data in a single pass. This option is not recommended for solid-state drives, as it reduces the lifespan of the drive.RandomFillThreePass
— overwrites the device with random data in three separate passes. This option is not recommended for solid-state drives, as it reduces the lifespan of the drive.
Allowed values:
Discard
,RandomFillSinglePass
,RandomFillThreePass