Documentation ¶
Overview ¶
Package controller contains code for syncing cloud instances with minion registry
Index ¶
- Variables
- type NodeController
- func (s *NodeController) DoCheck(node *api.Node) []api.NodeCondition
- func (s *NodeController) EvictTimeoutedPods() error
- func (s *NodeController) GetCloudNodesWithSpec() (*api.NodeList, error)
- func (s *NodeController) GetStaticNodesWithSpec() (*api.NodeList, error)
- func (s *NodeController) PopulateAddresses(nodes *api.NodeList) (*api.NodeList, error)
- func (s *NodeController) RegisterNodes(nodes *api.NodeList, retryCount int, retryInterval time.Duration) error
- func (s *NodeController) Run(period time.Duration, syncNodeList, syncNodeStatus bool)
- func (s *NodeController) SyncCloud() error
- func (s *NodeController) SyncNodeStatus() error
- func (s *NodeController) UpdateNodesStatus(nodes *api.NodeList) *api.NodeList
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type NodeController ¶ added in v0.9.0
type NodeController struct {
// contains filtered or unexported fields
}
func NewNodeController ¶ added in v0.9.0
func NewNodeController( cloud cloudprovider.Interface, matchRE string, nodes []string, staticResources *api.NodeResources, kubeClient client.Interface, kubeletClient client.KubeletClient, registerRetryCount int, podEvictionTimeout time.Duration) *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) DoCheck ¶ added in v0.10.0
func (s *NodeController) DoCheck(node *api.Node) []api.NodeCondition
DoCheck performs health checking for given node.
func (*NodeController) EvictTimeoutedPods ¶ added in v0.12.0
func (s *NodeController) EvictTimeoutedPods() error
EvictTimeoutedPods verifies if nodes are reachable by checking the time of last probe and deletes pods from not reachable nodes.
func (*NodeController) GetCloudNodesWithSpec ¶ added in v0.13.0
func (s *NodeController) GetCloudNodesWithSpec() (*api.NodeList, error)
GetCloudNodesWithSpec constructs and returns api.NodeList from cloudprovider. If error occurs, an empty NodeList will be returned with a non-nil error info. The method only constructs spec fields for nodes.
func (*NodeController) GetStaticNodesWithSpec ¶ added in v0.13.0
func (s *NodeController) GetStaticNodesWithSpec() (*api.NodeList, error)
GetStaticNodesWithSpec constructs and returns api.NodeList for static nodes. If error occurs, an empty NodeList will be returned with a non-nil error info. The method only constructs spec fields for nodes.
func (*NodeController) PopulateAddresses ¶ added in v0.13.0
PopulateAddresses queries Address for given list of nodes.
func (*NodeController) RegisterNodes ¶ added in v0.10.0
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 ¶ added in v0.9.0
func (s *NodeController) Run(period time.Duration, syncNodeList, syncNodeStatus bool)
Run creates initial node list and start syncing instances from cloudprovider if any. It also starts syncing cluster node status.
- 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.
- SyncCloud() is called periodically (if enabled) to sync instances from cloudprovider. Node created here will only have specs.
- SyncNodeStatus() is called periodically (if enabled) to sync node status for nodes in k8s cluster.
func (*NodeController) SyncCloud ¶ added in v0.9.0
func (s *NodeController) SyncCloud() error
SyncCloud synchronizes the list of instances from cloudprovider to master server.
func (*NodeController) SyncNodeStatus ¶ added in v0.10.0
func (s *NodeController) SyncNodeStatus() error
SyncNodeStatus synchronizes cluster nodes status to master server.
func (*NodeController) UpdateNodesStatus ¶ added in v0.13.0
func (s *NodeController) UpdateNodesStatus(nodes *api.NodeList) *api.NodeList
UpdateNodesStatus performs health checking for given list of nodes.