package nodelifecycle
import "k8s.io/kubernetes/pkg/controller/nodelifecycle"
Index ¶
- Variables
- func Register()
- type Controller
- func NewNodeLifecycleController( ctx context.Context, leaseInformer coordinformers.LeaseInformer, podInformer coreinformers.PodInformer, nodeInformer coreinformers.NodeInformer, daemonSetInformer appsv1informers.DaemonSetInformer, kubeClient clientset.Interface, nodeMonitorPeriod time.Duration, nodeStartupGracePeriod time.Duration, nodeMonitorGracePeriod time.Duration, evictionLimiterQPS float32, secondaryEvictionLimiterQPS float32, largeClusterThreshold int32, unhealthyZoneThreshold float32, ) (*Controller, error)
- func (nc *Controller) ComputeZoneState(nodeReadyConditions []*v1.NodeCondition) (int, ZoneState)
- func (nc *Controller) HealthyQPSFunc(nodeNum int) float32
- func (nc *Controller) ReducedQPSFunc(nodeNum int) float32
- func (nc *Controller) Run(ctx context.Context)
- type ZoneState
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 Register ¶
func Register()
Register the metrics that are to be monitored.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the controller that manages node's life cycle.
func NewNodeLifecycleController ¶
func NewNodeLifecycleController( ctx context.Context, leaseInformer coordinformers.LeaseInformer, podInformer coreinformers.PodInformer, nodeInformer coreinformers.NodeInformer, daemonSetInformer appsv1informers.DaemonSetInformer, kubeClient clientset.Interface, nodeMonitorPeriod time.Duration, nodeStartupGracePeriod time.Duration, nodeMonitorGracePeriod time.Duration, evictionLimiterQPS float32, secondaryEvictionLimiterQPS float32, largeClusterThreshold int32, unhealthyZoneThreshold float32, ) (*Controller, error)
NewNodeLifecycleController returns a new taint controller.
func (*Controller) ComputeZoneState ¶
func (nc *Controller) 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 (*Controller) HealthyQPSFunc ¶
func (nc *Controller) HealthyQPSFunc(nodeNum int) float32
HealthyQPSFunc returns the default value for cluster eviction rate - we take nodeNum for consistency with ReducedQPSFunc.
func (*Controller) ReducedQPSFunc ¶
func (nc *Controller) ReducedQPSFunc(nodeNum int) float32
ReducedQPSFunc returns the QPS for when the cluster is large make evictions slower, if they're small stop evictions altogether.
func (*Controller) Run ¶
func (nc *Controller) Run(ctx context.Context)
Run starts an asynchronous loop that monitors the status of cluster nodes.
type ZoneState ¶
type ZoneState string
ZoneState is the state of a given zone.
Source Files ¶
metrics.go node_lifecycle_controller.go
Directories ¶
Path | Synopsis |
---|---|
pkg/controller/nodelifecycle/config | |
pkg/controller/nodelifecycle/config/v1alpha1 | |
pkg/controller/nodelifecycle/scheduler |
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 37 packages
- Last checked
- 3 hours ago –
Tools for package owners.