File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,7 +161,9 @@ func (p *Provider) GetEventRecorderFor(name string) record.EventRecorder {
161161}
162162
163163// GetEventRecorder returns an event recorder that broadcasts to this provider's
164- // broadcaster. All events will be associated with a component of the given name.
164+ // broadcaster. All events will be associated with the given reportingController
165+ // name. client-go appends "-" and the hostname to derive reportingInstance,
166+ // which must fit within the events.k8s.io/v1 128-character limit.
165167func (p * Provider ) GetEventRecorder (name string ) events.EventRecorder {
166168 return & lazyRecorder {
167169 prov : p ,
Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ type Provider interface {
3131 //
3232 // Deprecated: this uses the old events API and will be removed in a future release. Please use GetEventRecorder instead.
3333 GetEventRecorderFor (name string ) record.EventRecorder
34- // GetEventRecorder returns a EventRecorder with given name.
34+ // GetEventRecorder returns an EventRecorder with given name.
35+ //
36+ // The name is used as the reportingController of events.k8s.io/v1 Events
37+ // and must be a valid Kubernetes qualified name. client-go derives the
38+ // reportingInstance by appending "-" and the current hostname to
39+ // reportingController. reportingInstance must be no more than 128
40+ // characters, so callers should ensure that len(name) + 1 + len(hostname)
41+ // is at most 128.
3542 GetEventRecorder (name string ) events.EventRecorder
3643}
You can’t perform that action at this time.
0 commit comments