statusmanager

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// if a rollout has not made any progress by this time,
	// mark ourselves as Degraded
	ProgressTimeout = 10 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeRESTMapper

type FakeRESTMapper struct {
	// contains filtered or unexported fields
}

func (*FakeRESTMapper) KindFor

func (*FakeRESTMapper) KindsFor

func (*FakeRESTMapper) RESTMapping

func (f *FakeRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)

func (*FakeRESTMapper) RESTMappings

func (f *FakeRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error)

func (*FakeRESTMapper) ResourceFor

func (*FakeRESTMapper) ResourceSingularizer

func (f *FakeRESTMapper) ResourceSingularizer(resource string) (singular string, err error)

func (*FakeRESTMapper) ResourcesFor

type NodeStatus

type NodeStatus struct {
	Address string
	Success bool
	Reason  string
}

type StatusLevel

type StatusLevel int
const (
	ClusterConfig StatusLevel = iota
	OperatorConfig
	PodDeployment
	RolloutHung
	ClusterNode
)

type StatusManager

type StatusManager struct {
	sync.Mutex

	OperatorNamespace string
	// contains filtered or unexported fields
}

StatusManager coordinates changes to ClusterOperator.Status

func New

func New(client client.Client, mapper meta.RESTMapper, name, version string, operatorNamespace string) *StatusManager

func (*StatusManager) SetDaemonSets

func (status *StatusManager) SetDaemonSets(daemonSets []types.NamespacedName)

func (*StatusManager) SetDegraded

func (status *StatusManager) SetDegraded(statusLevel StatusLevel, reason, message string)

func (*StatusManager) SetDeployments

func (status *StatusManager) SetDeployments(deployments []types.NamespacedName)

func (*StatusManager) SetFromNodes

func (status *StatusManager) SetFromNodes(cachedNodeSet map[string]*NodeStatus)

func (*StatusManager) SetFromPods

func (status *StatusManager) SetFromPods()

SetFromPods sets the operator Degraded/Progressing/Available status, based on the current status of the manager's DaemonSets and Deployments.

func (*StatusManager) SetNotDegraded

func (status *StatusManager) SetNotDegraded(statusLevel StatusLevel)

Jump to

Keyboard shortcuts

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