nodecontroller

package
v0.15.1-0...-97e4549 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2015 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package nodecontroller contains code for syncing cloud instances with minion registry

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRegistration   = errors.New("unable to register all nodes.")
	ErrQueryIPAddress = errors.New("unable to query IP address.")
	ErrCloudInstance  = errors.New("cloud provider doesn't support instances.")
)

Functions

This section is empty.

Types

type NodeController

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

func NewNodeController

func NewNodeController(
	cloud cloudprovider.Interface,
	matchRE string,
	nodes []string,
	staticResources *api.NodeResources,
	kubeClient client.Interface,
	registerRetryCount int,
	podEvictionTimeout time.Duration,
	deletingPodsRateLimiter util.RateLimiter,
	nodeMonitorGracePeriod time.Duration,
	nodeStartupGracePeriod time.Duration,
	nodeMonitorPeriod time.Duration,
	clusterName string) *NodeController

NewNodeController returns a new node controller to sync instances from cloudprovider.

func (*NodeController) Run

func (nc *NodeController) Run(period time.Duration, syncNodeList bool)

Run creates initial node list and start syncing instances from cloudprovider, if any. It also starts syncing or monitoring cluster node status.

  1. registerNodes() is called only once to register all initial nodes (from cloudprovider or from command line flag). To make cluster bootstrap faster, node controller populates node addresses.
  2. syncCloudNodes() is called periodically (if enabled) to sync instances from cloudprovider. Node created here will only have specs.
  3. monitorNodeStatus() is called periodically to incorporate the results of node status pushed from kubelet to master.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL