You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for a new `mkfs-options` StorageClass parameter that allows
cluster admins to pass custom mkfs flags when formatting volumes.
For example, this is useful for Ceph-backed storage where passing `-E
nodiscard` to mkfs.ext4 can dramatically speed up provisioning.
Implementation:
- Extract mkfs-options from StorageClass params in CreateVolume and pass
via VolumeContext (both new-volume and idempotent early-return paths)
- Parse mkfs-options in NodeStageVolume
- Use FormatAndMountSensitiveWithFormatOptions() from k8s.io/mount-utils
to pass format options separately from mount options
- No behavior change when mkfs-options is not set
Inspired by the Ceph CSI implementation (ceph/ceph-csi#621).
MountMock.Mounter() now returns a stable, memoized SafeFormatAndMount
with a SetMounter escape hatch, enabling tests to script and capture the
mkfs argv via FakeExec.
| StorageClass `parameters`|`availability`|`nova`| String. Volume Availability Zone |
285
285
| StorageClass `parameters`|`type`| Empty String | String. Name/ID of Volume type. Corresponding volume type should exist in cinder |
286
+
| StorageClass `parameters`|`mkfs-options`| Empty String | String. Whitespace-separated arguments passed to mkfs when formatting the volume. |
286
287
| VolumeSnapshotClass `parameters`|`force-create`|`false`| Enable to support creating snapshot for a volume in in-use status |
287
288
| VolumeSnapshotClass `parameters`|`type`| Empty String |`snapshot` creates a VolumeSnapshot object linked to a Cinder volume snapshot. `backup` creates a VolumeSnapshot object linked to a cinder volume backup. Defaults to `snapshot` if not defined |
288
289
| VolumeSnapshotClass `parameters`|`backup-max-duration-seconds-per-gb`|`20`| Defines the amount of time to wait for a backup to complete in seconds per GB of volume size |
0 commit comments