mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-23 22:26:27 +00:00
Generate event for condition change and support unknown status.
This commit is contained in:
+13
-1
@@ -38,13 +38,25 @@ const (
|
||||
Warn Severity = "warn"
|
||||
)
|
||||
|
||||
// ConditionStatus is the status of the condition.
|
||||
type ConditionStatus string
|
||||
|
||||
const (
|
||||
// True means the condition status is true.
|
||||
True ConditionStatus = "True"
|
||||
// False means the condition status is false.
|
||||
False ConditionStatus = "False"
|
||||
// Unknown means the condition status is unknown.
|
||||
Unknown ConditionStatus = "Unknown"
|
||||
)
|
||||
|
||||
// Condition is the node condition used internally by problem detector.
|
||||
type Condition struct {
|
||||
// Type is the condition type. It should describe the condition of node in problem. For example
|
||||
// KernelDeadlock, OutOfResource etc.
|
||||
Type string `json:"type"`
|
||||
// Status indicates whether the node is in the condition or not.
|
||||
Status bool `json:"status"`
|
||||
Status ConditionStatus `json:"status"`
|
||||
// Transition is the time when the node transits to this condition.
|
||||
Transition time.Time `json:"transition"`
|
||||
// Reason is a short reason of why node goes into this condition.
|
||||
|
||||
Reference in New Issue
Block a user