Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsWorse ¶
func IsWorse(current, new HealthStatusCode) bool
IsWorse returns whether or not the new health status code is a worse condition than the current
Types ¶
type HealthOverride ¶
type HealthOverride interface {
GetResourceHealth(obj *unstructured.Unstructured) (*HealthStatus, error)
}
Implements custom health assessment that overrides built-in assessment
type HealthStatus ¶
type HealthStatus struct { Status HealthStatusCode `json:"status,omitempty"` Message string `json:"message,omitempty"` }
Holds health assessment results
type HealthStatusCode ¶
type HealthStatusCode string
Represents resource health status
const ( // Indicates that health assessment failed and actual health status is unknown HealthStatusUnknown HealthStatusCode = "Unknown" // Progressing health status means that resource is not healthy but still have a chance to reach healthy state HealthStatusProgressing HealthStatusCode = "Progressing" // Resource is 100% healthy HealthStatusHealthy HealthStatusCode = "Healthy" // Assigned to resources that are suspended or paused. The typical example is a // [suspended](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#suspend) CronJob. HealthStatusSuspended HealthStatusCode = "Suspended" // Degrade status is used if resource status indicates failure or resource could not reach healthy state // within some timeout. HealthStatusDegraded HealthStatusCode = "Degraded" // Indicates that resource is missing in the cluster. HealthStatusMissing HealthStatusCode = "Missing" )
Click to show internal directories.
Click to hide internal directories.