mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
Add EventSource to api to have both Component and Host information.
This commit is contained in:
@@ -109,7 +109,7 @@ func (rs *REST) getAttrs(obj runtime.Object) (objLabels, objFields labels.Set, e
|
||||
"condition": event.Condition,
|
||||
"status": event.Condition, // TODO: remove me when we version fields
|
||||
"reason": event.Reason,
|
||||
"source": event.Source,
|
||||
"source": event.Source.Component,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@@ -145,7 +145,7 @@ func TestRESTgetAttrs(t *testing.T) {
|
||||
},
|
||||
Condition: "Tested",
|
||||
Reason: "ForTesting",
|
||||
Source: "test",
|
||||
Source: api.EventSource{Component: "test"},
|
||||
}
|
||||
label, field, err := rest.getAttrs(eventA)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user