Change:
<!-- This form is for bug reports and feature requests ONLY! If you're looking for help check and the . If the matter is security related, please disclose it privately via --Is this a BUG REPORT or FEATURE REQUEST?: What happened: kubectl describe pv doesn't show the volume attributes
If there was no one working on this, I can help do it.
/assign
/remove-help
[MILESTONENOTIFIER] Milestone Issue: Up-to-date for process <details open<summaryIssue Labels</summary- : Issue will be escalated to these SIGs if needed. : Escalate to the issue owners and SIG owner; move out of milestone after several unsuccessful escalation attempts. : New functionality. </details<details<summaryHelp</summary<ul<li<a href=""Additional instructions</a</li<li<a href=""Commands for setting labels</a</li</ul</details

Discussion:
"    VolumeHandle:t%vn"+ "    ReadOnly:t%vn", csi.Driver, csi.VolumeHandle, csi.ReadOnly) <ins> printCSIPersistentVolumeAttributesMultiline(w, "VolumeAttributes", csi.VolumeAttributes) } func printCSIPersistentVolumeAttributesMultiline(w PrefixWriter, title string, annotations map[string]string) { printCSIPersistentVolumeAttributesMultilineIndent(w, "", title, "t", annotations, sets.NewString()) } func printCSIPersistentVolumeAttributesMultilineIndent(w PrefixWriter, initialIndent, title, innerIndent string, attributes map[string]string, skip sets.String) { w.Write(LEVEL_2, "%s%s:%s", initialIndent, title, innerIndent) if len(attributes) == 0 { w.WriteLine("<none>") return } // to print labels in the sorted order keys := make([]string, 0, len(attributes)) for key := range attributes { if skip.Has(key) { continue } keys = append(keys, key) } if len(attributes) == 0 { w.WriteLine("<none>") return } sort.Strings(keys) for i, key := range keys { if i != 0 { w.Write(LEVEL_2, initialIndent) w.Write(LEVEL_2, innerIndent) } line := fmt.Sprintf("%s=%s", key, attributes[key]) if len(line) > maxAnnotationLen { w.Write(LEVEL_2, "%s...n", line[:maxAnnotationLen]) } else { w.Write(LEVEL_2, "%sn", line) } i++ } </ins> } type PersistentVolumeDescriber struct {

return tabbedString(func(out io.Writer) error { w := NewPrefixWriter(out) w.Write(LEVEL_0, "Name:t%sn", pv.Name) <del> printLabelsMultiline(w, "Labels", pv.Labels) printAnnotationsMultiline(w, "Annotations", pv.Annotations) </del> <ins> printLabelsMultiline(w, "Labels", pv.ObjectMeta.Labels) printAnnotationsMultiline(w, "Annotations", pv.ObjectMeta.Annotations) </ins> w.Write(LEVEL_0, "Finalizers:t%vn", pv.ObjectMeta.Finalizers) w.Write(LEVEL_0, "StorageClass:t%sn", helper.GetPersistentVolumeClass(pv)) if pv.ObjectMeta.DeletionTimestamp != nil {

}, expectedElements: []string{"Terminating (lasts 10y)"}, }, <ins> { name:   "test16", plugin: "local", pv: &api.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name:                       "bar", GenerateName:               "test-GenerateName", UID:                        "test-UID", CreationTimestamp:          metav1.Time{Time: time.Now()}, DeletionTimestamp:          &metav1.Time{Time: time.Now()}, DeletionGracePeriodSeconds: new(int64), Labels:      map[string]string{"label1": "label1", "label2": "label2", "label3": "label3"}, Annotations: map[string]string{"annotation1": "annotation1", "annotation2": "annotation2", "annotation3": "annotation3"}, }, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ Local: &api.LocalVolumeSource{}, }, NodeAffinity: &api.VolumeNodeAffinity{ Required: &api.NodeSelector{ NodeSelectorTerms: []api.NodeSelectorTerm{ { MatchExpressions: []api.NodeSelectorRequirement{ { Key:      "foo", Operator: "In", Values:   []string{"val1", "val2"}, }, { Key:      "foo", Operator: "Exists", }, }, }, }, }, }, }, }, expectedElements: []string{"Node Affinity", "Required Terms", "Term 0", "foo in [val1, val2]", "foo exists"}, }, { name:   "test17", plugin: "local", pv: &api.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name:                       "bar", GenerateName:               "test-GenerateName", UID:                        "test-UID", CreationTimestamp:          metav1.Time{Time: time.Now()}, DeletionTimestamp:          &metav1.Time{Time: time.Now()}, DeletionGracePeriodSeconds: new(int64), Labels:      map[string]string{"label1": "label1", "label2": "label2", "label3": "label3"}, Annotations: map[string]string{"annotation1": "annotation1", "annotation2": "annotation2", "annotation3": "annotation3"}, }, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ CSI: &api.CSIPersistentVolumeSource{ Driver:       "drive", VolumeHandle: "handler", ReadOnly:     true, VolumeAttributes: map[string]string{ "Attribute1": "Value1", "Attribute2": "Value2", "Attribute3": "Value3", }, }, }, }, }, expectedElements: []string{"Driver", "VolumeHandle", "ReadOnly", "VolumeAttributes"}, }, </ins> } for _, test := range testCases {