implement Ceph FS volume plugin and add to e2e volume test

Signed-off-by: Huamin Chen <hchen@redhat.com>
This commit is contained in:
Huamin Chen
2015-04-09 14:05:24 -04:00
parent 64717962cf
commit fe559f2726
28 changed files with 1184 additions and 1 deletions

View File

@@ -226,6 +226,8 @@ type VolumeSource struct {
RBD *RBDVolumeSource `json:"rbd,omitempty"`
// Cinder represents a cinder volume attached and mounted on kubelets host machine
Cinder *CinderVolumeSource `json:"cinder,omitempty"`
// CephFS represents a Cephfs mount on the host that shares a pod's lifetime
CephFS *CephFSVolumeSource `json:"cephfs,omitempty"`
}
// Similar to VolumeSource but meant for the administrator who creates PVs.
@@ -252,6 +254,8 @@ type PersistentVolumeSource struct {
ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty"`
// Cinder represents a cinder volume attached and mounted on kubelets host machine
Cinder *CinderVolumeSource `json:"cinder,omitempty"`
// CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
CephFS *CephFSVolumeSource `json:"cephfs,omitempty"`
}
type PersistentVolumeClaimVolumeSource struct {
@@ -577,6 +581,21 @@ type CinderVolumeSource struct {
ReadOnly bool `json:"readOnly,omitempty"`
}
// CephFSVolumeSource represents a Ceph Filesystem Mount that lasts the lifetime of a pod
type CephFSVolumeSource struct {
// Required: Monitors is a collection of Ceph monitors
Monitors []string `json:"monitors"`
// Optional: User is the rados user name, default is admin
User string `json:"user,omitempty"`
// Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
SecretFile string `json:"secretFile,omitempty"`
// Optional: SecretRef is reference to the authentication secret for User, default is empty.
SecretRef *LocalObjectReference `json:"secretRef,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
}
// ContainerPort represents a network port in a single container
type ContainerPort struct {
// Optional: If specified, this must be an IANA_SVC_NAME Each named port