From 25caf91b1cb0600c7dfb7859df192f0e7f6ddbf9 Mon Sep 17 00:00:00 2001 From: NickrenREN Date: Mon, 23 Apr 2018 18:20:34 +0800 Subject: [PATCH] add fstype for local volume source --- pkg/apis/core/types.go | 10 +++++++--- staging/src/k8s.io/api/core/v1/types.go | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index 11e1664eedd..1574a83340f 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -1513,10 +1513,14 @@ type KeyToPath struct { type LocalVolumeSource struct { // The full path to the volume on the node. // It can be either a directory or block device (disk, partition, ...). - // Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. - // Block devices can be represented only by VolumeMode=Block, which also requires the - // BlockVolume alpha feature gate to be enabled. Path string + + // Filesystem type to mount. + // It applies only when the Path is a block device. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a fileystem if unspecified. + // +optional + FSType *string } // Represents storage that is managed by an external CSI volume driver (Beta feature) diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 893e0fdc727..a316657dc8e 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -1601,10 +1601,14 @@ type KeyToPath struct { type LocalVolumeSource struct { // The full path to the volume on the node. // It can be either a directory or block device (disk, partition, ...). - // Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. - // Block devices can be represented only by VolumeMode=Block, which also requires the - // BlockVolume alpha feature gate to be enabled. Path string `json:"path" protobuf:"bytes,1,opt,name=path"` + + // Filesystem type to mount. + // It applies only when the Path is a block device. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a fileystem if unspecified. + // +optional + FSType *string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` } // Represents storage that is managed by an external CSI volume driver (Beta feature)