-
Kubernetes Submit Queue authored
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Update kubectl describe to print out PV node affinity **What this PR does / why we need it**: Print out PV NodeAffinity in kubectl describe. Sample output: ``` Name: example-local-pv Labels: foo1=bar1 foo2=bar2 Annotations: <none> Finalizers: [] StorageClass: local-storage Status: Available Claim: Reclaim Policy: Delete Access Modes: RWO Capacity: 5Gi Node Affinity: Required Terms: Term 0: kubernetes.io/hostname in [my-node] foo1 in [bar1, bar2] Term 1: foo2 exists Message: Source: Type: LocalVolume (a persistent volume backed by local storage on a node) Path: /mnt/disks/ssd1 Events: <none> ``` No NodeAffinity is set: ``` Name: nfs Labels: <none> Annotations: <none> Finalizers: [] StorageClass: Status: Available Claim: Reclaim Policy: Retain Access Modes: RWX Capacity: 1Mi Node Affinity: <none> Message: Source: Type: NFS (an NFS mount that lasts the lifetime of a pod) Server: 10.244.1.4 Path: /exports ReadOnly: false Events: <none> ``` **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #60119 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```