Implement support for mount options in PVs

Add support for mount options via annotations on PVs
This commit is contained in:
Hemant Kumar
2017-02-21 13:19:48 -05:00
parent 2249550b57
commit 2d3008fc56
45 changed files with 544 additions and 69 deletions

View File

@@ -107,6 +107,11 @@ type VolumePlugin interface {
// information from input. This function is used by volume manager to reconstruct
// volume spec by reading the volume directories from disk
ConstructVolumeSpec(volumeName, mountPath string) (*Spec, error)
// SupportsMountOption returns true if volume plugins supports Mount options
// Specifying mount options in a volume plugin that doesn't support
// user specified mount options will result in error creating persistent volumes
SupportsMountOption() bool
}
// PersistentVolumePlugin is an extended interface of VolumePlugin and is used
@@ -146,6 +151,8 @@ const (
// Name of a volume in external cloud that is being provisioned and thus
// should be ignored by rest of Kubernetes.
ProvisionedVolumeName = "placeholder-for-provisioning"
// Mount options annotations
MountOptionAnnotation = "volume.beta.kubernetes.io/mount-options"
)
// ProvisionableVolumePlugin is an extended interface of VolumePlugin and is