mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-02 01:39:02 +00:00
Merge pull request #50953 from zjj2wry/get-pvc
Automatic merge from submit-queue fix issue(#50937)Fix kubectl get pvc lose volume name **What this PR does / why we need it**: closes #50937 **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: this should has volumename column. ``` NAME STATUS CAPACITY ACCESS MODES STORAGECLASS AGE myclaim Bound pv-gcepd2 5Gi ROX slow 35m myclaim2 Bound pv-gcepd 5Gi ROX slow 25m ``` **Release note**: ```release-note NONE ```
This commit is contained in:
@@ -286,6 +286,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"},
|
||||
|
Reference in New Issue
Block a user