-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add APIs for machine phases #531
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,6 +151,36 @@ type MachineStatus struct { | |
// Refer: https://kubernetes.io/docs/concepts/architecture/nodes/#condition | ||
// +optional | ||
Conditions []corev1.NodeCondition `json:"conditions,omitempty"` | ||
|
||
// LastOperation describes the last-operation performed by the machine-controller. | ||
// This API should be useful as a history in terms of the latest operation performed on the | ||
// specific machine. It should also convey the state of the latest-operation for example if // it is still on-going, failed or completed successfully. | ||
hardikdr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// +optional | ||
LastOperation LastOperation `json:"lastOperation,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please make this a pointer as its an optional struct There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes sure, done. |
||
|
||
// Phase represents an ongoing-phase a machine is going through. It is expected to be | ||
hardikdr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// transient. Higher-level controllers should rely on MachinePhases to take the right | ||
hardikdr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// decision such as replacing the Failed machines. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I disagree. Higher-Level controllers should rely on
hardikdr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// Eg. Pending, Running, Terminating, Failed etc. | ||
// +optional | ||
Phase *string `json:"phase,omitempty"` | ||
} | ||
|
||
// LastOperation represents the detail of the last performed operation on the MachineObject. | ||
type LastOperation struct { | ||
// Description is the human-readable description of the last operation. | ||
Description string `json:"description,omitempty"` | ||
|
||
// LastUpdateTime is the timestamp at which LastOperation API was last-updated. | ||
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` | ||
|
||
// State is the current status of the last performed operation. | ||
// Eg.Processing, Failed, Successful etc | ||
State *string `json:"state,omitempty"` | ||
|
||
// Type is the type of operation which was last performed. | ||
// Eg. Create, Delete, Update etc | ||
Type *string `json:"type,omitempty"` | ||
} | ||
|
||
/// [MachineStatus] | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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: Can we change the name
lastUpdateTime
tolastUpdated
just to be consistent with the similar fields in other places and objects.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.
done, thanks.