Documentation ¶
Index ¶
- func BuildNodeInfoForNode(node *kube_api.Node, client *kube_client.Client) (*schedulercache.NodeInfo, error)
- func FindNodeToRemove(nodes []*kube_api.Node, pods []*kube_api.Pod, client *kube_client.Client) (*kube_api.Node, error)
- func GetRequiredPodsForNode(nodename string, client *kube_client.Client) ([]*kube_api.Pod, error)
- type PredicateChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildNodeInfoForNode ¶
func BuildNodeInfoForNode(node *kube_api.Node, client *kube_client.Client) (*schedulercache.NodeInfo, error)
BuildNodeInfoForNode build a NodeInfo structure for the given node as if the node was just created.
func FindNodeToRemove ¶
func FindNodeToRemove(nodes []*kube_api.Node, pods []*kube_api.Pod, client *kube_client.Client) (*kube_api.Node, error)
FindNodeToRemove finds a node that can be removed.
func GetRequiredPodsForNode ¶
GetRequiredPodsForNode returns a list od pods that would appear on the node if the node was just created (like deamonset and manifest-run pods). It reuses kubectl drain command to get the list.
Types ¶
type PredicateChecker ¶
type PredicateChecker struct { }
PredicateChecker checks whether all required predicates are matched for given Pod and Node
func NewPredicateChecker ¶
func NewPredicateChecker() *PredicateChecker
NewPredicateChecker builds PredicateChecker.
func (*PredicateChecker) CheckPredicates ¶
func (p *PredicateChecker) CheckPredicates(pod *kube_api.Pod, nodeInfo *schedulercache.NodeInfo) error
CheckPredicates Checks if the given pod can be placed on the given node.
Click to show internal directories.
Click to hide internal directories.