kubernetes: github.com/erimatnor/kubernetes/pkg/cloudprovider/nodecontroller Index | Files

package nodecontroller

import "github.com/erimatnor/kubernetes/pkg/cloudprovider/nodecontroller"

Package nodecontroller contains code for syncing cloud instances with minion registry


Package Files

doc.go nodecontroller.go


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.")

type NodeController Uses

type NodeController struct {
    // contains filtered or unexported fields

func NewNodeController Uses

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,
    clusterClassB string,
    allocateNodeCIDRs bool) *NodeController

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

func (*NodeController) Run Uses

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.

Package nodecontroller imports 17 packages (graph). Updated 2017-05-11. Refresh now. Tools for package owners.