Remove validation of *VolumeSource.FSType.

Most volume plugins use SafeFormatAndMount, which uses ext4 by default.

FlexVolume plugin has FSType attribute 'omitempty', so reflect it in the
description of the type.
This commit is contained in:
Jan Safranek
2016-02-09 09:13:06 +01:00
parent 318705feb9
commit 40c97ddd5f
10 changed files with 179 additions and 173 deletions

View File

@@ -446,9 +446,9 @@ const (
type GCEPersistentDiskVolumeSource struct {
// Unique name of the PD resource. Used to identify the disk in GCE
PDName string `json:"pdName"`
// Required: Filesystem type to mount.
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs"
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
// Optional: Partition on the disk to mount.
@@ -473,9 +473,9 @@ type ISCSIVolumeSource struct {
Lun int `json:"lun,omitempty"`
// Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
ISCSIInterface string `json:"iscsiInterface,omitempty"`
// Required: Filesystem type to mount.
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs"
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
@@ -491,11 +491,11 @@ type FCVolumeSource struct {
TargetWWNs []string `json:"targetWWNs"`
// Required: FC target lun number
Lun *int `json:"lun"`
// Required: Filesystem type to mount.
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs"
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType"`
FSType string `json:"fsType,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
@@ -506,9 +506,9 @@ type FCVolumeSource struct {
type FlexVolumeSource struct {
// Driver is the name of the driver to use for this volume.
Driver string `json:"driver"`
// Required: Filesystem type to mount.
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs"
// Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
FSType string `json:"fsType,omitempty"`
// Optional: SecretRef is reference to the authentication secret for User, default is empty.
SecretRef *LocalObjectReference `json:"secretRef,omitempty"`
@@ -528,9 +528,9 @@ type FlexVolumeSource struct {
type AWSElasticBlockStoreVolumeSource struct {
// Unique id of the persistent disk resource. Used to identify the disk in AWS
VolumeID string `json:"volumeID"`
// Required: Filesystem type to mount.
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs"
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
// Optional: Partition on the disk to mount.
@@ -603,9 +603,9 @@ type RBDVolumeSource struct {
CephMonitors []string `json:"monitors"`
// Required: RBDImage is the rados image name
RBDImage string `json:"image"`
// Required: Filesystem type to mount.
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs"
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
// TODO: how do we prevent errors in the filesystem from compromising the machine
FSType string `json:"fsType,omitempty"`
// Optional: RadosPool is the rados pool name,default is rbd
@@ -630,6 +630,7 @@ type CinderVolumeSource struct {
VolumeID string `json:"volumeID"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
FSType string `json:"fsType,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.