status

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 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) AddCronJobs added in v1.2.0

func (m *StatusManager) AddCronJobs(cjs []types.NamespacedName)

AddCronJobs tells the status manager to monitor the health of the given cronjobs.

func (*StatusManager) AddDaemonsets added in v1.2.0

func (m *StatusManager) AddDaemonsets(dss []types.NamespacedName)

AddDaemonsets tells the status manager to monitor the health of the given daemonsets.

func (*StatusManager) AddDeployments added in v1.2.0

func (m *StatusManager) AddDeployments(deps []types.NamespacedName)

AddDeployments tells the status manager to monitor the health of the given deployments.

func (*StatusManager) AddStatefulSets added in v1.2.0

func (m *StatusManager) AddStatefulSets(sss []types.NamespacedName)

AddStatefulSets tells the status manager to monitor the health of the given statefulsets.

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) RemoveCronJobs added in v1.2.0

func (m *StatusManager) RemoveCronJobs(cjs ...types.NamespacedName)

RemoveCronJobs tells the status manager to stop monitoring the health of the given cronjobs.

func (*StatusManager) RemoveDaemonsets added in v1.2.0

func (m *StatusManager) RemoveDaemonsets(dss ...types.NamespacedName)

RemoveDaemonsets tells the status manager to stop monitoring the health of the given daemonsets

func (*StatusManager) RemoveDeployments added in v1.2.0

func (m *StatusManager) RemoveDeployments(dps ...types.NamespacedName)

RemoveDeployments tells the status manager to stop monitoring the health of the given deployments.

func (*StatusManager) RemoveStatefulSets added in v1.2.0

func (m *StatusManager) RemoveStatefulSets(sss ...types.NamespacedName)

RemoveStatefulSets tells the status manager to stop monitoring the health of the given statefulsets.

func (*StatusManager) Run

func (m *StatusManager) Run()

Run starts the status manager state monitoring routine.

func (*StatusManager) SetDegraded

func (m *StatusManager) SetDegraded(reason, msg string)

SetDegraded sets degraded state with the provided reason and message.

Jump to

Keyboard shortcuts

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