simulator

package
v0.0.0-...-b46d755 Latest Latest
Warning

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

Go to latest
Published: May 16, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

func GetRequiredPodsForNode(nodename string, client *kube_client.Client) ([]*kube_api.Pod, error)

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.

Jump to

Keyboard shortcuts

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