mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-21 10:30:24 +00:00
Update conversion between ReportingController and Source.Component
Kubernetes-commit: e010436e2acc96d710620a91ceaaa86becca4060
This commit is contained in:
parent
16621f6444
commit
51d7273066
@ -153,7 +153,8 @@ func (f *EventSourceObjectSpamFilter) Filter(event *v1.Event) bool {
|
|||||||
// localKey - key that makes this event in the local group
|
// localKey - key that makes this event in the local group
|
||||||
type EventAggregatorKeyFunc func(event *v1.Event) (aggregateKey string, localKey string)
|
type EventAggregatorKeyFunc func(event *v1.Event) (aggregateKey string, localKey string)
|
||||||
|
|
||||||
// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type and event.Reason
|
// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type,
|
||||||
|
// event.Reason, event.ReportingController and event.ReportingInstance
|
||||||
func EventAggregatorByReasonFunc(event *v1.Event) (string, string) {
|
func EventAggregatorByReasonFunc(event *v1.Event) (string, string) {
|
||||||
return strings.Join([]string{
|
return strings.Join([]string{
|
||||||
event.Source.Component,
|
event.Source.Component,
|
||||||
@ -165,6 +166,8 @@ func EventAggregatorByReasonFunc(event *v1.Event) (string, string) {
|
|||||||
event.InvolvedObject.APIVersion,
|
event.InvolvedObject.APIVersion,
|
||||||
event.Type,
|
event.Type,
|
||||||
event.Reason,
|
event.Reason,
|
||||||
|
event.ReportingController,
|
||||||
|
event.ReportingInstance,
|
||||||
},
|
},
|
||||||
""), event.Message
|
""), event.Message
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user