Bi-directional bind between pv.Spec.ClaimRef and pvc.Spec.VolumeName

This commit is contained in:
markturansky
2015-05-12 20:44:29 -04:00
parent 9454d58547
commit 0191574f7e
18 changed files with 247 additions and 295 deletions

View File

@@ -321,15 +321,15 @@ type PersistentVolumeClaimDescriber struct {
func (d *PersistentVolumeClaimDescriber) Describe(namespace, name string) (string, error) {
c := d.PersistentVolumeClaims(namespace)
psd, err := c.Get(name)
pvc, err := c.Get(name)
if err != nil {
return "", err
}
return tabbedString(func(out io.Writer) error {
fmt.Fprintf(out, "Name:\t%s\n", psd.Name)
fmt.Fprintf(out, "Status:\t%d\n", psd.Status.Phase)
fmt.Fprintf(out, "Volume:\t%d\n", psd.Status.VolumeRef.UID)
fmt.Fprintf(out, "Name:\t%s\n", pvc.Name)
fmt.Fprintf(out, "Status:\t%d\n", pvc.Status.Phase)
fmt.Fprintf(out, "Volume:\t%d\n", pvc.Spec.VolumeName)
return nil
})