We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5814d29 commit c572daaCopy full SHA for c572daa
pkg/kube/event.go
@@ -12,6 +12,7 @@ type EnhancedEvent struct {
12
corev1.Event `json:",inline"`
13
ClusterName string `json:"clusterName"`
14
InvolvedObject EnhancedObjectReference `json:"involvedObject"`
15
+ Timestamp time.Time `json:"@timestamp"`
16
}
17
18
// DeDot replaces all dots in the labels and annotations with underscores. This is required for example in the
@@ -47,6 +48,7 @@ type EnhancedObjectReference struct {
47
48
// ToJSON does not return an error because we are %99 confident it is JSON serializable.
49
// TODO(makin) Is it a bad practice? It's open to discussion.
50
func (e *EnhancedEvent) ToJSON() []byte {
51
+ e.Timestamp = e.FirstTimestamp.Time
52
b, _ := json.Marshal(e)
53
return b
54
0 commit comments