Print sizeLimit

pull/564/head
Daisuke Taniwaki 2018-10-01 21:07:44 +09:00
parent fad23990ce
commit deeb4c1403
No known key found for this signature in database
GPG Key ID: 04F90B23F84F5E6B
1 changed files with 9 additions and 1 deletions

View File

@ -822,8 +822,16 @@ func printHostPathVolumeSource(hostPath *corev1.HostPathVolumeSource, w PrefixWr
}
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"+
" Medium:\t%v\n", emptyDir.Medium)
" Medium:\t%v\n"+
" SizeLimit:\t%v\n",
emptyDir.Medium, sizeLimit)
}
func printGCEPersistentDiskVolumeSource(gce *corev1.GCEPersistentDiskVolumeSource, w PrefixWriter) {