mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Fix kubectl describe CSINode nil pointer error
This commit is contained in:
parent
a329e67922
commit
55c455e61f
@ -4031,10 +4031,14 @@ func describeCSINode(csi *storagev1.CSINode, events *corev1.EventList) (output s
|
|||||||
w.Write(LEVEL_1, "Drivers:\n")
|
w.Write(LEVEL_1, "Drivers:\n")
|
||||||
for _, driver := range csi.Spec.Drivers {
|
for _, driver := range csi.Spec.Drivers {
|
||||||
w.Write(LEVEL_2, "%s:\n", driver.Name)
|
w.Write(LEVEL_2, "%s:\n", driver.Name)
|
||||||
w.Write(LEVEL_3, "Allocatables:\n")
|
|
||||||
w.Write(LEVEL_4, "Count:\t%d\n", *driver.Allocatable.Count)
|
|
||||||
w.Write(LEVEL_3, "Node ID:\t%s\n", driver.NodeID)
|
w.Write(LEVEL_3, "Node ID:\t%s\n", driver.NodeID)
|
||||||
w.Write(LEVEL_3, "Topology Keys:\t%s\n", driver.TopologyKeys)
|
if driver.Allocatable.Count != nil {
|
||||||
|
w.Write(LEVEL_3, "Allocatables:\n")
|
||||||
|
w.Write(LEVEL_4, "Count:\t%d\n", *driver.Allocatable.Count)
|
||||||
|
}
|
||||||
|
if driver.TopologyKeys != nil {
|
||||||
|
w.Write(LEVEL_3, "Topology Keys:\t%s\n", driver.TopologyKeys)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if events != nil {
|
if events != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user