Skip to content

Commit

Permalink
swap FIRSTSEEN/LASTSEEN columns in kubectl get event
Browse files Browse the repository at this point in the history
Not having LASTSEEN as the first column can confuse users into thinking
that events are not delivered in order.

Fixes #27060
  • Loading branch information
Rudi Chiarito committed Jun 16, 2016
1 parent 3ba5816 commit bf873df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kubectl/resource_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ var petSetColumns = []string{"NAME", "DESIRED", "CURRENT", "AGE"}
var endpointColumns = []string{"NAME", "ENDPOINTS", "AGE"}
var nodeColumns = []string{"NAME", "STATUS", "AGE"}
var daemonSetColumns = []string{"NAME", "DESIRED", "CURRENT", "NODE-SELECTOR", "AGE"}
var eventColumns = []string{"FIRSTSEEN", "LASTSEEN", "COUNT", "NAME", "KIND", "SUBOBJECT", "TYPE", "REASON", "SOURCE", "MESSAGE"}
var eventColumns = []string{"LASTSEEN", "FIRSTSEEN", "COUNT", "NAME", "KIND", "SUBOBJECT", "TYPE", "REASON", "SOURCE", "MESSAGE"}
var limitRangeColumns = []string{"NAME", "AGE"}
var resourceQuotaColumns = []string{"NAME", "AGE"}
var namespaceColumns = []string{"NAME", "STATUS", "AGE"}
Expand Down Expand Up @@ -1477,8 +1477,8 @@ func printEvent(event *api.Event, w io.Writer, options PrintOptions) error {

if _, err := fmt.Fprintf(
w, "%s\t%s\t%d\t%s\t%s\t%s\t%s\t%s\t%s\t%s",
FirstTimestamp,
LastTimestamp,
FirstTimestamp,
event.Count,
event.InvolvedObject.Name,
event.InvolvedObject.Kind,
Expand Down

0 comments on commit bf873df

Please sign in to comment.