Skip to content

Commit

Permalink
Merge pull request #94910 from yashvardhan-kukreja/issue-94602/fix-co…
Browse files Browse the repository at this point in the history
…mment-declaration-event

Cleaned up: the potentially misleading comment under Event struct

Kubernetes-commit: 6e9475bcd3e066c23ddfdc9d8f6358b75ce79a48
  • Loading branch information
k8s-publishing-bot committed Oct 5, 2020
2 parents 18112a7 + 751d93c commit 2c3c141
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 23 deletions.
11 changes: 3 additions & 8 deletions events/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 5 additions & 9 deletions events/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
type Event struct {
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 metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"`
Expand All @@ -39,22 +39,18 @@ type Event struct {

// reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
// This field cannot be empty for new Events.
// +optional
ReportingController string `json:"reportingController,omitempty" protobuf:"bytes,4,opt,name=reportingController"`

// 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.
// +optional
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.
// This field can have at most 128 characters.
// +optional
// This field cannot be empty for new Events and it can have at most 128 characters.
Action string `json:"action,omitempty" protobuf:"bytes,6,name=action"`

// reason is why the action was taken. It is human-readable.
// This field can have at most 128 characters.
// +optional
// This field cannot be empty for new Events and it can have at most 128 characters.
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
Expand All @@ -76,7 +72,7 @@ type Event struct {

// type is the type of this event (Normal, Warning), new types could be added in the future.
// It is machine-readable.
// +optional
// This field cannot be empty for new Events.
Type string `json:"type,omitempty" protobuf:"bytes,11,opt,name=type"`

// deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
Expand Down
6 changes: 3 additions & 3 deletions events/v1/types_swagger_doc_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
"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.",
"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.",
"reason": "reason is why the action was taken. It is human-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 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.",
"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.",
"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.",
"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.",
Expand Down
1 change: 0 additions & 1 deletion events/v1beta1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions events/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
type Event struct {
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 metav1.MicroTime `json:"eventTime" protobuf:"bytes,2,opt,name=eventTime"`
Expand Down

0 comments on commit 2c3c141

Please sign in to comment.