mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #8665 from markturansky/fix_pv_desc
Fixed PV Describe bug
This commit is contained in:
commit
64c4e264f2
@ -304,11 +304,11 @@ func (d *PersistentVolumeDescriber) Describe(namespace, name string) (string, er
|
||||
return tabbedString(func(out io.Writer) error {
|
||||
fmt.Fprintf(out, "Name:\t%s\n", pv.Name)
|
||||
fmt.Fprintf(out, "Labels:\t%s\n", formatLabels(pv.Labels))
|
||||
fmt.Fprintf(out, "Status:\t%d\n", pv.Status.Phase)
|
||||
fmt.Fprintf(out, "Status:\t%s\n", pv.Status.Phase)
|
||||
if pv.Spec.ClaimRef != nil {
|
||||
fmt.Fprintf(out, "Claim:\t%d\n", pv.Spec.ClaimRef.Namespace+"/"+pv.Spec.ClaimRef.Name)
|
||||
fmt.Fprintf(out, "Claim:\t%s\n", pv.Spec.ClaimRef.Namespace+"/"+pv.Spec.ClaimRef.Name)
|
||||
} else {
|
||||
fmt.Fprintf(out, "Claim:\t%d\n", "")
|
||||
fmt.Fprintf(out, "Claim:\t%s\n", "")
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user