status

package
v1.18.9 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockStatus added in v1.4.0

type MockStatus struct {
	mock.Mock
}

TODO use mockery to generate mock

func (*MockStatus) AddCertificateSigningRequests added in v1.14.0

func (m *MockStatus) AddCertificateSigningRequests(name string, labels map[string]string)

func (*MockStatus) AddCronJobs added in v1.4.0

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

func (*MockStatus) AddDaemonsets added in v1.4.0

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

func (*MockStatus) AddDeployments added in v1.4.0

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

func (*MockStatus) AddStatefulSets added in v1.4.0

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

func (*MockStatus) ClearDegraded added in v1.4.0

func (m *MockStatus) ClearDegraded()

func (*MockStatus) IsAvailable added in v1.4.0

func (m *MockStatus) IsAvailable() bool

func (*MockStatus) IsDegraded added in v1.4.0

func (m *MockStatus) IsDegraded() bool

func (*MockStatus) IsProgressing added in v1.4.0

func (m *MockStatus) IsProgressing() bool

func (*MockStatus) OnCRFound added in v1.4.0

func (m *MockStatus) OnCRFound()

func (*MockStatus) OnCRNotFound added in v1.4.0

func (m *MockStatus) OnCRNotFound()

func (*MockStatus) ReadyToMonitor added in v1.18.0

func (m *MockStatus) ReadyToMonitor()

func (*MockStatus) RemoveCertificateSigningRequests added in v1.14.0

func (m *MockStatus) RemoveCertificateSigningRequests(label string)

func (*MockStatus) RemoveCronJobs added in v1.4.0

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

func (*MockStatus) RemoveDaemonsets added in v1.4.0

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

func (*MockStatus) RemoveDeployments added in v1.4.0

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

func (*MockStatus) RemoveStatefulSets added in v1.4.0

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

func (*MockStatus) Run added in v1.4.0

func (m *MockStatus) Run()

func (*MockStatus) SetDegraded added in v1.4.0

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

type StatusManager

type StatusManager interface {
	Run()
	OnCRFound()
	OnCRNotFound()
	AddDaemonsets(dss []types.NamespacedName)
	AddDeployments(deps []types.NamespacedName)
	AddStatefulSets(sss []types.NamespacedName)
	AddCronJobs(cjs []types.NamespacedName)
	AddCertificateSigningRequests(name string, labels map[string]string)
	RemoveDaemonsets(dss ...types.NamespacedName)
	RemoveDeployments(dps ...types.NamespacedName)
	RemoveStatefulSets(sss ...types.NamespacedName)
	RemoveCronJobs(cjs ...types.NamespacedName)
	RemoveCertificateSigningRequests(name string)
	SetDegraded(reason, msg string)
	ClearDegraded()
	IsAvailable() bool
	IsProgressing() bool
	IsDegraded() bool
	ReadyToMonitor()
}

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, kubernetesVersion *common.VersionInfo) StatusManager

Jump to

Keyboard shortcuts

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