NFSMount storage plugin for kubelet.

* If you want to test this out when an actual NFS export a good place
 to start is by running the NFS server in a container:

docker run -d --name nfs --privileged cpuguy83/nfs-server /tmp

More detail can be found here:
https://github.com/cpuguy83/docker-nfs-server
This commit is contained in:
Chris Alfonso
2015-02-10 14:00:11 -05:00
parent d845d49dc6
commit 1a45e37d17
14 changed files with 524 additions and 1 deletions

View File

@@ -180,6 +180,8 @@ type VolumeSource struct {
GitRepo *GitRepoVolumeSource `json:"gitRepo"`
// Secret represents a secret that should populate this volume.
Secret *SecretVolumeSource `json:"secret"`
// NFS represents an NFS mount on the host that shares a pod's lifetime
NFS *NFSVolumeSource `json:"nfs"`
}
// HostPathVolumeSource represents a host directory mapped into a pod.
@@ -256,6 +258,19 @@ type SecretVolumeSource struct {
Target ObjectReference `json:"target"`
}
// NFSVolumeSource represents an NFS Mount that lasts the lifetime of a pod
type NFSVolumeSource struct {
// Server is the hostname or IP address of the NFS server
Server string `json:"server"`
// Path is the exported NFS share
Path string `json:"path"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the NFS export to be mounted with read-only permissions
ReadOnly bool `json:"readOnly,omitempty"`
}
// ContainerPort represents a network port in a single container
type ContainerPort struct {
// Optional: If specified, this must be a DNS_LABEL. Each named port