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"
)
The
CSIPersistentVolumeSourcehas a field forfsType.Any component that needs to use
fsTypepulls 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 forControllerPublishVolume, kubelet forNodePublishVolume, 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
fsTypeas a parameter in the StorageClass object:The only draw back is that option should really be part of
VolumeMode, but because of legacy reasons Kubernetes chose not to do that: