SourceVolumeSource`json:"source,omitempty" description:"location and type of volume to mount; at most one of HostDir, EmptyDir, GCEPersistentDisk, or GitRepo; default is EmptyDir"`
SourceVolumeSource`json:"source,omitempty" description:"location and type of volume to mount; at most one of HostDir, EmptyDir, GCEPersistentDisk, or GitRepo; default is EmptyDir"`
}
}
// VolumeSource represents the source location of a valume to mount.
// VolumeSource represents the source location of a volume to mount.
// Only one of its members may be specified.
// Only one of its members may be specified.
typeVolumeSourcestruct{
typeVolumeSourcestruct{
// HostDir represents a pre-existing directory on the host machine that is directly
// HostDir represents a pre-existing directory on the host machine that is directly
...
@@ -113,7 +113,84 @@ type VolumeSource struct {
...
@@ -113,7 +113,84 @@ type VolumeSource struct {
NFS*NFSVolumeSource`json:"nfs" description:"NFS volume that will be mounted in the host machine "`
NFS*NFSVolumeSource`json:"nfs" description:"NFS volume that will be mounted in the host machine "`
}
}
// used by VolumeSources to describe their mounting/access modes
// Similar to VolumeSource but meant for the administrator who creates PVs.
// Exactly one of its members must be set.
typePersistentVolumeSourcestruct{
// GCEPersistentDisk represents a GCE Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
GCEPersistentDisk*GCEPersistentDiskVolumeSource`json:"persistentDisk" description:"GCE disk resource provisioned by an admin"`
// HostPath represents a directory on the host.
// This is useful for development and testing only.
// on-host storage is not supported in any way.
HostPath*HostPathVolumeSource`json:"hostPath" description:"a HostPath provisioned by a developer or tester; for develment use only"`
}
typePersistentVolumestruct{
TypeMeta`json:",inline"`
//Spec defines a persistent volume owned by the cluster
SpecPersistentVolumeSpec`json:"spec,omitempty" description:"specification of a persistent volume as provisioned by an administrator"`
// Status represents the current information about persistent volume.
StatusPersistentVolumeStatus`json:"status,omitempty" description:"current status of a persistent volume; populated by the system, read-only"`
}
typePersistentVolumeSpecstruct{
// Resources represents the actual resources of the volume
CapacityResourceList`json:"capacity,omitempty" description:"a description of the persistent volume's resources and capacity"`
// Source represents the location and type of a volume to mount.
// AccessModeTypes are inferred from the Source.
PersistentVolumeSource`json:",inline" description:"the actual volume backing the persistent volume"`
// holds the binding reference to a PersistentVolumeClaim
ClaimRef*ObjectReference`json:"claimRef,omitempty" description:"the binding reference to a persistent volume claim"`
}
typePersistentVolumeStatusstruct{
// Phase indicates if a volume is available, bound to a claim, or released by a claim
PhasePersistentVolumePhase`json:"phase,omitempty" description:"the current phase of a persistent volume"`
}
typePersistentVolumeListstruct{
TypeMeta`json:",inline"`
Items[]PersistentVolume`json:"items,omitempty" description:"list of persistent volumes"`
}
// PersistentVolumeClaim is a user's request for and claim to a persistent volume
typePersistentVolumeClaimstruct{
TypeMeta`json:",inline"`
// Spec defines the volume requested by a pod author
SpecPersistentVolumeClaimSpec`json:"spec,omitempty" description: "the desired characteristics of a volume"`
// Status represents the current information about a claim
StatusPersistentVolumeClaimStatus`json:"status,omitempty" description:"the current status of a persistent volume claim; read-only"`
}
typePersistentVolumeClaimListstruct{
TypeMeta`json:",inline"`
Items[]PersistentVolumeClaim`json:"items,omitempty" description: "a list of persistent volume claims"`
}
// PersistentVolumeClaimSpec describes the common attributes of storage devices
// and allows a Source for provider-specific attributes
typePersistentVolumeClaimSpecstruct{
// Contains the types of access modes required
AccessModes[]AccessModeType`json:"accessModes,omitempty" description:"the desired access modes the volume should have"`
// Resources represents the minimum resources required
ResourcesResourceRequirements`json:"resources,omitempty" description:"the desired resources the volume should have"`
}
typePersistentVolumeClaimStatusstruct{
// Phase represents the current phase of PersistentVolumeClaim
PhasePersistentVolumeClaimPhase`json:"phase,omitempty" description:"the current phase of the claim"`
// AccessModes contains all ways the volume backing the PVC can be mounted
AccessModes[]AccessModeType`json:"accessModes,omitempty" description:"the actual access modes the volume has"`
// Represents the actual resources of the underlying volume
CapacityResourceList`json:"capacity,omitempty" description:"the actual resources the volume has"`
// VolumeRef is a reference to the PersistentVolume bound to the PersistentVolumeClaim
VolumeRef*ObjectReference`json:"volumeRef,omitempty" description:"a reference to the backing persistent volume, when bound"`
}
typeAccessModeTypestring
typeAccessModeTypestring
const(
const(
...
@@ -125,6 +202,27 @@ const (
...
@@ -125,6 +202,27 @@ const (
ReadWriteManyAccessModeType="ReadWriteMany"
ReadWriteManyAccessModeType="ReadWriteMany"
)
)
typePersistentVolumePhasestring
const(
// used for PersistentVolumes that are not yet bound
VolumeAvailablePersistentVolumePhase="Available"
// used for PersistentVolumes that are bound
VolumeBoundPersistentVolumePhase="Bound"
// used for PersistentVolumes where the bound PersistentVolumeClaim was deleted
// released volumes must be recycled before becoming available again
VolumeReleasedPersistentVolumePhase="Released"
)
typePersistentVolumeClaimPhasestring
const(
// used for PersistentVolumeClaims that are not yet bound
ClaimPendingPersistentVolumeClaimPhase="Pending"
// used for PersistentVolumeClaims that are bound
ClaimBoundPersistentVolumeClaimPhase="Bound"
)
// HostPathVolumeSource represents bare host directory volume.
// HostPathVolumeSource represents bare host directory volume.
typeHostPathVolumeSourcestruct{
typeHostPathVolumeSourcestruct{
Pathstring`json:"path" description:"path of the directory on the host"`
Pathstring`json:"path" description:"path of the directory on the host"`
...
@@ -302,6 +400,8 @@ type Capabilities struct {
...
@@ -302,6 +400,8 @@ type Capabilities struct {
typeResourceRequirementsstruct{
typeResourceRequirementsstruct{
// Limits describes the maximum amount of compute resources required.
// Limits describes the maximum amount of compute resources required.
LimitsResourceList`json:"limits,omitempty" description:"Maximum amount of compute resources allowed"`
LimitsResourceList`json:"limits,omitempty" description:"Maximum amount of compute resources allowed"`
// Requests describes the minimum amount of compute resources required.
RequestsResourceList`json:"requests,omitempty" description:"Minimum amount of resources requested"`
}
}
// Container represents a single container that is expected to be run on the host.
// Container represents a single container that is expected to be run on the host.
...
@@ -764,10 +864,12 @@ type NodeResources struct {
...
@@ -764,10 +864,12 @@ type NodeResources struct {
typeResourceNamestring
typeResourceNamestring
const(
const(
// CPU, in cores. (floating point w/ 3 decimal places)
SourceVolumeSource`json:"source,omitempty" description:"location and type of volume to mount; at most one of HostDir, EmptyDir, GCEPersistentDisk, or GitRepo; default is EmptyDir"`
SourceVolumeSource`json:"source,omitempty" description:"location and type of volume to mount; at most one of HostDir, EmptyDir, GCEPersistentDisk, or GitRepo; default is EmptyDir"`
}
}
// VolumeSource represents the source location of a valume to mount.
// VolumeSource represents the source location of a volume to mount.