Documentation ¶
Index ¶
- type StatusManager
- func (m *StatusManager) ClearDegraded()
- func (m *StatusManager) IsAvailable() bool
- func (m *StatusManager) IsDegraded() bool
- func (m *StatusManager) IsProgressing() bool
- func (m *StatusManager) OnCRFound()
- func (m *StatusManager) OnCRNotFound()
- func (m *StatusManager) Run()
- func (m *StatusManager) SetCronJobs(cj []types.NamespacedName)
- func (m *StatusManager) SetDaemonsets(ds []types.NamespacedName)
- func (m *StatusManager) SetDegraded(reason, msg string)
- func (m *StatusManager) SetDeployments(deps []types.NamespacedName)
- func (m *StatusManager) SetStatefulSets(ss []types.NamespacedName)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatusManager ¶
type StatusManager struct {
// contains filtered or unexported fields
}
StatusManager manages the status for a single controller and component, and reports the status via a TigeraStatus API object. The status manager uses the following conditions/states to represent the component's current status:
- Available: The component is successfully running. All pods launched by the component are healthy. An upgrade may or may not be occuring.
- Progressing: A state change is occuring. It may be that the component is being installed for the first time, or being upgraded to a new configuration or version.
- Degraded: The component is not running the desired state and is not progressing towards it. Either the component has not been installed, has been updated with invalid configuration, or has crashed.
Each of these states can be set independently of each other. For example, a component can be both available and degraded if it is running successfully but a configuration change has resulted in a configuration that cannot be actioned.
func (*StatusManager) ClearDegraded ¶
func (m *StatusManager) ClearDegraded()
ClearDegraded clears degraded state.
func (*StatusManager) IsAvailable ¶
func (m *StatusManager) IsAvailable() bool
IsAvailable returns true if the component is available and false otherwise.
func (*StatusManager) IsDegraded ¶ added in v1.0.0
func (m *StatusManager) IsDegraded() bool
IsDegraded returns true if the component is degraded and false otherwise.
func (*StatusManager) IsProgressing ¶ added in v1.0.0
func (m *StatusManager) IsProgressing() bool
IsProgressing returns true if the component is progressing and false otherwise.
func (*StatusManager) OnCRFound ¶ added in v1.0.0
func (m *StatusManager) OnCRFound()
OnCRFound indicates to the status manager that it should start reporting status. Until called, the status manager will be be in a "dormant" state, and will not write status to the API. Call this function from a controller once it has first received an instance of its CRD.
func (*StatusManager) OnCRNotFound ¶ added in v1.0.0
func (m *StatusManager) OnCRNotFound()
OnCRNotFound indicates that the CR managed by the parent controller has not been found. The status manager will clear its state.
func (*StatusManager) Run ¶
func (m *StatusManager) Run()
Run starts the status manager state monitoring routine.
func (*StatusManager) SetCronJobs ¶ added in v1.0.0
func (m *StatusManager) SetCronJobs(cj []types.NamespacedName)
SetCronJobs tells the status manager to monitor the health of the given cronjobs.
func (*StatusManager) SetDaemonsets ¶
func (m *StatusManager) SetDaemonsets(ds []types.NamespacedName)
SetDaemonsets tells the status manager to monitor the health of the given daemonsets.
func (*StatusManager) SetDegraded ¶
func (m *StatusManager) SetDegraded(reason, msg string)
SetDegraded sets degraded state with the provided reason and message.
func (*StatusManager) SetDeployments ¶
func (m *StatusManager) SetDeployments(deps []types.NamespacedName)
SetDeployments tells the status manager to monitor the health of the given deployments.
func (*StatusManager) SetStatefulSets ¶ added in v1.0.0
func (m *StatusManager) SetStatefulSets(ss []types.NamespacedName)
SetStatefulSets tells the status manager to monitor the health of the given statefulsets.