From 257031378dee5d7b6b2d71db7b2ed02a4b604884 Mon Sep 17 00:00:00 2001 From: Drew Sirenko <68304519+AndrewSirenko@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:24:49 -0600 Subject: [PATCH] Fix supported filesystem types --- docs/parameters.md | 34 +++++++++++++++++----------------- pkg/driver/constants.go | 8 -------- pkg/driver/node.go | 1 - 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/docs/parameters.md b/docs/parameters.md index 2a92a4ed00..5790d6c5d9 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -5,23 +5,23 @@ There are several optional parameters that may be passed into `CreateVolumeReque The AWS EBS CSI Driver supports [tagging](tagging.md) through `StorageClass.parameters` (in v1.6.0 and later). -| Parameters | Values | Default | Description | -|------------------------------|----------------------------------------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| "csi.storage.k8s.io/fstype" | xfs, ext2, ext3, ext4 | ext4 | File system type that will be formatted during volume creation. This parameter is case sensitive! | -| "type" | io1, io2, gp2, gp3, sc1, st1, standard, sbp1, sbg1 | gp3* | EBS volume type. | -| "iopsPerGB" | | | I/O operations per second per GiB. Can be specified for IO1, IO2, and GP3 volumes. | -| "allowAutoIOPSPerGBIncrease" | true, false | false | When `"true"`, the CSI driver increases IOPS for a volume when `iopsPerGB * ` is too low to fit into IOPS range supported by AWS. This allows dynamic provisioning to always succeed, even when user specifies too small PVC capacity or `iopsPerGB` value. On the other hand, it may introduce additional costs, as such volumes have higher IOPS than requested in `iopsPerGB`. | -| "iops" | | | I/O operations per second. Can be specified for IO1, IO2, and GP3 volumes. | -| "throughput" | | 125 | Throughput in MiB/s. Only effective when gp3 volume type is specified. If empty, it will set to 125MiB/s as documented [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html). | -| "encrypted" | true, false | false | Whether the volume should be encrypted or not. Valid values are "true" or "false". | -| "blockExpress" | true, false | false | Enables the creation of [io2 Block Express volumes](https://aws.amazon.com/ebs/provisioned-iops/#Introducing_io2_Block_Express) by increasing the IOPS limit for io2 volumes to 256000. Volumes created with more than 64000 IOPS will fail to mount on instances that do not support io2 Block Express. | -| "kmsKeyId" | | | The full ARN of the key to use when encrypting the volume. If not specified, AWS will use the default KMS key for the region the volume is in. This will be an auto-generated key called `/aws/ebs` if not changed. | -| "blockSize" | | | The block size to use when formatting the underlying filesystem. Only supported on linux nodes and with fstype `ext2`, `ext3`, `ext4`, or `xfs`. | -| "inodeSize" | | | The inode size to use when formatting the underlying filesystem. Only supported on linux nodes and with fstype `ext2`, `ext3`, `ext4`, or `xfs`. | -| "bytesPerInode" | | | The `bytes-per-inode` to use when formatting the underlying filesystem. Only supported on linux nodes and with fstype `ext2`, `ext3`, `ext4`. | -| "numberOfInodes" | | | The `number-of-inodes` to use when formatting the underlying filesystem. Only supported on linux nodes and with fstype `ext2`, `ext3`, `ext4`. | -| "ext4BigAlloc" | true, false | false | Changes the `ext4` filesystem to use clustered block allocation by enabling the `bigalloc` formatting option. Warning: `bigalloc` may not be fully supported with your node's Linux kernel. Please see our [FAQ](/docs/faq.md). | -| "ext4ClusterSize" | | | The cluster size to use when formatting an `ext4` filesystem when the `bigalloc` feature is enabled. Note: The `ext4BigAlloc` parameter must be set to true. See our [FAQ](/docs/faq.md). | +| Parameters | Values | Default | Description | +|------------------------------|---------------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| "csi.storage.k8s.io/fstype" | xfs, ext3, ext4 | ext4 | File system type that will be formatted during volume creation. This parameter is case sensitive! | +| "type" | io1, io2, gp2, gp3, sc1, st1, standard, sbp1, sbg1 | gp3* | EBS volume type. | +| "iopsPerGB" | | | I/O operations per second per GiB. Can be specified for IO1, IO2, and GP3 volumes. | +| "allowAutoIOPSPerGBIncrease" | true, false | false | When `"true"`, the CSI driver increases IOPS for a volume when `iopsPerGB * ` is too low to fit into IOPS range supported by AWS. This allows dynamic provisioning to always succeed, even when user specifies too small PVC capacity or `iopsPerGB` value. On the other hand, it may introduce additional costs, as such volumes have higher IOPS than requested in `iopsPerGB`. | +| "iops" | | | I/O operations per second. Can be specified for IO1, IO2, and GP3 volumes. | +| "throughput" | | 125 | Throughput in MiB/s. Only effective when gp3 volume type is specified. If empty, it will set to 125MiB/s as documented [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html). | +| "encrypted" | true, false | false | Whether the volume should be encrypted or not. Valid values are "true" or "false". | +| "blockExpress" | true, false | false | Enables the creation of [io2 Block Express volumes](https://aws.amazon.com/ebs/provisioned-iops/#Introducing_io2_Block_Express) by increasing the IOPS limit for io2 volumes to 256000. Volumes created with more than 64000 IOPS will fail to mount on instances that do not support io2 Block Express. | +| "kmsKeyId" | | | The full ARN of the key to use when encrypting the volume. If not specified, AWS will use the default KMS key for the region the volume is in. This will be an auto-generated key called `/aws/ebs` if not changed. | +| "blockSize" | | | The block size to use when formatting the underlying filesystem. Only supported on linux nodes and with fstype `ext3`, `ext4`, or `xfs`. | +| "inodeSize" | | | The inode size to use when formatting the underlying filesystem. Only supported on linux nodes and with fstype `ext3`, `ext4`, or `xfs`. | +| "bytesPerInode" | | | The `bytes-per-inode` to use when formatting the underlying filesystem. Only supported on linux nodes and with fstype `ext3`, `ext4`. | +| "numberOfInodes" | | | The `number-of-inodes` to use when formatting the underlying filesystem. Only supported on linux nodes and with fstype `ext3`, `ext4`. | +| "ext4BigAlloc" | true, false | false | Changes the `ext4` filesystem to use clustered block allocation by enabling the `bigalloc` formatting option. Warning: `bigalloc` may not be fully supported with your node's Linux kernel. Please see our [FAQ](/docs/faq.md). | +| "ext4ClusterSize" | | | The cluster size to use when formatting an `ext4` filesystem when the `bigalloc` feature is enabled. Note: The `ext4BigAlloc` parameter must be set to true. See our [FAQ](/docs/faq.md). | ## Restrictions * `gp3` is currently not supported on outposts. Outpost customers need to use a different type for their volumes. diff --git a/pkg/driver/constants.go b/pkg/driver/constants.go index 4f5aa7d6f5..71dfe4f157 100644 --- a/pkg/driver/constants.go +++ b/pkg/driver/constants.go @@ -161,8 +161,6 @@ const ( // constants for fstypes. const ( - // FSTypeExt2 represents the ext2 filesystem type. - FSTypeExt2 = "ext2" // FSTypeExt3 represents the ext3 filesystem type. FSTypeExt3 = "ext3" // FSTypeExt4 represents the ext4 filesystem type. @@ -190,12 +188,6 @@ func (fsConfig fileSystemConfig) isParameterSupported(paramName string) bool { var ( FileSystemConfigs = map[string]fileSystemConfig{ - FSTypeExt2: { - NotSupportedParams: map[string]struct{}{ - Ext4BigAllocKey: {}, - Ext4ClusterSizeKey: {}, - }, - }, FSTypeExt3: { NotSupportedParams: map[string]struct{}{ Ext4BigAllocKey: {}, diff --git a/pkg/driver/node.go b/pkg/driver/node.go index eccf4cf450..0d03a74cd0 100644 --- a/pkg/driver/node.go +++ b/pkg/driver/node.go @@ -56,7 +56,6 @@ const ( var ( ValidFSTypes = map[string]struct{}{ - FSTypeExt2: {}, FSTypeExt3: {}, FSTypeExt4: {}, FSTypeXfs: {},