2 Copyright 2017 The Kubernetes Authors.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
20 corev1 "k8s.io/api/core/v1"
21 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
25 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
27 // Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
29 metav1.TypeMeta `json:",inline"`
31 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
33 // Required. Time when this Event was first observed.
34 EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"`
36 // Data about the Event series this event represents or nil if it's a singleton Event.
38 Series *EventSeries `json:"series,omitempty" protobuf:"bytes,3,opt,name=series"`
40 // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
42 ReportingController string `json:"reportingController,omitempty" protobuf:"bytes,4,opt,name=reportingController"`
44 // ID of the controller instance, e.g. `kubelet-xyzf`.
46 ReportingInstance string `json:"reportingInstance,omitemtpy" protobuf:"bytes,5,opt,name=reportingInstance"`
48 // What action was taken/failed regarding to the regarding object.
50 Action string `json:"action,omitemtpy" protobuf:"bytes,6,name=action"`
52 // Why the action was taken.
53 Reason string `json:"reason,omitempty" protobuf:"bytes,7,name=reason"`
55 // The object this Event is about. In most cases it's an Object reporting controller implements.
56 // E.g. ReplicaSetController implements ReplicaSets and this event is emitted because
57 // it acts on some changes in a ReplicaSet object.
59 Regarding corev1.ObjectReference `json:"regarding,omitempty" protobuf:"bytes,8,opt,name=regarding"`
61 // Optional secondary object for more complex actions. E.g. when regarding object triggers
62 // a creation or deletion of related object.
64 Related *corev1.ObjectReference `json:"related,omitempty" protobuf:"bytes,9,opt,name=related"`
66 // Optional. A human-readable description of the status of this operation.
67 // Maximal length of the note is 1kB, but libraries should be prepared to
68 // handle values up to 64kB.
70 Note string `json:"note,omitempty" protobuf:"bytes,10,opt,name=note"`
72 // Type of this event (Normal, Warning), new types could be added in the
75 Type string `json:"type,omitempty" protobuf:"bytes,11,opt,name=type"`
77 // Deprecated field assuring backward compatibility with core.v1 Event type
79 DeprecatedSource corev1.EventSource `json:"deprecatedSource,omitempty" protobuf:"bytes,12,opt,name=deprecatedSource"`
80 // Deprecated field assuring backward compatibility with core.v1 Event type
82 DeprecatedFirstTimestamp metav1.Time `json:"deprecatedFirstTimestamp,omitempty" protobuf:"bytes,13,opt,name=deprecatedFirstTimestamp"`
83 // Deprecated field assuring backward compatibility with core.v1 Event type
85 DeprecatedLastTimestamp metav1.Time `json:"deprecatedLastTimestamp,omitempty" protobuf:"bytes,14,opt,name=deprecatedLastTimestamp"`
86 // Deprecated field assuring backward compatibility with core.v1 Event type
88 DeprecatedCount int32 `json:"deprecatedCount,omitempty" protobuf:"varint,15,opt,name=deprecatedCount"`
91 // EventSeries contain information on series of events, i.e. thing that was/is happening
92 // continuously for some time.
93 type EventSeries struct {
94 // Number of occurrences in this series up to the last heartbeat time
95 Count int32 `json:"count" protobuf:"varint,1,opt,name=count"`
96 // Time when last Event from the series was seen before last heartbeat.
97 LastObservedTime metav1.MicroTime `json:"lastObservedTime" protobuf:"bytes,2,opt,name=lastObservedTime"`
98 // Information whether this series is ongoing or finished.
99 State EventSeriesState `json:"state" protobuf:"bytes,3,opt,name=state"`
102 type EventSeriesState string
105 EventSeriesStateOngoing EventSeriesState = "Ongoing"
106 EventSeriesStateFinished EventSeriesState = "Finished"
107 EventSeriesStateUnknown EventSeriesState = "Unknown"
110 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
112 // EventList is a list of Event objects.
113 type EventList struct {
114 metav1.TypeMeta `json:",inline"`
115 // Standard list metadata.
116 // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
118 metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
120 // Items is a list of schema objects.
121 Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"`