It is often useful to publish Event objects from the controller Reconcile function. Events allow users to see what is going on with a particular object, and allow automated processes to see and respond to them.
Recent Events for an object may be viewed by running
Events are published from a Controller using an EventRecorder,
which can be created for a Controller by calling
GetRecorder(name string) on a Manager.
Event(object runtime.Object, eventtype, reason, message string)
objectis the object this event is about.
eventtypeis the type of this event, and is either Normal or Warning.
reasonis the reason this event is generated. It should be short and unique with
UpperCamelCaseformat. The value could appear in switch statements by automation.
messageis intended to be consumed by humans.