simulator

package
v0.0.0-...-fa18c62 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildNodeInfoForNode

func BuildNodeInfoForNode(nodename string, client *kube_client.Client) (*schedulercache.NodeInfo, error)

BuildNodeInfoForNode build a NodeInfo structure for the given node as if the node was just created.

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, node *kube_api.Node, 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