-
Notifications
You must be signed in to change notification settings - Fork 39.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add a Heartbeat object to the API #14735
Conversation
e8a3b37
to
1bb7688
Compare
@@ -1368,6 +1368,13 @@ type NodeSpec struct { | |||
Unschedulable bool `json:"unschedulable,omitempty"` | |||
} | |||
|
|||
type Heartbeat struct { | |||
// Time when this heartbeat was generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that you also need ObjectMeta - similarly to what we have in binding:
https://github.com/gmarek/kubernetes/blob/heartbeat_api/pkg/api/types.go#L1568
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I need. There's a lot of various stuff, that's completely unimportant for a hearbeat (name, uuid, etc.). Binding is a different case, as it represents a binary relation, and we store one dimension as ObjectMeta, and second as ObjectReference. Here we need only one reference - I don't really care if it's ObjectMeta, or ObjectReference, but ObjectReference is smaller, and have everything we need (or at least everything I believe we need).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think it's unnecessary, as I don't think that heartbeat would be something that "represent a persistent entity" or anything that defines "object entity". I might have missed something, as it's a long read.
Labelling this PR as size/S |
Unit, integration and GCE e2e test build/test passed for commit 1bb7688. |
@@ -1368,6 +1368,13 @@ type NodeSpec struct { | |||
Unschedulable bool `json:"unschedulable,omitempty"` | |||
} | |||
|
|||
type Heartbeat struct { | |||
// Time when this heartbeat was generated. | |||
Timestamp unversioned.Time `json:"timestamp,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for 'no *stamp' rule? Seems pretty arbitrary to me.
Let's discuss on the issue. |
@kubernetes/rh-cluster-infra |
GCE e2e build/test failed for commit 1bb7688. |
@@ -1353,14 +1353,14 @@ type EndpointsList struct { | |||
|
|||
// NodeSpec describes the attributes that a node is created with. | |||
type NodeSpec struct { | |||
// PodCIDR represents the pod IP range assigned to the node | |||
// PodCIDR represents the pod IP range assigned to the node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: peel these off into another PR? They're orthogonal to the point of this PR and easy to review.
GCE e2e test build/test passed for commit 1bb7688. |
GCE e2e test build/test passed for commit 1bb7688. |
GCE e2e test build/test passed for commit 1bb7688. |
@k8s-bot test this issue: #IGNORE Tests have been pending for 24 hours |
GCE e2e test build/test passed for commit 1bb7688. |
Closing. Can reopen when we decide what we want/need to do. |
Ref. #14733
@bgrant0607 PTAL. I purposefully didn't add this anywhere else, as those will be mechanical changes.
cc @wojtek-t