fix issue(#50937)Fix kubectl get pvc lose volume name

This commit is contained in:
zhengjiajin
2017-08-19 17:02:58 +08:00
parent 2ba796fe47
commit 1a1b940ecb
2 changed files with 101 additions and 0 deletions

View File

@@ -277,6 +277,7 @@ func AddHandlers(h printers.PrintHandler) {
persistentVolumeClaimColumnDefinitions := []metav1alpha1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "Status", Type: "string", Description: apiv1.PersistentVolumeClaimStatus{}.SwaggerDoc()["phase"]},
{Name: "Volume", Type: "string", Description: apiv1.PersistentVolumeSpec{}.SwaggerDoc()["volumeName"]},
{Name: "Capacity", Type: "string", Description: apiv1.PersistentVolumeClaimStatus{}.SwaggerDoc()["capacity"]},
{Name: "Access Modes", Type: "string", Description: apiv1.PersistentVolumeClaimStatus{}.SwaggerDoc()["accessModes"]},
{Name: "StorageClass", Type: "string", Description: "StorageClass of the pvc"},