mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #69279 from dtaniwaki/print-size-limit
Print SizeLimit of EmptyDir
This commit is contained in:
commit
9cc39a5614
@ -822,8 +822,16 @@ func printHostPathVolumeSource(hostPath *corev1.HostPathVolumeSource, w PrefixWr
|
|||||||
}
|
}
|
||||||
|
|
||||||
func printEmptyDirVolumeSource(emptyDir *corev1.EmptyDirVolumeSource, w PrefixWriter) {
|
func printEmptyDirVolumeSource(emptyDir *corev1.EmptyDirVolumeSource, w PrefixWriter) {
|
||||||
|
var sizeLimit string
|
||||||
|
if emptyDir.SizeLimit != nil && emptyDir.SizeLimit.Cmp(resource.Quantity{}) > 0 {
|
||||||
|
sizeLimit = fmt.Sprintf("%v", emptyDir.SizeLimit)
|
||||||
|
} else {
|
||||||
|
sizeLimit = "<unset>"
|
||||||
|
}
|
||||||
w.Write(LEVEL_2, "Type:\tEmptyDir (a temporary directory that shares a pod's lifetime)\n"+
|
w.Write(LEVEL_2, "Type:\tEmptyDir (a temporary directory that shares a pod's lifetime)\n"+
|
||||||
" Medium:\t%v\n", emptyDir.Medium)
|
" Medium:\t%v\n"+
|
||||||
|
" SizeLimit:\t%v\n",
|
||||||
|
emptyDir.Medium, sizeLimit)
|
||||||
}
|
}
|
||||||
|
|
||||||
func printGCEPersistentDiskVolumeSource(gce *corev1.GCEPersistentDiskVolumeSource, w PrefixWriter) {
|
func printGCEPersistentDiskVolumeSource(gce *corev1.GCEPersistentDiskVolumeSource, w PrefixWriter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user