Skip to content

Allow fsType parameter from StorageClass #70

Description

@saad-ali

The CSIPersistentVolumeSource has a field for fsType.

Any component that needs to use fsType pulls it from the CSI volume source (or at least it should) in the PV object and passes it to the CSI driver (e.g. external-provisioner for ControllerPublishVolume, kubelet for NodePublishVolume, etc.) . The only problem is that nothing sets that value currently, so after dynamic volume provisioning the end user has to go in and manually modify the CSI volume source in the PV object and change the fsType before proceeding with using it.

We should modify the CSI external-provisioner to allow users to specify the fsType as a parameter in the StorageClass object:

fsType: fsType that is supported by kubernetes. Default: "ext4".

The only draw back is that option should really be part of VolumeMode, but because of legacy reasons Kubernetes chose not to do that:

type PersistentVolumeClaimSpec struct {
...
	VolumeMode *PersistentVolumeMode
}

type PersistentVolumeMode string

const (
	PersistentVolumeBlock PersistentVolumeMode = "Block"
	PersistentVolumeFilesystem PersistentVolumeMode = "Filesystem"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions