mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Merge pull request #5166 from thockin/tmpfs
Add tmpfs support as a flag on emptyDir
This commit is contained in:
@@ -182,12 +182,29 @@ type VolumeSource struct {
|
||||
Secret *SecretVolumeSource `json:"secret"`
|
||||
}
|
||||
|
||||
// HostPathVolumeSource represents bare host directory volume.
|
||||
// HostPathVolumeSource represents a host directory mapped into a pod.
|
||||
type HostPathVolumeSource struct {
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
type EmptyDirVolumeSource struct{}
|
||||
// EmptyDirVolumeSource represents an empty directory for a pod.
|
||||
type EmptyDirVolumeSource struct {
|
||||
// TODO: Longer term we want to represent the selection of underlying
|
||||
// media more like a scheduling problem - user says what traits they
|
||||
// need, we give them a backing store that satisifies that. For now
|
||||
// this will cover the most common needs.
|
||||
// Optional: what type of storage medium should back this directory.
|
||||
// The default is "" which means to use the node's default medium.
|
||||
Medium StorageType `json:"medium"`
|
||||
}
|
||||
|
||||
// StorageType defines ways that storage can be allocated to a volume.
|
||||
type StorageType string
|
||||
|
||||
const (
|
||||
StorageTypeDefault StorageType = "" // use whatever the default is for the node
|
||||
StorageTypeMemory StorageType = "Memory" // use memory (tmpfs)
|
||||
)
|
||||
|
||||
// Protocol defines network protocols supported for things like conatiner ports.
|
||||
type Protocol string
|
||||
|
||||
@@ -112,7 +112,19 @@ type HostPathVolumeSource struct {
|
||||
Path string `json:"path" description:"path of the directory on the host"`
|
||||
}
|
||||
|
||||
type EmptyDirVolumeSource struct{}
|
||||
type EmptyDirVolumeSource struct {
|
||||
// Optional: what type of storage medium should back this directory.
|
||||
// The default is "" which means to use the node's default medium.
|
||||
Medium StorageType `json:"medium" description:"type of storage used to back the volume; must be an empty string (default) or Memory"`
|
||||
}
|
||||
|
||||
// StorageType defines ways that storage can be allocated to a volume.
|
||||
type StorageType string
|
||||
|
||||
const (
|
||||
StorageTypeDefault StorageType = "" // use whatever the default is for the node
|
||||
StorageTypeMemory StorageType = "Memory" // use memory (tmpfs)
|
||||
)
|
||||
|
||||
// Protocol defines network protocols supported for things like conatiner ports.
|
||||
type Protocol string
|
||||
|
||||
@@ -90,7 +90,19 @@ type HostPathVolumeSource struct {
|
||||
// Represents an empty directory volume.
|
||||
//
|
||||
// https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/volumes.md#emptydir
|
||||
type EmptyDirVolumeSource struct{}
|
||||
type EmptyDirVolumeSource struct {
|
||||
// Optional: what type of storage medium should back this directory.
|
||||
// The default is "" which means to use the node's default medium.
|
||||
Medium StorageType `json:"medium" description:"type of storage used to back the volume; must be an empty string (default) or Memory"`
|
||||
}
|
||||
|
||||
// StorageType defines ways that storage can be allocated to a volume.
|
||||
type StorageType string
|
||||
|
||||
const (
|
||||
StorageTypeDefault StorageType = "" // use whatever the default is for the node
|
||||
StorageTypeMemory StorageType = "Memory" // use memory (tmpfs)
|
||||
)
|
||||
|
||||
// SecretVolumeSource adapts a Secret into a VolumeSource
|
||||
//
|
||||
|
||||
@@ -206,7 +206,19 @@ type HostPathVolumeSource struct {
|
||||
Path string `json:"path" description:"path of the directory on the host"`
|
||||
}
|
||||
|
||||
type EmptyDirVolumeSource struct{}
|
||||
type EmptyDirVolumeSource struct {
|
||||
// Optional: what type of storage medium should back this directory.
|
||||
// The default is "" which means to use the node's default medium.
|
||||
Medium StorageType `json:"medium" description:"type of storage used to back the volume; must be an empty string (default) or Memory"`
|
||||
}
|
||||
|
||||
// StorageType defines ways that storage can be allocated to a volume.
|
||||
type StorageType string
|
||||
|
||||
const (
|
||||
StorageTypeDefault StorageType = "" // use whatever the default is for the node
|
||||
StorageTypeMemory StorageType = "Memory" // use memory (tmpfs)
|
||||
)
|
||||
|
||||
// Protocol defines network protocols supported for things like conatiner ports.
|
||||
type Protocol string
|
||||
|
||||
Reference in New Issue
Block a user