kubernetes: k8s.io/kubernetes/pkg/scheduler/testing Index | Files

package testing

import "k8s.io/kubernetes/pkg/scheduler/testing"

Index

Package Files

fake_extender.go fake_plugins.go framework_helpers.go workload_prep.go wrappers.go

Constants

const ErrReasonFake = "Nodes failed the fake plugin"

ErrReasonFake is a fake error message denotes the filter function errored.

func ErrorPredicateExtender Uses

func ErrorPredicateExtender(pod *v1.Pod, node *v1.Node) (bool, error)

ErrorPredicateExtender implements FitPredicate function to always return error.

func ErrorPrioritizerExtender Uses

func ErrorPrioritizerExtender(pod *v1.Pod, nodes []*v1.Node) (*framework.NodeScoreList, error)

ErrorPrioritizerExtender implements PriorityFunc function to always return error.

func FalsePredicateExtender Uses

func FalsePredicateExtender(pod *v1.Pod, node *v1.Node) (bool, error)

FalsePredicateExtender implements FitPredicate function to always return false.

func MakeNodesAndPods Uses

func MakeNodesAndPods(existingPodsNum, allNodesNum int) (existingPods []*v1.Pod, allNodes []*v1.Node)

MakeNodesAndPods serves as a testing helper to generate regular Nodes and Pods that don't use any advanced scheduling features.

func MakeNodesAndPodsForEvenPodsSpread Uses

func MakeNodesAndPodsForEvenPodsSpread(labels map[string]string, existingPodsNum, allNodesNum, filteredNodesNum int) (existingPods []*v1.Pod, allNodes []*v1.Node, filteredNodes []*v1.Node)

MakeNodesAndPodsForEvenPodsSpread serves as a testing helper for EvenPodsSpread feature. It builds a fake cluster containing running Pods and Nodes. The size of Pods and Nodes are determined by input arguments. The specs of Pods and Nodes are generated with the following rules: - Each generated node is applied with a unique label: "node: node<i>". - Each generated node is applied with a rotating label: "zone: zone[0-9]". - Depending on the input labels, each generated pod will be applied with

label "key1", "key1,key2", ..., "key1,key2,...,keyN" in a rotating manner.

func MakeNodesAndPodsForPodAffinity Uses

func MakeNodesAndPodsForPodAffinity(existingPodsNum, allNodesNum int) (existingPods []*v1.Pod, allNodes []*v1.Node)

MakeNodesAndPodsForPodAffinity serves as a testing helper for Pod(Anti)Affinity feature. It builds a fake cluster containing running Pods and Nodes. For simplicity, the Nodes will be labelled with "region", "zone" and "node". Nodes[i] will be applied with: - "region": "region" + i%3 - "zone": "zone" + i%10 - "node": "node" + i The Pods will be applied with various combinations of PodAffinity and PodAntiAffinity terms.

func NewFakeFilterPlugin Uses

func NewFakeFilterPlugin(failedNodeReturnCodeMap map[string]framework.Code) frameworkruntime.PluginFactory

NewFakeFilterPlugin initializes a fakeFilterPlugin and returns it.

func NewFakePermitPlugin Uses

func NewFakePermitPlugin(status *framework.Status, timeout time.Duration) frameworkruntime.PluginFactory

NewFakePermitPlugin initializes a fakePermitPlugin and returns it.

func NewFakePreBindPlugin Uses

func NewFakePreBindPlugin(status *framework.Status) frameworkruntime.PluginFactory

NewFakePreBindPlugin initializes a fakePreBindPlugin and returns it.

func NewFakePreFilterPlugin Uses

func NewFakePreFilterPlugin(status *framework.Status) frameworkruntime.PluginFactory

NewFakePreFilterPlugin initializes a fakePreFilterPlugin and returns it.

func NewFakeReservePlugin Uses

func NewFakeReservePlugin(status *framework.Status) frameworkruntime.PluginFactory

NewFakeReservePlugin initializes a fakeReservePlugin and returns it.

func NewFalseFilterPlugin Uses

func NewFalseFilterPlugin(_ runtime.Object, _ framework.FrameworkHandle) (framework.Plugin, error)

NewFalseFilterPlugin initializes a FalseFilterPlugin and returns it.

func NewFramework Uses

func NewFramework(fns []RegisterPluginFunc, opts ...runtime.Option) (framework.Framework, error)

NewFramework creates a Framework from the register functions and options.

func NewMatchFilterPlugin Uses

func NewMatchFilterPlugin(_ runtime.Object, _ framework.FrameworkHandle) (framework.Plugin, error)

NewMatchFilterPlugin initializes a MatchFilterPlugin and returns it.

func NewNode2PrioritizerPlugin Uses

func NewNode2PrioritizerPlugin() frameworkruntime.PluginFactory

NewNode2PrioritizerPlugin returns a factory function to build node2PrioritizerPlugin.

func NewTrueFilterPlugin Uses

func NewTrueFilterPlugin(_ runtime.Object, _ framework.FrameworkHandle) (framework.Plugin, error)

NewTrueFilterPlugin initializes a TrueFilterPlugin and returns it.

func Node1PredicateExtender Uses

func Node1PredicateExtender(pod *v1.Pod, node *v1.Node) (bool, error)

Node1PredicateExtender implements FitPredicate function to return true when the given node's name is "node1"; otherwise return false.

func Node1PrioritizerExtender Uses

func Node1PrioritizerExtender(pod *v1.Pod, nodes []*v1.Node) (*framework.NodeScoreList, error)

Node1PrioritizerExtender implements PriorityFunc function to give score 10 if the given node's name is "node1"; otherwise score 1.

func Node2PredicateExtender Uses

func Node2PredicateExtender(pod *v1.Pod, node *v1.Node) (bool, error)

Node2PredicateExtender implements FitPredicate function to return true when the given node's name is "node2"; otherwise return false.

func Node2PrioritizerExtender Uses

func Node2PrioritizerExtender(pod *v1.Pod, nodes []*v1.Node) (*framework.NodeScoreList, error)

Node2PrioritizerExtender implements PriorityFunc function to give score 10 if the given node's name is "node2"; otherwise score 1.

func TruePredicateExtender Uses

func TruePredicateExtender(pod *v1.Pod, node *v1.Node) (bool, error)

TruePredicateExtender implements FitPredicate function to always return true.

type FakeExtender Uses

type FakeExtender struct {
    Predicates       []FitPredicate
    Prioritizers     []PriorityConfig
    Weight           int64
    NodeCacheCapable bool
    FilteredNodes    []*v1.Node
    UnInterested     bool
    Ignorable        bool

    // Cached node information for fake extender
    CachedNodeNameToInfo map[string]*framework.NodeInfo
}

FakeExtender is a data struct which implements the Extender interface.

func (*FakeExtender) Bind Uses

func (f *FakeExtender) Bind(binding *v1.Binding) error

Bind implements the extender Bind function.

func (*FakeExtender) Filter Uses

func (f *FakeExtender) Filter(pod *v1.Pod, nodes []*v1.Node) ([]*v1.Node, extenderv1.FailedNodesMap, error)

Filter implements the extender Filter function.

func (*FakeExtender) IsBinder Uses

func (f *FakeExtender) IsBinder() bool

IsBinder returns true indicating the extender implements the Binder function.

func (*FakeExtender) IsIgnorable Uses

func (f *FakeExtender) IsIgnorable() bool

IsIgnorable returns a bool value indicating whether internal errors can be ignored.

func (*FakeExtender) IsInterested Uses

func (f *FakeExtender) IsInterested(pod *v1.Pod) bool

IsInterested returns a bool true indicating whether extender

func (*FakeExtender) Name Uses

func (f *FakeExtender) Name() string

Name returns name of the extender.

func (*FakeExtender) Prioritize Uses

func (f *FakeExtender) Prioritize(pod *v1.Pod, nodes []*v1.Node) (*extenderv1.HostPriorityList, int64, error)

Prioritize implements the extender Prioritize function.

func (*FakeExtender) ProcessPreemption Uses

func (f *FakeExtender) ProcessPreemption(
    pod *v1.Pod,
    nodeNameToVictims map[string]*extenderv1.Victims,
    nodeInfos framework.NodeInfoLister,
) (map[string]*extenderv1.Victims, error)

ProcessPreemption implements the extender preempt function.

func (*FakeExtender) SupportsPreemption Uses

func (f *FakeExtender) SupportsPreemption() bool

SupportsPreemption returns true indicating the extender supports preemption.

type FakeFilterPlugin Uses

type FakeFilterPlugin struct {
    NumFilterCalled         int32
    FailedNodeReturnCodeMap map[string]framework.Code
}

FakeFilterPlugin is a test filter plugin to record how many times its Filter() function have been called, and it returns different 'Code' depending on its internal 'failedNodeReturnCodeMap'.

func (*FakeFilterPlugin) Filter Uses

func (pl *FakeFilterPlugin) Filter(_ context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status

Filter invoked at the filter extension point.

func (*FakeFilterPlugin) Name Uses

func (pl *FakeFilterPlugin) Name() string

Name returns name of the plugin.

type FakePermitPlugin Uses

type FakePermitPlugin struct {
    Status  *framework.Status
    Timeout time.Duration
}

FakePermitPlugin is a test permit plugin.

func (*FakePermitPlugin) Name Uses

func (pl *FakePermitPlugin) Name() string

Name returns name of the plugin.

func (*FakePermitPlugin) Permit Uses

func (pl *FakePermitPlugin) Permit(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ string) (*framework.Status, time.Duration)

Permit invoked at the Permit extension point.

type FakePreBindPlugin Uses

type FakePreBindPlugin struct {
    Status *framework.Status
}

FakePreBindPlugin is a test prebind plugin.

func (*FakePreBindPlugin) Name Uses

func (pl *FakePreBindPlugin) Name() string

Name returns name of the plugin.

func (*FakePreBindPlugin) PreBind Uses

func (pl *FakePreBindPlugin) PreBind(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ string) *framework.Status

PreBind invoked at the PreBind extension point.

type FakePreFilterPlugin Uses

type FakePreFilterPlugin struct {
    Status *framework.Status
}

FakePreFilterPlugin is a test filter plugin.

func (*FakePreFilterPlugin) Name Uses

func (pl *FakePreFilterPlugin) Name() string

Name returns name of the plugin.

func (*FakePreFilterPlugin) PreFilter Uses

func (pl *FakePreFilterPlugin) PreFilter(_ context.Context, _ *framework.CycleState, pod *v1.Pod) *framework.Status

PreFilter invoked at the PreFilter extension point.

func (*FakePreFilterPlugin) PreFilterExtensions Uses

func (pl *FakePreFilterPlugin) PreFilterExtensions() framework.PreFilterExtensions

PreFilterExtensions no extensions implemented by this plugin.

type FakeReservePlugin Uses

type FakeReservePlugin struct {
    Status *framework.Status
}

FakeReservePlugin is a test reserve plugin.

func (*FakeReservePlugin) Name Uses

func (pl *FakeReservePlugin) Name() string

Name returns name of the plugin.

func (*FakeReservePlugin) Reserve Uses

func (pl *FakeReservePlugin) Reserve(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ string) *framework.Status

Reserve invoked at the Reserve extension point.

func (*FakeReservePlugin) Unreserve Uses

func (pl *FakeReservePlugin) Unreserve(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ string)

Unreserve invoked at the Unreserve extension point.

type FalseFilterPlugin Uses

type FalseFilterPlugin struct{}

FalseFilterPlugin is a filter plugin which always return Unschedulable when Filter function is called.

func (*FalseFilterPlugin) Filter Uses

func (pl *FalseFilterPlugin) Filter(_ context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status

Filter invoked at the filter extension point.

func (*FalseFilterPlugin) Name Uses

func (pl *FalseFilterPlugin) Name() string

Name returns name of the plugin.

type FitPredicate Uses

type FitPredicate func(pod *v1.Pod, node *v1.Node) (bool, error)

FitPredicate is a function type which is used in fake extender.

type LabelSelectorWrapper Uses

type LabelSelectorWrapper struct{ metav1.LabelSelector }

LabelSelectorWrapper wraps a LabelSelector inside.

func MakeLabelSelector Uses

func MakeLabelSelector() *LabelSelectorWrapper

MakeLabelSelector creates a LabelSelector wrapper.

func (*LabelSelectorWrapper) Exists Uses

func (s *LabelSelectorWrapper) Exists(k string) *LabelSelectorWrapper

Exists injects a matchExpression (with an operator Exists) to the inner labelSelector.

func (*LabelSelectorWrapper) In Uses

func (s *LabelSelectorWrapper) In(key string, vals []string) *LabelSelectorWrapper

In injects a matchExpression (with an operator In) to the inner labelSelector.

func (*LabelSelectorWrapper) Label Uses

func (s *LabelSelectorWrapper) Label(k, v string) *LabelSelectorWrapper

Label applies a {k,v} pair to the inner LabelSelector.

func (*LabelSelectorWrapper) NotExist Uses

func (s *LabelSelectorWrapper) NotExist(k string) *LabelSelectorWrapper

NotExist injects a matchExpression (with an operator NotExist) to the inner labelSelector.

func (*LabelSelectorWrapper) NotIn Uses

func (s *LabelSelectorWrapper) NotIn(key string, vals []string) *LabelSelectorWrapper

NotIn injects a matchExpression (with an operator NotIn) to the inner labelSelector.

func (*LabelSelectorWrapper) Obj Uses

func (s *LabelSelectorWrapper) Obj() *metav1.LabelSelector

Obj returns the inner LabelSelector.

type MatchFilterPlugin Uses

type MatchFilterPlugin struct{}

MatchFilterPlugin is a filter plugin which return Success when the evaluated pod and node have the same name; otherwise return Unschedulable.

func (*MatchFilterPlugin) Filter Uses

func (pl *MatchFilterPlugin) Filter(_ context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status

Filter invoked at the filter extension point.

func (*MatchFilterPlugin) Name Uses

func (pl *MatchFilterPlugin) Name() string

Name returns name of the plugin.

type NodeSelectorWrapper Uses

type NodeSelectorWrapper struct{ v1.NodeSelector }

NodeSelectorWrapper wraps a NodeSelector inside.

func MakeNodeSelector Uses

func MakeNodeSelector() *NodeSelectorWrapper

MakeNodeSelector creates a NodeSelector wrapper.

func (*NodeSelectorWrapper) In Uses

func (s *NodeSelectorWrapper) In(key string, vals []string) *NodeSelectorWrapper

In injects a matchExpression (with an operator IN) as a selectorTerm to the inner nodeSelector. NOTE: appended selecterTerms are ORed.

func (*NodeSelectorWrapper) NotIn Uses

func (s *NodeSelectorWrapper) NotIn(key string, vals []string) *NodeSelectorWrapper

NotIn injects a matchExpression (with an operator NotIn) as a selectorTerm to the inner nodeSelector.

func (*NodeSelectorWrapper) Obj Uses

func (s *NodeSelectorWrapper) Obj() *v1.NodeSelector

Obj returns the inner NodeSelector.

type NodeWrapper Uses

type NodeWrapper struct{ v1.Node }

NodeWrapper wraps a Node inside.

func MakeNode Uses

func MakeNode() *NodeWrapper

MakeNode creates a Node wrapper.

func (*NodeWrapper) Capacity Uses

func (n *NodeWrapper) Capacity(resources map[v1.ResourceName]string) *NodeWrapper

Capacity sets the capacity and the allocatable resources of the inner node. Each entry in `resources` corresponds to a resource name and its quantity. By default, the capacity and allocatable number of pods are set to 32.

func (*NodeWrapper) Images Uses

func (n *NodeWrapper) Images(images map[string]int64) *NodeWrapper

Images sets the images of the inner node. Each entry in `images` corresponds to an image name and its size in bytes.

func (*NodeWrapper) Label Uses

func (n *NodeWrapper) Label(k, v string) *NodeWrapper

Label applies a {k,v} label pair to the inner node.

func (*NodeWrapper) Name Uses

func (n *NodeWrapper) Name(s string) *NodeWrapper

Name sets `s` as the name of the inner pod.

func (*NodeWrapper) Obj Uses

func (n *NodeWrapper) Obj() *v1.Node

Obj returns the inner Node.

func (*NodeWrapper) UID Uses

func (n *NodeWrapper) UID(s string) *NodeWrapper

UID sets `s` as the UID of the inner pod.

type PodAffinityKind Uses

type PodAffinityKind int

PodAffinityKind represents different kinds of PodAffinity.

const (
    // NilPodAffinity is a no-op which doesn't apply any PodAffinity.
    NilPodAffinity PodAffinityKind = iota
    // PodAffinityWithRequiredReq applies a HARD requirement to pod.spec.affinity.PodAffinity.
    PodAffinityWithRequiredReq
    // PodAffinityWithPreferredReq applies a SOFT requirement to pod.spec.affinity.PodAffinity.
    PodAffinityWithPreferredReq
    // PodAffinityWithRequiredPreferredReq applies HARD and SOFT requirements to pod.spec.affinity.PodAffinity.
    PodAffinityWithRequiredPreferredReq
    // PodAntiAffinityWithRequiredReq applies a HARD requirement to pod.spec.affinity.PodAntiAffinity.
    PodAntiAffinityWithRequiredReq
    // PodAntiAffinityWithPreferredReq applies a SOFT requirement to pod.spec.affinity.PodAntiAffinity.
    PodAntiAffinityWithPreferredReq
    // PodAntiAffinityWithRequiredPreferredReq applies HARD and SOFT requirements to pod.spec.affinity.PodAntiAffinity.
    PodAntiAffinityWithRequiredPreferredReq
)

type PodWrapper Uses

type PodWrapper struct{ v1.Pod }

PodWrapper wraps a Pod inside.

func MakePod Uses

func MakePod() *PodWrapper

MakePod creates a Pod wrapper.

func (*PodWrapper) Container Uses

func (p *PodWrapper) Container(s string) *PodWrapper

Container appends a container into PodSpec of the inner pod.

func (*PodWrapper) Label Uses

func (p *PodWrapper) Label(k, v string) *PodWrapper

Label sets a {k,v} pair to the inner pod.

func (*PodWrapper) Name Uses

func (p *PodWrapper) Name(s string) *PodWrapper

Name sets `s` as the name of the inner pod.

func (*PodWrapper) Namespace Uses

func (p *PodWrapper) Namespace(s string) *PodWrapper

Namespace sets `s` as the namespace of the inner pod.

func (*PodWrapper) Node Uses

func (p *PodWrapper) Node(s string) *PodWrapper

Node sets `s` as the nodeName of the inner pod.

func (*PodWrapper) NodeAffinityIn Uses

func (p *PodWrapper) NodeAffinityIn(key string, vals []string) *PodWrapper

NodeAffinityIn creates a HARD node affinity (with the operator In) and injects into the inner pod.

func (*PodWrapper) NodeAffinityNotIn Uses

func (p *PodWrapper) NodeAffinityNotIn(key string, vals []string) *PodWrapper

NodeAffinityNotIn creates a HARD node affinity (with the operator NotIn) and injects into the inner pod.

func (*PodWrapper) NodeSelector Uses

func (p *PodWrapper) NodeSelector(m map[string]string) *PodWrapper

NodeSelector sets `m` as the nodeSelector of the inner pod.

func (*PodWrapper) NominatedNodeName Uses

func (p *PodWrapper) NominatedNodeName(n string) *PodWrapper

NominatedNodeName sets `n` as the .Status.NominatedNodeName of the inner pod.

func (*PodWrapper) Obj Uses

func (p *PodWrapper) Obj() *v1.Pod

Obj returns the inner Pod.

func (*PodWrapper) PodAffinityExists Uses

func (p *PodWrapper) PodAffinityExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper

PodAffinityExists creates an PodAffinity with the operator "Exists" and injects into the inner pod.

func (*PodWrapper) PodAntiAffinityExists Uses

func (p *PodWrapper) PodAntiAffinityExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper

PodAntiAffinityExists creates an PodAntiAffinity with the operator "Exists" and injects into the inner pod.

func (*PodWrapper) PreemptionPolicy Uses

func (p *PodWrapper) PreemptionPolicy(policy v1.PreemptionPolicy) *PodWrapper

PreemptionPolicy sets the give preemption policy to the inner pod.

func (*PodWrapper) Priority Uses

func (p *PodWrapper) Priority(val int32) *PodWrapper

Priority sets a priority value into PodSpec of the inner pod.

func (*PodWrapper) Req Uses

func (p *PodWrapper) Req(resMap map[v1.ResourceName]string) *PodWrapper

Req adds a new container to the inner pod with given resource map.

func (*PodWrapper) SchedulerName Uses

func (p *PodWrapper) SchedulerName(s string) *PodWrapper

SchedulerName sets `s` as the scheduler name of the inner pod.

func (*PodWrapper) SpreadConstraint Uses

func (p *PodWrapper) SpreadConstraint(maxSkew int, tpKey string, mode v1.UnsatisfiableConstraintAction, selector *metav1.LabelSelector) *PodWrapper

SpreadConstraint constructs a TopologySpreadConstraint object and injects into the inner pod.

func (*PodWrapper) StartTime Uses

func (p *PodWrapper) StartTime(t metav1.Time) *PodWrapper

StartTime sets `t` as .status.startTime for the inner pod.

func (*PodWrapper) Terminating Uses

func (p *PodWrapper) Terminating() *PodWrapper

Terminating sets the inner pod's deletionTimestamp to current timestamp.

func (*PodWrapper) UID Uses

func (p *PodWrapper) UID(s string) *PodWrapper

UID sets `s` as the UID of the inner pod.

func (*PodWrapper) ZeroTerminationGracePeriod Uses

func (p *PodWrapper) ZeroTerminationGracePeriod() *PodWrapper

ZeroTerminationGracePeriod sets the TerminationGracePeriodSeconds of the inner pod to zero.

type PriorityConfig Uses

type PriorityConfig struct {
    Function PriorityFunc
    Weight   int64
}

PriorityConfig is used in fake extender to perform Prioritize function.

type PriorityFunc Uses

type PriorityFunc func(pod *v1.Pod, nodes []*v1.Node) (*framework.NodeScoreList, error)

PriorityFunc is a function type which is used in fake extender.

type RegisterPluginFunc Uses

type RegisterPluginFunc func(reg *runtime.Registry, plugins *schedulerapi.Plugins, pluginConfigs []schedulerapi.PluginConfig)

RegisterPluginFunc is a function signature used in method RegisterFilterPlugin() to register a Filter Plugin to a given registry.

func RegisterBindPlugin Uses

func RegisterBindPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc

RegisterBindPlugin returns a function to register a Bind Plugin to a given registry.

func RegisterFilterPlugin Uses

func RegisterFilterPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc

RegisterFilterPlugin returns a function to register a Filter Plugin to a given registry.

func RegisterPermitPlugin Uses

func RegisterPermitPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc

RegisterPermitPlugin returns a function to register a Permit Plugin to a given registry.

func RegisterPluginAsExtensions Uses

func RegisterPluginAsExtensions(pluginName string, pluginNewFunc runtime.PluginFactory, extensions ...string) RegisterPluginFunc

RegisterPluginAsExtensions returns a function to register a Plugin as given extensionPoints to a given registry.

func RegisterPluginAsExtensionsWithWeight Uses

func RegisterPluginAsExtensionsWithWeight(pluginName string, weight int32, pluginNewFunc runtime.PluginFactory, extensions ...string) RegisterPluginFunc

RegisterPluginAsExtensionsWithWeight returns a function to register a Plugin as given extensionPoints with weight to a given registry.

func RegisterPreBindPlugin Uses

func RegisterPreBindPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc

RegisterPreBindPlugin returns a function to register a PreBind Plugin to a given registry.

func RegisterPreFilterPlugin Uses

func RegisterPreFilterPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc

RegisterPreFilterPlugin returns a function to register a PreFilter Plugin to a given registry.

func RegisterPreScorePlugin Uses

func RegisterPreScorePlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc

RegisterPreScorePlugin returns a function to register a Score Plugin to a given registry.

func RegisterQueueSortPlugin Uses

func RegisterQueueSortPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc

RegisterQueueSortPlugin returns a function to register a QueueSort Plugin to a given registry.

func RegisterReservePlugin Uses

func RegisterReservePlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc

RegisterReservePlugin returns a function to register a Reserve Plugin to a given registry.

func RegisterScorePlugin Uses

func RegisterScorePlugin(pluginName string, pluginNewFunc runtime.PluginFactory, weight int32) RegisterPluginFunc

RegisterScorePlugin returns a function to register a Score Plugin to a given registry.

type TrueFilterPlugin Uses

type TrueFilterPlugin struct{}

TrueFilterPlugin is a filter plugin which always return Success when Filter function is called.

func (*TrueFilterPlugin) Filter Uses

func (pl *TrueFilterPlugin) Filter(_ context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status

Filter invoked at the filter extension point.

func (*TrueFilterPlugin) Name Uses

func (pl *TrueFilterPlugin) Name() string

Name returns name of the plugin.

Package testing imports 16 packages (graph). Updated 2020-09-20. Refresh now. Tools for package owners.