kubernetes: k8s.io/kubernetes/pkg/controller/nodelifecycle Index | Files | Directories

package nodelifecycle

import "k8s.io/kubernetes/pkg/controller/nodelifecycle"

Index

Package Files

metrics.go node_lifecycle_controller.go

Variables

var (
    // UnreachableTaintTemplate is the taint for when a node becomes unreachable.
    UnreachableTaintTemplate = &v1.Taint{
        Key:    schedulerapi.TaintNodeUnreachable,
        Effect: v1.TaintEffectNoExecute,
    }

    // NotReadyTaintTemplate is the taint for when a node is not ready for
    // executing pods
    NotReadyTaintTemplate = &v1.Taint{
        Key:    schedulerapi.TaintNodeNotReady,
        Effect: v1.TaintEffectNoExecute,
    }
)

func Register Uses

func Register()

Register the metrics that are to be monitored.

type Controller Uses

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

Controller is the controller that manages node's life cycle.

func NewNodeLifecycleController Uses

func NewNodeLifecycleController(
    leaseInformer coordinformers.LeaseInformer,
    podInformer coreinformers.PodInformer,
    nodeInformer coreinformers.NodeInformer,
    daemonSetInformer appsv1informers.DaemonSetInformer,
    kubeClient clientset.Interface,
    nodeMonitorPeriod time.Duration,
    nodeStartupGracePeriod time.Duration,
    nodeMonitorGracePeriod time.Duration,
    podEvictionTimeout time.Duration,
    evictionLimiterQPS float32,
    secondaryEvictionLimiterQPS float32,
    largeClusterThreshold int32,
    unhealthyZoneThreshold float32,
    runTaintManager bool,
    useTaintBasedEvictions bool,
    taintNodeByCondition bool) (*Controller, error)

NewNodeLifecycleController returns a new taint controller.

func (*Controller) ComputeZoneState Uses

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 Uses

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 Uses

func (nc *Controller) 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.

func (*Controller) Run Uses

func (nc *Controller) Run(stopCh <-chan struct{})

Run starts an asynchronous loop that monitors the status of cluster nodes.

type ZoneState Uses

type ZoneState string

ZoneState is the state of a given zone.

Directories

PathSynopsis
config
config/v1alpha1
scheduler

Package nodelifecycle imports 38 packages (graph) and is imported by 64 packages. Updated 2019-09-15. Refresh now. Tools for package owners.