NFSStorageClass
Scope: Cluster
Version: v1alpha1
NFSStorageClass is a Kubernetes Custom Resource that defines a configuration for a Kubernetes StorageClass.
- spec
Required value
Defines a Kubernetes StorageClass configuration.
- spec.chmodPermissions
chmod rights for PVs subdirectory.
Pattern:
^[0-7]{3,4}$
- spec.connection
Required value
Defines a Kubernetes StorageClass configuration.
- spec.connection.host
Required value
NFS server host.
- spec.connection.mtls
This feature is available in SE, SE+, EE, and FE.
Whether to use mTLS — requires TLS to be enabled.
Default:
false
- spec.connection.nfsVersion
Required value
NFS version.
Allowed values:
3
,4.1
,4.2
- string
Required value
NFS server share path.
- spec.connection.tls
This feature is available in SE, SE+, EE, and FE.
Whether to use TLS for connection.
Default:
false
- spec.mountOptions
StorageClass mount options.
- spec.mountOptions.mountMode
NFS share mount mode.
Allowed values:
hard
,soft
- spec.mountOptions.readOnly
Share read-only flag.
- spec.mountOptions.retransmissions
NFS retries before fail.
Allowed values:
1 <= X
- spec.mountOptions.timeout
NFS server timeout.
Allowed values:
1 <= X
- spec.reclaimPolicy
Required value
Defines the behavior when a PersistentVolumeClaim (PVC) is deleted. Two values are allowed:
Delete
— when the PVC is deleted, the associated PersistentVolume (PV) and corresponding data on the NFS server are also deleted.Retain
— when the PVC is deleted, the associated PersistentVolume and data on the NFS server are not deleted and require manual removal by the user. See more in the Kubernetes documentation.
Allowed values:
Delete
,Retain
- spec.volumeBindingMode
Required value
Defines the volume binding mode. The following values are allowed:
Immediate
— the volume is provisioned immediately after the PersistentVolumeClaim (PVC) is created.WaitForFirstConsumer
— the volume is provisioned only when the PVC is first used by a pod. See more in the Kubernetes documentation.
Allowed values:
Immediate
,WaitForFirstConsumer
- spec.volumeCleanup
This feature is available in Enterprise Edition.
Specifies the cleanup method to be applied to the PV’s subdirectory content before deletion. By default, the NFS CSI driver simply deletes the directory created for the Persistent Volume (PV) on the NFS server without performing any data cleanup. When volumeCleanup is enabled, the driver will erase each file in the PV directory:
Discard
— uses the filesystem’s discard (trim) functionality to free data blocks. (This option is available only when supported, for example with NFSv4.2).RandomFillSinglePass
— overwrites the content of each file once with random data before deletion. This is implemented by invoking the utilityshred
.RandomFillThreePass
— overwrites the content of each file three times with random data before deletion. This is implemented by invoking the utilityshred
.
Allowed values:
Discard
,RandomFillSinglePass
,RandomFillThreePass
- spec.workloadNodes
- spec.workloadNodes.nodeSelector
Node selector to specify rules for selecting nodes where Persistent Volumes (PVs) created by this StorageClass are allowed to connect. Combines simple label matches and advanced matching expressions. If this parameter is omitted, NFS shares can be mounted on any node in the cluster running the
Linux
OS.- spec.workloadNodes.nodeSelector.matchExpressions
A list of advanced node selector requirements. Each requirement specifies a key, an operator, and optional values for filtering nodes based on their labels or other fields.
- spec.workloadNodes.nodeSelector.matchExpressions.key
- spec.workloadNodes.nodeSelector.matchExpressions.operator
Allowed values:
In
,NotIn
,Exists
,DoesNotExist
- spec.workloadNodes.nodeSelector.matchExpressions.values
- spec.workloadNodes.nodeSelector.matchLabels
A map of labels that must match exactly with the labels of a node. Nodes that do not match any of the specified labels will be excluded.