Merge pull request #1337 from brendandburns/Sarsate-pd-support
Taking over PD support from sarsate
This commit is contained in:
@@ -92,6 +92,9 @@ type VolumeSource struct {
|
||||
HostDir *HostDir `yaml:"hostDir" json:"hostDir"`
|
||||
// EmptyDir represents a temporary directory that shares a pod's lifetime.
|
||||
EmptyDir *EmptyDir `yaml:"emptyDir" json:"emptyDir"`
|
||||
// GCEPersistentDisk represents a GCE Disk resource that is attached to a
|
||||
// kubelet's host machine and then exposed to the pod.
|
||||
GCEPersistentDisk *GCEPersistentDisk `yaml:"persistentDisk" json:"persistentDisk"`
|
||||
}
|
||||
|
||||
// HostDir represents bare host directory volume.
|
||||
@@ -111,7 +114,28 @@ const (
|
||||
ProtocolUDP Protocol = "UDP"
|
||||
)
|
||||
|
||||
// Port represents a network port in a single container.
|
||||
// GCEPersistent Disk resource.
|
||||
// A GCE PD must exist and be formatted before mounting to a container.
|
||||
// The disk must also be in the same GCE project and zone as the kubelet.
|
||||
// A GCE PD can only be mounted as read/write once.
|
||||
type GCEPersistentDisk struct {
|
||||
// Unique name of the PD resource. Used to identify the disk in GCE
|
||||
PDName string `yaml:"pdName" json:"pdName"`
|
||||
// Required: Filesystem type to mount.
|
||||
// Must be a filesystem type supported by the host operating system.
|
||||
// Ex. "ext4", "xfs", "ntfs"
|
||||
// TODO: how do we prevent errors in the filesystem from compromising the machine
|
||||
FSType string `yaml:"fsType,omitempty" json:"fsType,omitempty"`
|
||||
// Optional: Partition on the disk to mount.
|
||||
// If omitted, kubelet will attempt to mount the device name.
|
||||
// Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
|
||||
Partition int `yaml:"partition,omitempty" json:"partition,omitempty"`
|
||||
// Optional: Defaults to false (read/write). ReadOnly here will force
|
||||
// the ReadOnly setting in VolumeMounts.
|
||||
ReadOnly bool `yaml:"readOnly,omitempty" json:"readOnly,omitempty"`
|
||||
}
|
||||
|
||||
// Port represents a network port in a single container
|
||||
type Port struct {
|
||||
// Optional: If specified, this must be a DNS_LABEL. Each named port
|
||||
// in a pod must have a unique name.
|
||||
|
Reference in New Issue
Block a user