Documentation ¶
Index ¶
- Constants
- type FakeRESTMapper
- func (f *FakeRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
- func (f *FakeRESTMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
- func (f *FakeRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)
- func (f *FakeRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error)
- func (f *FakeRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
- func (f *FakeRESTMapper) ResourceSingularizer(resource string) (singular string, err error)
- func (f *FakeRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)
- type NodeStatus
- type StatusLevel
- type StatusManager
- func (status *StatusManager) SetDaemonSets(daemonSets []types.NamespacedName)
- func (status *StatusManager) SetDegraded(statusLevel StatusLevel, reason, message string)
- func (status *StatusManager) SetDeployments(deployments []types.NamespacedName)
- func (status *StatusManager) SetFromNodes(cachedNodeSet map[string]*NodeStatus)
- func (status *StatusManager) SetFromPods()
- func (status *StatusManager) SetNotDegraded(statusLevel StatusLevel)
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 (f *FakeRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
func (*FakeRESTMapper) KindsFor ¶
func (f *FakeRESTMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
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 (f *FakeRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
func (*FakeRESTMapper) ResourceSingularizer ¶
func (f *FakeRESTMapper) ResourceSingularizer(resource string) (singular string, err error)
func (*FakeRESTMapper) ResourcesFor ¶
func (f *FakeRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)
type NodeStatus ¶
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)
Click to show internal directories.
Click to hide internal directories.