Struct kube_runtime::events::Event
source · pub struct Event {
pub type_: EventType,
pub reason: String,
pub note: Option<String>,
pub action: String,
pub secondary: Option<ObjectReference>,
}
Expand description
Minimal event type for publishing through Recorder::publish
.
All string fields must be human readable.
Fields§
§type_: EventType
The event severity.
Shows up in kubectl describe
as Type
.
reason: String
The short reason explaining why the action
was taken.
This must be at most 128 characters, generally in PascalCase
. Shows up in kubectl describe
as Reason
.
note: Option<String>
A optional description of the status of the action
.
This must be at most 1kB in size. Shows up in kubectl describe
as Message
.
action: String
The action that was taken (either successfully or unsuccessfully) against main object
This must be at most 128 characters. It does not currently show up in kubectl describe
.
A common convention is a short identifier of the action that caused the outcome described in reason
.
Usually denoted in PascalCase
.
secondary: Option<ObjectReference>
Optional secondary object related to the main object
Some events are emitted for actions that affect multiple objects.
secondary
can be populated to capture this detail.
For example: the event concerns a Deployment
and it affects the current ReplicaSet
underneath it.
You would therefore populate events
using the object reference of the ReplicaSet
.
Set secondary
to None
, instead, if the event affects only the object whose reference
you passed to Recorder::new
.
§Naming note
secondary
is mapped to related
in
Events API
.