Skip to content

Commit

Permalink
Merge pull request #27549 from Clarifai/eventorder
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

swap FIRSTSEEN/LASTSEEN columns in `kubectl get event -w`

```release-note
Show LASTSEEN, the sorting key, as the first column in `kubectl get event` output
```
Not having LASTSEEN as the first column can confuse users into thinking
that events are not delivered in order.

Fixes #27060
  • Loading branch information
k8s-merge-robot authored Jun 21, 2016
2 parents d2f5bbc + bf873df commit 1fd4047
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 1fd4047

Please sign in to comment.