website/content/v1.14/reference/configuration/block/volumeconfig.md
{{< highlight yaml >}} apiVersion: v1alpha1 kind: VolumeConfig name: EPHEMERAL # Name of the volume.
provisioning: # The disk selector expression. diskSelector: match: disk.transport == "nvme" # The Common Expression Language (CEL) expression to match the disk. maxSize: 50GiB # The maximum size of the volume, if not specified the volume can grow to the size of the
# # The minimum size of the volume.
# minSize: 2.5GiB
{{< /highlight >}}
| Field | Type | Description | Value(s) |
|---|---|---|---|
name | string | Name of the volume. | |
provisioning | <a href="#VolumeConfig.provisioning">ProvisioningSpec</a> | The provisioning describes how the volume is provisioned. | |
filesystem | <a href="#VolumeConfig.filesystem">SystemVolumeFilesystemSpec</a> | The filesystem describes how the volume is formatted. |
Note: this only takes effect at the time the volume is formatted. | |
|encryption |<a href="#VolumeConfig.encryption">EncryptionSpec</a> |The encryption describes how the volume is encrypted. | |
|mount |<a href="#VolumeConfig.mount">MountSpec</a> |The mount describes additional mount options. | |
|trim |<a href="#VolumeConfig.trim">TrimConfig</a> |The trim describes the per-volume filesystem trim (fstrim) configuration. | |
|scrub |<a href="#VolumeConfig.scrub">ScrubConfig</a> |The scrub describes the per-volume filesystem scrub configuration. | |
ProvisioningSpec describes how the volume is provisioned.
| Field | Type | Description | Value(s) |
|---|---|---|---|
diskSelector | <a href="#VolumeConfig.provisioning.diskSelector">DiskSelector</a> | The disk selector expression. | |
grow | bool | Should the volume grow to the size of the disk (if possible). | |
minSize | ByteSize | The minimum size of the volume. |
Size is specified in bytes, but can be expressed in human readable format, e.g. 100MB. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
minSize: 2.5GiB
{{< /highlight >}}</details> | |
|maxSize |Size |The maximum size of the volume, if not specified the volume can grow to the size of the
disk.
Size is specified in bytes or in percents. It can be expressed in human readable format, e.g. 100MB. <details><summary>Show example(s)</summary>{{< highlight yaml >}} maxSize: 50GiB {{< /highlight >}}{{< highlight yaml >}} maxSize: 80% {{< /highlight >}}</details> | |
DiskSelector selects a disk for the volume.
| Field | Type | Description | Value(s) |
|---|---|---|---|
match | Expression | The Common Expression Language (CEL) expression to match the disk. <details><summary>Show example(s)</summary>match disks with size between 120GB and 1TB:{{< highlight yaml >}} | |
| match: disk.size > 120u * GB && disk.size < 1u * TB | |||
| {{< /highlight >}}match SATA disks that are not rotational and not system disks:{{< highlight yaml >}} | |||
| match: disk.transport == "sata" && !disk.rotational && !system_disk | |||
| {{< /highlight >}}</details> |
SystemVolumeFilesystemSpec describes how the system volume is formatted.
The filesystem type is fixed for system volumes, and project quota support is configured via machine features, so only the filesystem-specific tunables are exposed here.
| Field | Type | Description | Value(s) |
|---|---|---|---|
xfs | <a href="#VolumeConfig.filesystem.xfs">XFSSpec</a> | XFS-specific filesystem options. |
XFSSpec configures XFS-specific filesystem options.
| Field | Type | Description | Value(s) |
|---|---|---|---|
minAllocationGroupSize | ByteSize | The minimum size of an XFS allocation group. |
On non-rotational devices mkfs.xfs sizes the allocation group count to the number of
CPUs, which on machines with many cores and a modest disk yields hundreds of tiny
allocation groups. Talos bounds the allocation group size from below to keep the geometry
sane; this option overrides that bound.
Set to zero to use the mkfs.xfs defaults unchanged.
Note: this only affects volumes at the time they are formatted.
Size is specified in bytes, but can be expressed in human readable format, e.g. 100MB. <details><summary>Show example(s)</summary>{{< highlight yaml >}} minAllocationGroupSize: 128GiB {{< /highlight >}}</details> | |
EncryptionSpec represents volume encryption settings.
{{< highlight yaml >}} encryption: provider: luks2 # Encryption provider to use for the encryption. # Defines the encryption keys generation and storage method. keys: - slot: 0 # Key slot number for LUKS2 encryption. # Key which value is stored in the configuration file. static: passphrase: exampleKey # Defines the static passphrase value.
# # KMS managed encryption key.
# kms:
# endpoint: https://192.168.88.21:4443 # KMS endpoint to Seal/Unseal the key.
- slot: 1 # Key slot number for LUKS2 encryption.
# KMS managed encryption key.
kms:
endpoint: https://example-kms-endpoint.com # KMS endpoint to Seal/Unseal the key.
cipher: aes-xts-plain64 # Cipher to use for the encryption. Depends on the encryption provider.
blockSize: 4096 # Defines the encryption sector size.
# # Additional --perf parameters for the LUKS2 encryption.
# options:
# - no_read_workqueue
# - no_write_workqueue
{{< /highlight >}}
| Field | Type | Description | Value(s) |
|---|---|---|---|
provider | EncryptionProviderType | Encryption provider to use for the encryption. | luks2 |
keys | <a href="#VolumeConfig.encryption.keys.">[]EncryptionKey</a> | Defines the encryption keys generation and storage method. | |
cipher | string | Cipher to use for the encryption. Depends on the encryption provider. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |
| cipher: aes-xts-plain64 | |||
| {{< /highlight >}}</details> | aes-xts-plain64 | ||
xchacha12,aes-adiantum-plain64 | |||
xchacha20,aes-adiantum-plain64 | |||
keySize | uint | Defines the encryption key length. | |
blockSize | uint64 | Defines the encryption sector size. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |
| blockSize: 4096 | |||
| {{< /highlight >}}</details> | |||
options | []string | Additional --perf parameters for the LUKS2 encryption. <details><summary>Show example(s)</summary>{{< highlight yaml >}} | |
| options: |
- no_read_workqueue
- no_write_workqueue
{{< /highlight >}}</details> | |
|allowDiscards |bool |Allow TRIM/discard requests to be passed through to the underlying device when the encrypted volume is opened.
Defaults to false. | |
EncryptionKey represents configuration for disk encryption key.
| Field | Type | Description | Value(s) |
|---|---|---|---|
slot | int | Key slot number for LUKS2 encryption. | |
static | <a href="#VolumeConfig.encryption.keys..static">EncryptionKeyStatic</a> | Key which value is stored in the configuration file. | |
nodeID | <a href="#VolumeConfig.encryption.keys..nodeID">EncryptionKeyNodeID</a> | Deterministically generated key from the node UUID and PartitionLabel. | |
kms | <a href="#VolumeConfig.encryption.keys..kms">EncryptionKeyKMS</a> | KMS managed encryption key. | |
tpm | <a href="#VolumeConfig.encryption.keys..tpm">EncryptionKeyTPM</a> | Enable TPM based disk encryption. | |
lockToState | bool | Lock the disk encryption key to the random salt stored in the STATE partition. This is useful to prevent the volume from being unlocked if STATE partition is compromised or replaced. It is recommended to use this option with TPM disk encryption for non-STATE volumes. |
EncryptionKeyStatic represents throw away key type.
| Field | Type | Description | Value(s) |
|---|---|---|---|
passphrase | string | Defines the static passphrase value. |
EncryptionKeyNodeID represents deterministically generated key from the node UUID and PartitionLabel.
EncryptionKeyKMS represents a key that is generated and then sealed/unsealed by the KMS server.
{{< highlight yaml >}} encryption: keys: - kms: endpoint: https://192.168.88.21:4443 # KMS endpoint to Seal/Unseal the key. {{< /highlight >}}
| Field | Type | Description | Value(s) |
|---|---|---|---|
endpoint | string | KMS endpoint to Seal/Unseal the key. |
EncryptionKeyTPM represents a key that is generated and then sealed/unsealed by the TPM.
| Field | Type | Description | Value(s) |
|---|---|---|---|
options | <a href="#VolumeConfig.encryption.keys..tpm.options">EncryptionKeyTPMOptions</a> | TPM options for key protection. | |
checkSecurebootStatusOnEnroll | bool | Check that Secureboot is enabled in the EFI firmware. | |
| If Secureboot is not enabled, the enrollment of the key will fail. |
EncryptionKeyTPMOptions represents the options for TPM-based key protection.
| Field | Type | Description | Value(s) |
|---|---|---|---|
pcrs | []int | List of PCRs to bind the key to. If not set, defaults to PCR 7, can be disabled by passing an empty list. |
MountSpec describes how the volume is mounted.
| Field | Type | Description | Value(s) |
|---|---|---|---|
secure | bool | Enable secure mount options (nosuid, nodev). |
For dedicated ETCD and LOG volumes, this also enables noexec.
Defaults to true for better security.
Supported for EPHEMERAL and dedicated ETCD, CRI, KUBELET and LOG volumes. | |
|disableAccessTime |bool |If true, disable file access time updates.
Supported only for EPHEMERAL volume. | |
TrimConfig describes per-volume filesystem trim (fstrim) configuration.
It overrides the global FilesystemTrimConfig for the volume.
| Field | Type | Description | Value(s) |
|---|---|---|---|
enabled | bool | Enable or disable trimming for this volume. |
If not set, trimming is enabled when the global FilesystemTrimConfig is present. | |
|interval |Duration |The interval at which the volume is trimmed, overriding the global trim interval. | |
ScrubConfig describes per-volume filesystem scrub configuration.
It overrides the global FilesystemScrubConfig for the volume.
| Field | Type | Description | Value(s) |
|---|---|---|---|
enabled | bool | Enable or disable scrubbing for this volume. |
If not set, scrubbing is enabled by default when scrub section is present. | |
|interval |Duration |The interval at which the volume is scrubbed, overriding the global scrub interval. | |