mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Merge pull request #94910 from yashvardhan-kukreja/issue-94602/fix-comment-declaration-event
Cleaned up: the potentially misleading comment under Event struct
This commit is contained in:
commit
6e9475bcd3
8
api/openapi-spec/swagger.json
generated
8
api/openapi-spec/swagger.json
generated
@ -10898,7 +10898,7 @@
|
|||||||
"description": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.",
|
"description": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"action": {
|
"action": {
|
||||||
"description": "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field can have at most 128 characters.",
|
"description": "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
@ -10938,7 +10938,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"reason": {
|
"reason": {
|
||||||
"description": "reason is why the action was taken. It is human-readable. This field can have at most 128 characters.",
|
"description": "reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"regarding": {
|
"regarding": {
|
||||||
@ -10962,11 +10962,12 @@
|
|||||||
"description": "series is data about the Event series this event represents or nil if it's a singleton Event."
|
"description": "series is data about the Event series this event represents or nil if it's a singleton Event."
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"description": "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable.",
|
"description": "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
"metadata",
|
||||||
"eventTime"
|
"eventTime"
|
||||||
],
|
],
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -11105,6 +11106,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
"metadata",
|
||||||
"eventTime"
|
"eventTime"
|
||||||
],
|
],
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -4568,10 +4568,10 @@ const (
|
|||||||
// TODO: Decide whether to store these separately or with the object they apply to.
|
// TODO: Decide whether to store these separately or with the object they apply to.
|
||||||
type Event struct {
|
type Event struct {
|
||||||
metav1.TypeMeta
|
metav1.TypeMeta
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta
|
metav1.ObjectMeta
|
||||||
|
|
||||||
// Required. The object that this event is about. Mapped to events.Event.regarding
|
// The object that this event is about. Mapped to events.Event.regarding
|
||||||
// +optional
|
// +optional
|
||||||
InvolvedObject ObjectReference
|
InvolvedObject ObjectReference
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ option go_package = "v1";
|
|||||||
|
|
||||||
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
||||||
message Event {
|
message Event {
|
||||||
// +optional
|
|
||||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||||
|
|
||||||
// eventTime is the time when this Event was first observed. It is required.
|
// eventTime is the time when this Event was first observed. It is required.
|
||||||
@ -43,22 +42,18 @@ message Event {
|
|||||||
|
|
||||||
// reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
// reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
||||||
// This field cannot be empty for new Events.
|
// This field cannot be empty for new Events.
|
||||||
// +optional
|
|
||||||
optional string reportingController = 4;
|
optional string reportingController = 4;
|
||||||
|
|
||||||
// reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`.
|
// reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`.
|
||||||
// This field cannot be empty for new Events and it can have at most 128 characters.
|
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||||
// +optional
|
|
||||||
optional string reportingInstance = 5;
|
optional string reportingInstance = 5;
|
||||||
|
|
||||||
// action is what action was taken/failed regarding to the regarding object. It is machine-readable.
|
// action is what action was taken/failed regarding to the regarding object. It is machine-readable.
|
||||||
// This field can have at most 128 characters.
|
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||||
// +optional
|
|
||||||
optional string action = 6;
|
optional string action = 6;
|
||||||
|
|
||||||
// reason is why the action was taken. It is human-readable.
|
// reason is why the action was taken. It is human-readable.
|
||||||
// This field can have at most 128 characters.
|
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||||
// +optional
|
|
||||||
optional string reason = 7;
|
optional string reason = 7;
|
||||||
|
|
||||||
// regarding contains the object this Event is about. In most cases it's an Object reporting controller
|
// regarding contains the object this Event is about. In most cases it's an Object reporting controller
|
||||||
@ -80,7 +75,7 @@ message Event {
|
|||||||
|
|
||||||
// type is the type of this event (Normal, Warning), new types could be added in the future.
|
// type is the type of this event (Normal, Warning), new types could be added in the future.
|
||||||
// It is machine-readable.
|
// It is machine-readable.
|
||||||
// +optional
|
// This field cannot be empty for new Events.
|
||||||
optional string type = 11;
|
optional string type = 11;
|
||||||
|
|
||||||
// deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
|
// deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||||
|
@ -27,8 +27,8 @@ import (
|
|||||||
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
||||||
type Event struct {
|
type Event struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// eventTime is the time when this Event was first observed. It is required.
|
// eventTime is the time when this Event was first observed. It is required.
|
||||||
EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"`
|
EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"`
|
||||||
@ -39,22 +39,18 @@ type Event struct {
|
|||||||
|
|
||||||
// reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
// reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
||||||
// This field cannot be empty for new Events.
|
// This field cannot be empty for new Events.
|
||||||
// +optional
|
|
||||||
ReportingController string `json:"reportingController,omitempty" protobuf:"bytes,4,opt,name=reportingController"`
|
ReportingController string `json:"reportingController,omitempty" protobuf:"bytes,4,opt,name=reportingController"`
|
||||||
|
|
||||||
// reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`.
|
// reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`.
|
||||||
// This field cannot be empty for new Events and it can have at most 128 characters.
|
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||||
// +optional
|
|
||||||
ReportingInstance string `json:"reportingInstance,omitempty" protobuf:"bytes,5,opt,name=reportingInstance"`
|
ReportingInstance string `json:"reportingInstance,omitempty" protobuf:"bytes,5,opt,name=reportingInstance"`
|
||||||
|
|
||||||
// action is what action was taken/failed regarding to the regarding object. It is machine-readable.
|
// action is what action was taken/failed regarding to the regarding object. It is machine-readable.
|
||||||
// This field can have at most 128 characters.
|
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||||
// +optional
|
|
||||||
Action string `json:"action,omitempty" protobuf:"bytes,6,name=action"`
|
Action string `json:"action,omitempty" protobuf:"bytes,6,name=action"`
|
||||||
|
|
||||||
// reason is why the action was taken. It is human-readable.
|
// reason is why the action was taken. It is human-readable.
|
||||||
// This field can have at most 128 characters.
|
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||||
// +optional
|
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,7,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,7,name=reason"`
|
||||||
|
|
||||||
// regarding contains the object this Event is about. In most cases it's an Object reporting controller
|
// regarding contains the object this Event is about. In most cases it's an Object reporting controller
|
||||||
@ -76,7 +72,7 @@ type Event struct {
|
|||||||
|
|
||||||
// type is the type of this event (Normal, Warning), new types could be added in the future.
|
// type is the type of this event (Normal, Warning), new types could be added in the future.
|
||||||
// It is machine-readable.
|
// It is machine-readable.
|
||||||
// +optional
|
// This field cannot be empty for new Events.
|
||||||
Type string `json:"type,omitempty" protobuf:"bytes,11,opt,name=type"`
|
Type string `json:"type,omitempty" protobuf:"bytes,11,opt,name=type"`
|
||||||
|
|
||||||
// deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
|
// deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||||
|
@ -33,12 +33,12 @@ var map_Event = map[string]string{
|
|||||||
"series": "series is data about the Event series this event represents or nil if it's a singleton Event.",
|
"series": "series is data about the Event series this event represents or nil if it's a singleton Event.",
|
||||||
"reportingController": "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.",
|
"reportingController": "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.",
|
||||||
"reportingInstance": "reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.",
|
"reportingInstance": "reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.",
|
||||||
"action": "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field can have at most 128 characters.",
|
"action": "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.",
|
||||||
"reason": "reason is why the action was taken. It is human-readable. This field can have at most 128 characters.",
|
"reason": "reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.",
|
||||||
"regarding": "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.",
|
"regarding": "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.",
|
||||||
"related": "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.",
|
"related": "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.",
|
||||||
"note": "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.",
|
"note": "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.",
|
||||||
"type": "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable.",
|
"type": "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.",
|
||||||
"deprecatedSource": "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.",
|
"deprecatedSource": "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.",
|
||||||
"deprecatedFirstTimestamp": "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.",
|
"deprecatedFirstTimestamp": "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.",
|
||||||
"deprecatedLastTimestamp": "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.",
|
"deprecatedLastTimestamp": "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.",
|
||||||
|
@ -31,7 +31,6 @@ option go_package = "v1beta1";
|
|||||||
|
|
||||||
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
||||||
message Event {
|
message Event {
|
||||||
// +optional
|
|
||||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||||
|
|
||||||
// eventTime is the time when this Event was first observed. It is required.
|
// eventTime is the time when this Event was first observed. It is required.
|
||||||
|
@ -29,8 +29,8 @@ import (
|
|||||||
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
||||||
type Event struct {
|
type Event struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
// +optional
|
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// eventTime is the time when this Event was first observed. It is required.
|
// eventTime is the time when this Event was first observed. It is required.
|
||||||
EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"`
|
EventTime metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"`
|
||||||
|
Loading…
Reference in New Issue
Block a user