kubernetesk8s.io/kubernetes/pkg/cloudprovider/controller Index | Files

package controller

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

Package controller contains code for syncing cloud instances with minion registry

Index

Variables

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

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,
	kubeletClient client.KubeletHealthChecker) *NodeController

NewNodeController returns a new node controller to sync instances from cloudprovider. TODO: NodeController health checker should be a separate package other than kubeletclient, node health check != kubelet health check.

func (*NodeController) CloudNodes

func (s *NodeController) CloudNodes() (*api.NodeList, error)

CloudNodes constructs and returns api.NodeList from cloudprovider. If error occurs, an empty NodeList will be returned with a non-nil error info.

func (*NodeController) DoCheck

func (s *NodeController) DoCheck(node *api.Node) []api.NodeCondition

DoCheck performs health checking for given node.

func (*NodeController) DoChecks

func (s *NodeController) DoChecks(nodes *api.NodeList) *api.NodeList

DoChecks performs health checking for given list of nodes.

func (*NodeController) PopulateIPs

func (s *NodeController) PopulateIPs(nodes *api.NodeList) (*api.NodeList, error)

PopulateIPs queries IPs for given list of nodes.

func (*NodeController) RegisterNodes

func (s *NodeController) RegisterNodes(nodes *api.NodeList, retryCount int, retryInterval time.Duration) error

RegisterNodes registers the given list of nodes, it keeps retrying for `retryCount` times.

func (*NodeController) Run

func (s *NodeController) Run(period time.Duration, retryCount int)

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

func (*NodeController) StaticNodes

func (s *NodeController) StaticNodes() (*api.NodeList, error)

StaticNodes constructs and returns api.NodeList for static nodes. If error occurs, an empty NodeList will be returned with a non-nil error info.

func (*NodeController) SyncCloud

func (s *NodeController) SyncCloud() error

SyncCloud synchronizes the list of instances from cloudprovider to master server.

func (*NodeController) SyncNodeStatus

func (s *NodeController) SyncNodeStatus() error

SyncNodeStatus synchronizes cluster nodes status to master server.

Source Files

doc.go nodecontroller.go

Version
v0.10.0
Published
Feb 3, 2015
Platform
js/wasm
Imports
11 packages
Last checked
17 seconds ago

Tools for package owners.