Documentation ¶
Index ¶
- type StatusLevel
- type StatusManager
- func (status *StatusManager) GetAttributes() ([]types.NamespacedName, []types.NamespacedName, []cnao.Container, int64)
- func (status *StatusManager) IsStatusAvailable() bool
- func (status *StatusManager) MarkStatusLevelNotFailing(level StatusLevel)
- func (status *StatusManager) Set(reachedAvailableLevel bool, conditions ...conditionsv1.Condition)
- func (status *StatusManager) SetAttributes(daemonSets []types.NamespacedName, deployments []types.NamespacedName, ...)
- func (status *StatusManager) SetFailing(level StatusLevel, reason, message string)
- func (status *StatusManager) SetFromOperator()
- func (status *StatusManager) SetFromPods()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatusLevel ¶
type StatusLevel int
StatusLevel is used to sort priority of reported failure conditions. When operator is failing on two levels (e.g. handling configuration and deploying pods), only the higher level will be reported. This is needed, so failing pods from previous run won't silence failing render of the current run.
const ( OperatorConfig StatusLevel = iota PodDeployment StatusLevel = iota )
type StatusManager ¶
type StatusManager struct {
// contains filtered or unexported fields
}
StatusManager coordinates changes to NetworkAddonsConfig.Status
func (*StatusManager) GetAttributes ¶ added in v0.41.0
func (status *StatusManager) GetAttributes() ([]types.NamespacedName, []types.NamespacedName, []cnao.Container, int64)
func (*StatusManager) IsStatusAvailable ¶ added in v0.58.4
func (status *StatusManager) IsStatusAvailable() bool
IsStatusAvailable returns true if NetworkAddonsConfig intance is in Available True state
func (*StatusManager) MarkStatusLevelNotFailing ¶ added in v0.58.4
func (status *StatusManager) MarkStatusLevelNotFailing(level StatusLevel)
MarkStatusLevelNotFailing marks the operator as not Failing at the given level.
func (*StatusManager) Set ¶
func (status *StatusManager) Set(reachedAvailableLevel bool, conditions ...conditionsv1.Condition)
Set updates the NetworkAddonsConfig.Status with the provided conditions. Since Update call can fail due to a collision with someone else writing into the status, calling set is tried several times. current collision problem is detected by functional tests
func (*StatusManager) SetAttributes ¶ added in v0.41.0
func (status *StatusManager) SetAttributes(daemonSets []types.NamespacedName, deployments []types.NamespacedName, containers []cnao.Container, generation int64)
func (*StatusManager) SetFailing ¶
func (status *StatusManager) SetFailing(level StatusLevel, reason, message string)
SetFailing marks the operator as Failing with the given reason and message. If it is not already failing for a lower-level reason, the operator's status will be updated.
func (*StatusManager) SetFromOperator ¶ added in v0.58.4
func (status *StatusManager) SetFromOperator()
SetFromOperator sets the operator status
func (*StatusManager) SetFromPods ¶
func (status *StatusManager) SetFromPods()
SetFromPods sets the operator status to Failing, Progressing, or Available, based on the current status of the manager's DaemonSets and Deployments. However, this is a no-op if the StatusManager is currently marked as failing due to a configuration error.