Documentation ¶
Index ¶
- Variables
- func Add(ctx context.Context, cfg *appconfig.CompletedConfig, mgr manager.Manager) error
- func GenGetPodsAssignedToNode(c client.Client) func(string) ([]*v1.Pod, error)
- func Register()
- type ReconcileNodeLifeCycle
- func (nc *ReconcileNodeLifeCycle) ComputeZoneState(nodeReadyConditions []*v1.NodeCondition) (int, ZoneState)
- func (nc *ReconcileNodeLifeCycle) HealthyQPSFunc(_ int) float32
- func (nc *ReconcileNodeLifeCycle) ReducedQPSFunc(nodeNum int) float32
- func (nc *ReconcileNodeLifeCycle) Run(ctx context.Context, waitForControllerStarted func(ctx context.Context) bool)
- type ZoneState
Constants ¶
This section is empty.
Variables ¶
var ( // UnreachableTaintTemplate is the taint for when a node becomes unreachable. UnreachableTaintTemplate = &v1.Taint{ Key: v1.TaintNodeUnreachable, Effect: v1.TaintEffectNoExecute, } // NotReadyTaintTemplate is the taint for when a node is not ready for // executing pods NotReadyTaintTemplate = &v1.Taint{ Key: v1.TaintNodeNotReady, Effect: v1.TaintEffectNoExecute, } )
Functions ¶
func Add ¶
Add creates a new CsrApprover Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
Types ¶
type ReconcileNodeLifeCycle ¶
type ReconcileNodeLifeCycle struct {
// contains filtered or unexported fields
}
ReconcileNodeLifeCycle is the controller that manages node's life cycle.
func (*ReconcileNodeLifeCycle) ComputeZoneState ¶
func (nc *ReconcileNodeLifeCycle) ComputeZoneState(nodeReadyConditions []*v1.NodeCondition) (int, ZoneState)
ComputeZoneState returns a slice of NodeReadyConditions for all Nodes in a given zone. The zone is considered: - fullyDisrupted if there're no Ready Nodes, - partiallyDisrupted if at least than nc.unhealthyZoneThreshold percent of Nodes are not Ready, - normal otherwise
func (*ReconcileNodeLifeCycle) HealthyQPSFunc ¶
func (nc *ReconcileNodeLifeCycle) HealthyQPSFunc(_ int) float32
HealthyQPSFunc returns the default value for cluster eviction rate - we take nodeNum for consistency with ReducedQPSFunc.
func (*ReconcileNodeLifeCycle) ReducedQPSFunc ¶
func (nc *ReconcileNodeLifeCycle) ReducedQPSFunc(nodeNum int) float32
ReducedQPSFunc returns the QPS for when a the cluster is large make evictions slower, if they're small stop evictions altogether.