cue.dev/x/k8s.io@v0.7.0

api/events/v1/schema.cue raw

  1package v1
  2
  3import (
  4	"cue.dev/x/k8s.io/apimachinery/pkg/apis/meta/v1"
  5	v1_9 "cue.dev/x/k8s.io/api/core/v1"
  6)
  7
  8// Event is a report of an event somewhere in the cluster. It
  9// generally denotes some state change in the system. Events have
 10// a limited retention time and triggers and messages may evolve
 11// with time. Event consumers should not rely on the timing of an
 12// event with a given Reason reflecting a consistent underlying
 13// trigger, or the continued existence of events with that
 14// Reason. Events should be treated as informative, best-effort,
 15// supplemental data.
 16#Event: {
 17	// action is what action was taken/failed regarding to the
 18	// regarding object. It is machine-readable. This field cannot be
 19	// empty for new Events and it can have at most 128 characters.
 20	"action"?: string
 21
 22	// APIVersion defines the versioned schema of this representation
 23	// of an object. Servers should convert recognized schemas to the
 24	// latest internal value, and may reject unrecognized values.
 25	// More info:
 26	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 27	"apiVersion": "events.k8s.io/v1"
 28
 29	// deprecatedCount is the deprecated field assuring backward
 30	// compatibility with core.v1 Event type.
 31	"deprecatedCount"?: int32 & int
 32
 33	// deprecatedFirstTimestamp is the deprecated field assuring
 34	// backward compatibility with core.v1 Event type.
 35	"deprecatedFirstTimestamp"?: v1.#Time
 36
 37	// deprecatedLastTimestamp is the deprecated field assuring
 38	// backward compatibility with core.v1 Event type.
 39	"deprecatedLastTimestamp"?: v1.#Time
 40
 41	// deprecatedSource is the deprecated field assuring backward
 42	// compatibility with core.v1 Event type.
 43	"deprecatedSource"?: v1_9.#EventSource
 44
 45	// eventTime is the time when this Event was first observed. It is
 46	// required.
 47	"eventTime"!: v1.#MicroTime
 48
 49	// Kind is a string value representing the REST resource this
 50	// object represents. Servers may infer this from the endpoint
 51	// the client submits requests to. Cannot be updated. In
 52	// CamelCase. More info:
 53	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 54	"kind": "Event"
 55
 56	// Standard object's metadata. More info:
 57	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
 58	"metadata"?: v1.#ObjectMeta
 59
 60	// note is a human-readable description of the status of this
 61	// operation. Maximal length of the note is 1kB, but libraries
 62	// should be prepared to handle values up to 64kB.
 63	"note"?: string
 64
 65	// reason is why the action was taken. It is human-readable. This
 66	// field cannot be empty for new Events and it can have at most
 67	// 128 characters.
 68	"reason"?: string
 69
 70	// regarding contains the object this Event is about. In most
 71	// cases it's an Object reporting controller implements, e.g.
 72	// ReplicaSetController implements ReplicaSets and this event is
 73	// emitted because it acts on some changes in a ReplicaSet
 74	// object.
 75	"regarding"?: v1_9.#ObjectReference
 76
 77	// related is the optional secondary object for more complex
 78	// actions. E.g. when regarding object triggers a creation or
 79	// deletion of related object.
 80	"related"?: v1_9.#ObjectReference
 81
 82	// reportingController is the name of the controller that emitted
 83	// this Event, e.g. `kubernetes.io/kubelet`. This field cannot be
 84	// empty for new Events.
 85	"reportingController"?: string
 86
 87	// reportingInstance is the ID of the controller instance, e.g.
 88	// `kubelet-xyzf`. This field cannot be empty for new Events and
 89	// it can have at most 128 characters.
 90	"reportingInstance"?: string
 91
 92	// series is data about the Event series this event represents or
 93	// nil if it's a singleton Event.
 94	"series"?: #EventSeries
 95
 96	// type is the type of this event (Normal, Warning), new types
 97	// could be added in the future. It is machine-readable. This
 98	// field cannot be empty for new Events.
 99	"type"?: string
100}
101
102// EventList is a list of Event objects.
103#EventList: {
104	// APIVersion defines the versioned schema of this representation
105	// of an object. Servers should convert recognized schemas to the
106	// latest internal value, and may reject unrecognized values.
107	// More info:
108	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
109	"apiVersion": "events.k8s.io/v1"
110
111	// items is a list of schema objects.
112	"items"!: [...#Event]
113
114	// Kind is a string value representing the REST resource this
115	// object represents. Servers may infer this from the endpoint
116	// the client submits requests to. Cannot be updated. In
117	// CamelCase. More info:
118	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
119	"kind": "EventList"
120
121	// Standard list metadata. More info:
122	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
123	"metadata"?: v1.#ListMeta
124}
125
126// EventSeries contain information on series of events, i.e. thing
127// that was/is happening continuously for some time. How often to
128// update the EventSeries is up to the event reporters. The
129// default event reporter in
130// "k8s.io/client-go/tools/events/event_broadcaster.go" shows how
131// this struct is updated on heartbeats and can guide customized
132// reporter implementations.
133#EventSeries: {
134	// count is the number of occurrences in this series up to the
135	// last heartbeat time.
136	"count"!: int32 & int
137
138	// lastObservedTime is the time when last Event from the series
139	// was seen before last heartbeat.
140	"lastObservedTime"!: v1.#MicroTime
141}