Documentation ¶
Index ¶
- Constants
- type ClusteredName
- type DaemonSetLister
- type DeploymentLister
- type PodWatcher
- type StatefulSetLister
- type StatusLevel
- type StatusManager
- func (s *StatusManager) AddPodWatcher(mgr manager.Manager) error
- func (status *StatusManager) CheckCrashLoopBackOffPods(name ClusteredName, selector map[string]string, kind string) []string
- func (status *StatusManager) SetDegraded(statusLevel StatusLevel, reason, message string)
- func (status *StatusManager) SetDegradedOnPanicAndCrash(panicVal interface{})
- func (status *StatusManager) SetFromPods()
- func (status *StatusManager) SetNotDegraded(statusLevel StatusLevel)
- func (status *StatusManager) SetProgressing(statusLevel StatusLevel, reason, message string)
- func (status *StatusManager) SetRelatedClusterObjects(relatedObjects []hypershift.RelatedObject)
- func (status *StatusManager) SetRelatedObjects(relatedObjects []configv1.ObjectReference)
- func (status *StatusManager) UnsetProgressing(statusLevel StatusLevel)
Constants ¶
const (
ClusteredNameSeparator = '/'
)
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 ClusteredName ¶
func NewClusteredName ¶
func NewClusteredName(obj crclient.Object) ClusteredName
func (ClusteredName) String ¶
func (c ClusteredName) String() string
type DaemonSetLister ¶
type DeploymentLister ¶
type DeploymentLister interface {
List(selector labels.Selector) (ret []*appsv1.Deployment, err error)
}
type PodWatcher ¶
type PodWatcher struct {
// contains filtered or unexported fields
}
PodWatcher is a controller adjacent to the StatusManager that triggers a re-reconcile whenever an "interesting" daemonset, deployment, or statefulset is created / updated. Specifically, it watches for objects with the label "networkoperator.openshift.io/generates-operator-status" set.
type StatefulSetLister ¶
type StatefulSetLister interface {
List(selector labels.Selector) (ret []*appsv1.StatefulSet, err error)
}
type StatusLevel ¶
type StatusLevel int
const ( PanicLevel StatusLevel = iota // Special StatusLevel used when recovering from a panic ClusterConfig OperatorConfig OperatorRender ProxyConfig InjectorConfig PodDeployment PKIConfig EgressRouterConfig RolloutHung CertificateSigner InfrastructureConfig DashboardConfig )
type StatusManager ¶
StatusManager coordinates changes to ClusterOperator.Status
func (*StatusManager) AddPodWatcher ¶
func (s *StatusManager) AddPodWatcher(mgr manager.Manager) error
AddPodWatcher wires up the PodWatcher to the controller-manager.
func (*StatusManager) CheckCrashLoopBackOffPods ¶
func (status *StatusManager) CheckCrashLoopBackOffPods(name ClusteredName, selector map[string]string, kind string) []string
CheckCrashLoopBackOffPods checks for pods (matching the label selector) with any containers in the CrashLoopBackoff state. It returns a human-readable string for any pod in such a state. name should be the name of a DaemonSet or Deployment or StatefulSet.
func (*StatusManager) SetDegraded ¶
func (status *StatusManager) SetDegraded(statusLevel StatusLevel, reason, message string)
func (*StatusManager) SetDegradedOnPanicAndCrash ¶
func (status *StatusManager) SetDegradedOnPanicAndCrash(panicVal interface{})
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, Deployments and StatefulSets.
func (*StatusManager) SetNotDegraded ¶
func (status *StatusManager) SetNotDegraded(statusLevel StatusLevel)
func (*StatusManager) SetProgressing ¶
func (status *StatusManager) SetProgressing(statusLevel StatusLevel, reason, message string)
func (*StatusManager) SetRelatedClusterObjects ¶
func (status *StatusManager) SetRelatedClusterObjects(relatedObjects []hypershift.RelatedObject)
func (*StatusManager) SetRelatedObjects ¶
func (status *StatusManager) SetRelatedObjects(relatedObjects []configv1.ObjectReference)
func (*StatusManager) UnsetProgressing ¶
func (status *StatusManager) UnsetProgressing(statusLevel StatusLevel)