status

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 New

func New(client client.Client, component string) *StatusManager

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL