Change:
Currently there's now way for a user to check what they entered in the DataSource field of a PVC create request. In the past, this wasn't as confusing because if one were to submit invalid info (unsupported Kind) the verification checks would fail and the request would be rejected with a helpful message indicating why. As of 1.14 that's no longer the case, a user is able to put anything they wish in these fields and the create is performed and they get a PVC, and there's no way for them to see what is or isn't set. Adding output of DataSource to would be useful, not only for invalid cases where the input might just get eaten, but also for users to have the ability to check for originating sources of their PVCs.
/sig storage
/assign
GitHub didn't allow me to assign the following users: me. Note that only and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. For more information please see <detailsIn response to : /assign me Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten

Discussion:
if pvc.Spec.VolumeMode != nil { w.Write(LEVEL_0, "VolumeMode:t%vn", *pvc.Spec.VolumeMode) } <ins> if pvc.Spec.DataSource != nil { w.Write(LEVEL_0, "DataSource:n") w.Write(LEVEL_1, "Name:t%vn", pvc.Spec.DataSource.Name) w.Write(LEVEL_1, "Kind:t%vn", pvc.Spec.DataSource.Kind) } </ins> printPodsMultiline(w, "Mounted By", mountPods) if len(pvc.Status.Conditions) > 0 {

goldClassName := "gold" now := time.Now() deletionTimestamp := metav1.Time{Time: time.Now().UTC().AddDate(-10, 0, 0)} <ins> snapshotAPIGroup := "snapshot.storage.k8s.io" </ins> testCases := []struct { name               string pvc                *corev1.PersistentVolumeClaim

}, expectedElements: []string{"Terminating (lasts 10y)"}, }, <ins> { name: "pvc-datasource", pvc: &corev1.PersistentVolumeClaim{ ObjectMeta: metav1.ObjectMeta{ Namespace: "foo", Name:      "bar", }, Spec: corev1.PersistentVolumeClaimSpec{ VolumeName:       "volume10", StorageClassName: &goldClassName, DataSource: &corev1.TypedLocalObjectReference{ Name: "srcpvc", Kind: "PersistentVolumeClaim", }, }, Status: corev1.PersistentVolumeClaimStatus{}, }, expectedElements: []string{"nDataSource:n  Name:      srcpvcn  Kind:      PersistentVolumeClaim"}, }, { name: "snapshot-datasource", pvc: &corev1.PersistentVolumeClaim{ ObjectMeta: metav1.ObjectMeta{ Namespace: "foo", Name:      "bar", }, Spec: corev1.PersistentVolumeClaimSpec{ VolumeName:       "volume10", StorageClassName: &goldClassName, DataSource: &corev1.TypedLocalObjectReference{ Name:     "src-snapshot", Kind:     "VolumeSnapshot", APIGroup: &snapshotAPIGroup, }, }, Status: corev1.PersistentVolumeClaimStatus{}, }, expectedElements: []string{"DataSource:n  Name:      src-snapshotn  Kind:      VolumeSnapshotn"}, }, </ins> } for _, test := range testCases {

} } <ins> // boolPtr returns a pointer to a bool func boolPtr(b bool) *bool { o := b return &o } </ins> func TestControllerRef(t *testing.T) { var replicas int32 = 1 f := fake.NewSimpleClientset(