UPSTREAM: 66406: tolerate missing column headers in server-side print output
@@ -371,6 +371,11 @@ func PrintTable(table *metav1beta1.Table, output io.Writer, options PrintOptions
for _, row := range table.Rows {
first := true
for i, cell := range row.Cells {
+ if i >= len(table.ColumnDefinitions) {
+ // https://issue.k8s.io/66379
+ // don't panic in case of bad output from the server, with more cells than column definitions
+ break
+ }
column := table.ColumnDefinitions[i]
if !options.Wide && column.Priority != 0 {
continue
