mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 12:11:43 +00:00
Optimize etcd storage by compressing recurring events in to a single event
This commit is contained in:
@@ -318,10 +318,12 @@ func describeEvents(el *api.EventList, w io.Writer) {
|
||||
return
|
||||
}
|
||||
sort.Sort(SortableEvents(el.Items))
|
||||
fmt.Fprint(w, "Events:\nTime\tFrom\tSubobjectPath\tReason\tMessage\n")
|
||||
fmt.Fprint(w, "Events:\nFirstSeen\tLastSeen\tCount\tFrom\tSubobjectPath\tReason\tMessage\n")
|
||||
for _, e := range el.Items {
|
||||
fmt.Fprintf(w, "%s\t%v\t%v\t%v\t%v\n",
|
||||
fmt.Fprintf(w, "%s\t%s\t%d\t%v\t%v\t%v\t%v\n",
|
||||
e.FirstTimestamp.Time.Format(time.RFC1123Z),
|
||||
e.LastTimestamp.Time.Format(time.RFC1123Z),
|
||||
e.Count,
|
||||
e.Source,
|
||||
e.InvolvedObject.FieldPath,
|
||||
e.Reason,
|
||||
|
Reference in New Issue
Block a user