Documentation
¶
Index ¶
- Constants
- type ConditionAccessor
- type Manager
- func (m *Manager) InitUnknownConditions(obj client.Object, subroutineNames []string)
- func (m *Manager) SetReadyCondition(obj client.Object, reason string)
- func (m *Manager) SetSkippedConditions(obj client.Object, names []string, ready bool, msg string)
- func (m *Manager) SetSubroutineCondition(obj client.Object, name string, result subroutines.Result, err error, ...)
Constants ¶
const ( ReadyCondition = "Ready" ReasonComplete = "Complete" ReasonPending = "Pending" ReasonStopped = "Stopped" ReasonSkipped = "Skipped" ReasonError = "Error" ReasonUnknown = "Unknown" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConditionAccessor ¶
type ConditionAccessor interface {
GetConditions() []metav1.Condition
SetConditions([]metav1.Condition)
}
ConditionAccessor is implemented by objects that expose status conditions.
type Manager ¶
type Manager struct{}
Manager manages per-subroutine and aggregate Ready conditions on objects that implement ConditionAccessor.
func (*Manager) InitUnknownConditions ¶
InitUnknownConditions sets per-subroutine and Ready conditions to Unknown if they are not already present.
func (*Manager) SetReadyCondition ¶
SetReadyCondition sets the aggregate Ready condition based on the given reason. The reason must be one of ReasonComplete, ReasonError, ReasonPending, or ReasonStopped.
func (*Manager) SetSkippedConditions ¶
SetSkippedConditions sets conditions for the given subroutine names to Skipped. When ready is true, condition status is True; when false, condition status is False.
func (*Manager) SetSubroutineCondition ¶
func (m *Manager) SetSubroutineCondition(obj client.Object, name string, result subroutines.Result, err error, isFinalize bool)
SetSubroutineCondition maps a subroutine result/error to a condition on the object. The action determines the condition name suffix (finalize/terminate actions append "Finalize").