add apigroup to the data source when using kubectl describe pvc
Kubernetes-commit: 9157df47e8db6e10edcd398294e6a4c04b3572e9
This commit is contained in:
parent
2f2d0f1daa
commit
521a90f087
|
@ -1549,8 +1549,11 @@ func describePersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim, events *co
|
|||
}
|
||||
if pvc.Spec.DataSource != nil {
|
||||
w.Write(LEVEL_0, "DataSource:\n")
|
||||
w.Write(LEVEL_1, "Name:\t%v\n", pvc.Spec.DataSource.Name)
|
||||
if pvc.Spec.DataSource.APIGroup != nil {
|
||||
w.Write(LEVEL_1, "APIGroup:\t%v\n", *pvc.Spec.DataSource.APIGroup)
|
||||
}
|
||||
w.Write(LEVEL_1, "Kind:\t%v\n", pvc.Spec.DataSource.Kind)
|
||||
w.Write(LEVEL_1, "Name:\t%v\n", pvc.Spec.DataSource.Name)
|
||||
}
|
||||
printPodsMultiline(w, "Mounted By", mountPods)
|
||||
|
||||
|
|
|
@ -1595,7 +1595,7 @@ func TestPersistentVolumeClaimDescriber(t *testing.T) {
|
|||
},
|
||||
Status: corev1.PersistentVolumeClaimStatus{},
|
||||
},
|
||||
expectedElements: []string{"\nDataSource:\n Name: srcpvc\n Kind: PersistentVolumeClaim"},
|
||||
expectedElements: []string{"\nDataSource:\n Kind: PersistentVolumeClaim\n Name: srcpvc"},
|
||||
},
|
||||
{
|
||||
name: "snapshot-datasource",
|
||||
|
@ -1615,7 +1615,7 @@ func TestPersistentVolumeClaimDescriber(t *testing.T) {
|
|||
},
|
||||
Status: corev1.PersistentVolumeClaimStatus{},
|
||||
},
|
||||
expectedElements: []string{"DataSource:\n Name: src-snapshot\n Kind: VolumeSnapshot\n"},
|
||||
expectedElements: []string{"DataSource:\n APIGroup: snapshot.storage.k8s.io\n Kind: VolumeSnapshot\n Name: src-snapshot\n"},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue