Documentation
¶
Index ¶
- Constants
- func ErrorPredicateExtender(pod *v1.Pod, node *v1.Node) *framework.Status
- func ErrorPrioritizerExtender(pod *v1.Pod, nodes []*v1.Node) (*framework.NodeScoreList, error)
- func FalsePredicateExtender(pod *v1.Pod, node *v1.Node) *framework.Status
- func MakeNodesAndPodsForEvenPodsSpread(labels map[string]string, existingPodsNum, allNodesNum, filteredNodesNum int) (existingPods []*v1.Pod, allNodes []*v1.Node, filteredNodes []*v1.Node)
- func NewFakeFilterPlugin(failedNodeReturnCodeMap map[string]framework.Code) frameworkruntime.PluginFactory
- func NewFakePermitPlugin(status *framework.Status, timeout time.Duration) frameworkruntime.PluginFactory
- func NewFakePreBindPlugin(status *framework.Status) frameworkruntime.PluginFactory
- func NewFakePreFilterPlugin(name string, result *framework.PreFilterResult, status *framework.Status) frameworkruntime.PluginFactory
- func NewFakePreScoreAndScorePlugin(name string, score int64, preScoreStatus, scoreStatus *framework.Status) frameworkruntime.PluginFactory
- func NewFakeReservePlugin(status *framework.Status) frameworkruntime.PluginFactory
- func NewFalseFilterPlugin(_ runtime.Object, _ framework.Handle) (framework.Plugin, error)
- func NewFramework(ctx context.Context, fns []RegisterPluginFunc, profileName string, ...) (framework.Framework, error)
- func NewMatchFilterPlugin(_ runtime.Object, _ framework.Handle) (framework.Plugin, error)
- func NewNode2PrioritizerPlugin() frameworkruntime.PluginFactory
- func NewTrueFilterPlugin(_ runtime.Object, _ framework.Handle) (framework.Plugin, error)
- func Node1PredicateExtender(pod *v1.Pod, node *v1.Node) *framework.Status
- func Node1PrioritizerExtender(pod *v1.Pod, nodes []*v1.Node) (*framework.NodeScoreList, error)
- func Node2PredicateExtender(pod *v1.Pod, node *v1.Node) *framework.Status
- func Node2PrioritizerExtender(pod *v1.Pod, nodes []*v1.Node) (*framework.NodeScoreList, error)
- func TruePredicateExtender(pod *v1.Pod, node *v1.Node) *framework.Status
- type ContainerWrapper
- func (c *ContainerWrapper) ContainerPort(ports []v1.ContainerPort) *ContainerWrapper
- func (c *ContainerWrapper) HostPort(hostPort int32) *ContainerWrapper
- func (c *ContainerWrapper) Image(image string) *ContainerWrapper
- func (c *ContainerWrapper) Name(n string) *ContainerWrapper
- func (c *ContainerWrapper) Obj() v1.Container
- func (c *ContainerWrapper) ResourceLimits(limMap map[v1.ResourceName]string) *ContainerWrapper
- func (c *ContainerWrapper) ResourceRequests(reqMap map[v1.ResourceName]string) *ContainerWrapper
- func (c *ContainerWrapper) Resources(resMap map[v1.ResourceName]string) *ContainerWrapper
- type FakeExtender
- func (f *FakeExtender) Bind(binding *v1.Binding) error
- func (f *FakeExtender) Filter(pod *v1.Pod, nodes []*v1.Node) ([]*v1.Node, extenderv1.FailedNodesMap, extenderv1.FailedNodesMap, error)
- func (f *FakeExtender) IsBinder() bool
- func (f *FakeExtender) IsIgnorable() bool
- func (f *FakeExtender) IsInterested(pod *v1.Pod) bool
- func (f *FakeExtender) Name() string
- func (f *FakeExtender) Prioritize(pod *v1.Pod, nodes []*v1.Node) (*extenderv1.HostPriorityList, int64, error)
- func (f *FakeExtender) ProcessPreemption(pod *v1.Pod, nodeNameToVictims map[string]*extenderv1.Victims, ...) (map[string]*extenderv1.Victims, error)
- func (f *FakeExtender) SupportsPreemption() bool
- type FakeFilterPlugin
- type FakePermitPlugin
- type FakePreBindPlugin
- type FakePreFilterAndFilterPlugin
- type FakePreFilterPlugin
- type FakePreScoreAndScorePlugin
- func (pl *FakePreScoreAndScorePlugin) Name() string
- func (pl *FakePreScoreAndScorePlugin) PreScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (pl *FakePreScoreAndScorePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status)
- func (pl *FakePreScoreAndScorePlugin) ScoreExtensions() framework.ScoreExtensions
- type FakeReservePlugin
- type FalseFilterPlugin
- type FitPredicate
- type LabelSelectorWrapper
- func (s *LabelSelectorWrapper) Exists(k string) *LabelSelectorWrapper
- func (s *LabelSelectorWrapper) In(key string, vals []string) *LabelSelectorWrapper
- func (s *LabelSelectorWrapper) Label(k, v string) *LabelSelectorWrapper
- func (s *LabelSelectorWrapper) NotExist(k string) *LabelSelectorWrapper
- func (s *LabelSelectorWrapper) NotIn(key string, vals []string) *LabelSelectorWrapper
- func (s *LabelSelectorWrapper) Obj() *metav1.LabelSelector
- type MatchFilterPlugin
- type NodeSelectorWrapper
- type NodeWrapper
- func (n *NodeWrapper) Capacity(resources map[v1.ResourceName]string) *NodeWrapper
- func (n *NodeWrapper) Images(images map[string]int64) *NodeWrapper
- func (n *NodeWrapper) Label(k, v string) *NodeWrapper
- func (n *NodeWrapper) Name(s string) *NodeWrapper
- func (n *NodeWrapper) Obj() *v1.Node
- func (n *NodeWrapper) Taints(taints []v1.Taint) *NodeWrapper
- func (n *NodeWrapper) UID(s string) *NodeWrapper
- type PersistentVolumeClaimWrapper
- func (p *PersistentVolumeClaimWrapper) AccessModes(accessModes []v1.PersistentVolumeAccessMode) *PersistentVolumeClaimWrapper
- func (p *PersistentVolumeClaimWrapper) Annotation(key, value string) *PersistentVolumeClaimWrapper
- func (p *PersistentVolumeClaimWrapper) Name(s string) *PersistentVolumeClaimWrapper
- func (p *PersistentVolumeClaimWrapper) Namespace(s string) *PersistentVolumeClaimWrapper
- func (p *PersistentVolumeClaimWrapper) Obj() *v1.PersistentVolumeClaim
- func (p *PersistentVolumeClaimWrapper) Resources(resources v1.ResourceRequirements) *PersistentVolumeClaimWrapper
- func (p *PersistentVolumeClaimWrapper) VolumeName(name string) *PersistentVolumeClaimWrapper
- type PersistentVolumeWrapper
- func (p *PersistentVolumeWrapper) AccessModes(accessModes []v1.PersistentVolumeAccessMode) *PersistentVolumeWrapper
- func (p *PersistentVolumeWrapper) Capacity(capacity v1.ResourceList) *PersistentVolumeWrapper
- func (p *PersistentVolumeWrapper) HostPathVolumeSource(src *v1.HostPathVolumeSource) *PersistentVolumeWrapper
- func (p *PersistentVolumeWrapper) Name(s string) *PersistentVolumeWrapper
- func (p *PersistentVolumeWrapper) Obj() *v1.PersistentVolume
- type PodAffinityKind
- type PodSchedulingWrapper
- func (wrapper *PodSchedulingWrapper) Label(k, v string) *PodSchedulingWrapper
- func (wrapper *PodSchedulingWrapper) Name(s string) *PodSchedulingWrapper
- func (wrapper *PodSchedulingWrapper) Namespace(s string) *PodSchedulingWrapper
- func (wrapper *PodSchedulingWrapper) Obj() *resourcev1alpha2.PodSchedulingContext
- func (wrapper *PodSchedulingWrapper) OwnerReference(name, uid string, gvk schema.GroupVersionKind) *PodSchedulingWrapper
- func (wrapper *PodSchedulingWrapper) PotentialNodes(nodes ...string) *PodSchedulingWrapper
- func (wrapper *PodSchedulingWrapper) ResourceClaims(statuses ...resourcev1alpha2.ResourceClaimSchedulingStatus) *PodSchedulingWrapper
- func (wrapper *PodSchedulingWrapper) SelectedNode(s string) *PodSchedulingWrapper
- func (wrapper *PodSchedulingWrapper) UID(s string) *PodSchedulingWrapper
- type PodWrapper
- func (p *PodWrapper) Annotation(key, value string) *PodWrapper
- func (p *PodWrapper) Annotations(annotations map[string]string) *PodWrapper
- func (p *PodWrapper) Condition(t v1.PodConditionType, s v1.ConditionStatus, r string) *PodWrapper
- func (p *PodWrapper) Conditions(conditions []v1.PodCondition) *PodWrapper
- func (p *PodWrapper) Container(s string) *PodWrapper
- func (p *PodWrapper) ContainerPort(ports []v1.ContainerPort) *PodWrapper
- func (p *PodWrapper) Containers(containers []v1.Container) *PodWrapper
- func (p *PodWrapper) CreationTimestamp(t metav1.Time) *PodWrapper
- func (p *PodWrapper) HostPort(port int32) *PodWrapper
- func (p *PodWrapper) InitReq(resMap map[v1.ResourceName]string) *PodWrapper
- func (p *PodWrapper) Label(k, v string) *PodWrapper
- func (p *PodWrapper) Labels(labels map[string]string) *PodWrapper
- func (p *PodWrapper) Lim(limMap map[v1.ResourceName]string) *PodWrapper
- func (p *PodWrapper) Name(s string) *PodWrapper
- func (p *PodWrapper) Namespace(s string) *PodWrapper
- func (p *PodWrapper) Node(s string) *PodWrapper
- func (p *PodWrapper) NodeAffinityIn(key string, vals []string) *PodWrapper
- func (p *PodWrapper) NodeAffinityNotIn(key string, vals []string) *PodWrapper
- func (p *PodWrapper) NodeSelector(m map[string]string) *PodWrapper
- func (p *PodWrapper) NominatedNodeName(n string) *PodWrapper
- func (p *PodWrapper) Obj() *v1.Pod
- func (p *PodWrapper) Overhead(rl v1.ResourceList) *PodWrapper
- func (p *PodWrapper) OwnerReference(name string, gvk schema.GroupVersionKind) *PodWrapper
- func (p *PodWrapper) PVC(name string) *PodWrapper
- func (p *PodWrapper) Phase(phase v1.PodPhase) *PodWrapper
- func (p *PodWrapper) PodAffinity(topologyKey string, labelSelector *metav1.LabelSelector, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodAffinityExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodAffinityIn(labelKey, topologyKey string, vals []string, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodAffinityNotExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodAffinityNotIn(labelKey, topologyKey string, vals []string, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodAntiAffinity(topologyKey string, labelSelector *metav1.LabelSelector, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodAntiAffinityExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodAntiAffinityIn(labelKey, topologyKey string, vals []string, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodAntiAffinityNotExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodAntiAffinityNotIn(labelKey, topologyKey string, vals []string, kind PodAffinityKind) *PodWrapper
- func (p *PodWrapper) PodResourceClaims(podResourceClaims ...v1.PodResourceClaim) *PodWrapper
- func (p *PodWrapper) PreemptionPolicy(policy v1.PreemptionPolicy) *PodWrapper
- func (p *PodWrapper) Priority(val int32) *PodWrapper
- func (p *PodWrapper) Req(reqMap map[v1.ResourceName]string) *PodWrapper
- func (p *PodWrapper) Res(resMap map[v1.ResourceName]string) *PodWrapper
- func (p *PodWrapper) SchedulerName(s string) *PodWrapper
- func (p *PodWrapper) SchedulingGates(gates []string) *PodWrapper
- func (p *PodWrapper) SpreadConstraint(maxSkew int, tpKey string, mode v1.UnsatisfiableConstraintAction, ...) *PodWrapper
- func (p *PodWrapper) StartTime(t metav1.Time) *PodWrapper
- func (p *PodWrapper) Terminating() *PodWrapper
- func (p *PodWrapper) Toleration(key string) *PodWrapper
- func (p *PodWrapper) UID(s string) *PodWrapper
- func (p *PodWrapper) Volume(volume v1.Volume) *PodWrapper
- func (p *PodWrapper) ZeroTerminationGracePeriod() *PodWrapper
- type PriorityConfig
- type PriorityFunc
- type RegisterPluginFunc
- func RegisterBindPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
- func RegisterFilterPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
- func RegisterPermitPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
- func RegisterPluginAsExtensions(pluginName string, pluginNewFunc runtime.PluginFactory, extensions ...string) RegisterPluginFunc
- func RegisterPluginAsExtensionsWithWeight(pluginName string, weight int32, pluginNewFunc runtime.PluginFactory, ...) RegisterPluginFunc
- func RegisterPreBindPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
- func RegisterPreFilterPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
- func RegisterPreScorePlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
- func RegisterQueueSortPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
- func RegisterReservePlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
- func RegisterScorePlugin(pluginName string, pluginNewFunc runtime.PluginFactory, weight int32) RegisterPluginFunc
- type ResourceClaimWrapper
- func (wrapper *ResourceClaimWrapper) Allocation(allocation *resourcev1alpha2.AllocationResult) *ResourceClaimWrapper
- func (wrapper *ResourceClaimWrapper) AllocationMode(a resourcev1alpha2.AllocationMode) *ResourceClaimWrapper
- func (wrapper *ResourceClaimWrapper) DeallocationRequested(deallocationRequested bool) *ResourceClaimWrapper
- func (wrapper *ResourceClaimWrapper) Name(s string) *ResourceClaimWrapper
- func (wrapper *ResourceClaimWrapper) Namespace(s string) *ResourceClaimWrapper
- func (wrapper *ResourceClaimWrapper) Obj() *resourcev1alpha2.ResourceClaim
- func (wrapper *ResourceClaimWrapper) OwnerReference(name, uid string, gvk schema.GroupVersionKind) *ResourceClaimWrapper
- func (wrapper *ResourceClaimWrapper) ReservedFor(consumers ...resourcev1alpha2.ResourceClaimConsumerReference) *ResourceClaimWrapper
- func (wrapper *ResourceClaimWrapper) ResourceClassName(name string) *ResourceClaimWrapper
- func (wrapper *ResourceClaimWrapper) UID(s string) *ResourceClaimWrapper
- type TrueFilterPlugin
Constants ¶
const ErrReasonFake = "Nodes failed the fake plugin"
ErrReasonFake is a fake error message denotes the filter function errored.
Variables ¶
This section is empty.
Functions ¶
func ErrorPredicateExtender ¶
ErrorPredicateExtender implements FitPredicate function to always return error status.
func ErrorPrioritizerExtender ¶
ErrorPrioritizerExtender implements PriorityFunc function to always return error.
func FalsePredicateExtender ¶
FalsePredicateExtender implements FitPredicate function to always return unschedulable status.
func MakeNodesAndPodsForEvenPodsSpread ¶
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 NewFakeFilterPlugin ¶
func NewFakeFilterPlugin(failedNodeReturnCodeMap map[string]framework.Code) frameworkruntime.PluginFactory
NewFakeFilterPlugin initializes a fakeFilterPlugin and returns it.
func NewFakePermitPlugin ¶
func NewFakePermitPlugin(status *framework.Status, timeout time.Duration) frameworkruntime.PluginFactory
NewFakePermitPlugin initializes a fakePermitPlugin and returns it.
func NewFakePreBindPlugin ¶
func NewFakePreBindPlugin(status *framework.Status) frameworkruntime.PluginFactory
NewFakePreBindPlugin initializes a fakePreBindPlugin and returns it.
func NewFakePreFilterPlugin ¶
func NewFakePreFilterPlugin(name string, result *framework.PreFilterResult, status *framework.Status) frameworkruntime.PluginFactory
NewFakePreFilterPlugin initializes a fakePreFilterPlugin and returns it.
func NewFakePreScoreAndScorePlugin ¶
func NewFakePreScoreAndScorePlugin(name string, score int64, preScoreStatus, scoreStatus *framework.Status) frameworkruntime.PluginFactory
func NewFakeReservePlugin ¶
func NewFakeReservePlugin(status *framework.Status) frameworkruntime.PluginFactory
NewFakeReservePlugin initializes a fakeReservePlugin and returns it.
func NewFalseFilterPlugin ¶
NewFalseFilterPlugin initializes a FalseFilterPlugin and returns it.
func NewFramework ¶
func NewFramework(ctx context.Context, fns []RegisterPluginFunc, profileName string, opts ...runtime.Option) (framework.Framework, error)
NewFramework creates a Framework from the register functions and options.
func NewMatchFilterPlugin ¶
NewMatchFilterPlugin initializes a MatchFilterPlugin and returns it.
func NewNode2PrioritizerPlugin ¶
func NewNode2PrioritizerPlugin() frameworkruntime.PluginFactory
NewNode2PrioritizerPlugin returns a factory function to build node2PrioritizerPlugin.
func NewTrueFilterPlugin ¶
NewTrueFilterPlugin initializes a TrueFilterPlugin and returns it.
func Node1PredicateExtender ¶
Node1PredicateExtender implements FitPredicate function to return true when the given node's name is "node1"; otherwise return false.
func Node1PrioritizerExtender ¶
Node1PrioritizerExtender implements PriorityFunc function to give score 10 if the given node's name is "node1"; otherwise score 1.
func Node2PredicateExtender ¶
Node2PredicateExtender implements FitPredicate function to return true when the given node's name is "node2"; otherwise return false.
func Node2PrioritizerExtender ¶
Node2PrioritizerExtender implements PriorityFunc function to give score 10 if the given node's name is "node2"; otherwise score 1.
Types ¶
type ContainerWrapper ¶
ContainerWrapper wraps a Container inside.
func MakeContainer ¶
func MakeContainer() *ContainerWrapper
MakeContainer creates a Container wrapper.
func (*ContainerWrapper) ContainerPort ¶
func (c *ContainerWrapper) ContainerPort(ports []v1.ContainerPort) *ContainerWrapper
ContainerPort sets `ports` as the ports of the inner Container.
func (*ContainerWrapper) HostPort ¶
func (c *ContainerWrapper) HostPort(hostPort int32) *ContainerWrapper
HostPort sets `hostPort` as the host port of the inner Container.
func (*ContainerWrapper) Image ¶
func (c *ContainerWrapper) Image(image string) *ContainerWrapper
Image sets `image` as the image of the inner Container.
func (*ContainerWrapper) Name ¶
func (c *ContainerWrapper) Name(n string) *ContainerWrapper
Name sets `n` as the name of the inner Container.
func (*ContainerWrapper) Obj ¶
func (c *ContainerWrapper) Obj() v1.Container
Obj returns the inner Container.
func (*ContainerWrapper) ResourceLimits ¶
func (c *ContainerWrapper) ResourceLimits(limMap map[v1.ResourceName]string) *ContainerWrapper
ResourceLimits sets the container resource limits to the given resource map.
func (*ContainerWrapper) ResourceRequests ¶
func (c *ContainerWrapper) ResourceRequests(reqMap map[v1.ResourceName]string) *ContainerWrapper
ResourceRequests sets the container resources requests to the given resource map of requests.
func (*ContainerWrapper) Resources ¶
func (c *ContainerWrapper) Resources(resMap map[v1.ResourceName]string) *ContainerWrapper
Resources sets the container resources to the given resource map.
type FakeExtender ¶
type FakeExtender struct { // ExtenderName indicates this fake extender's name. // Note that extender name should be unique. ExtenderName string 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 ¶
func (f *FakeExtender) Bind(binding *v1.Binding) error
Bind implements the extender Bind function.
func (*FakeExtender) Filter ¶
func (f *FakeExtender) Filter(pod *v1.Pod, nodes []*v1.Node) ([]*v1.Node, extenderv1.FailedNodesMap, extenderv1.FailedNodesMap, error)
Filter implements the extender Filter function.
func (*FakeExtender) IsBinder ¶
func (f *FakeExtender) IsBinder() bool
IsBinder returns true indicating the extender implements the Binder function.
func (*FakeExtender) IsIgnorable ¶
func (f *FakeExtender) IsIgnorable() bool
IsIgnorable returns a bool value indicating whether internal errors can be ignored.
func (*FakeExtender) IsInterested ¶
func (f *FakeExtender) IsInterested(pod *v1.Pod) bool
IsInterested returns a bool indicating whether this extender is interested in this Pod.
func (*FakeExtender) Prioritize ¶
func (f *FakeExtender) Prioritize(pod *v1.Pod, nodes []*v1.Node) (*extenderv1.HostPriorityList, int64, error)
Prioritize implements the extender Prioritize function.
func (*FakeExtender) ProcessPreemption ¶
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 ¶
func (f *FakeExtender) SupportsPreemption() bool
SupportsPreemption returns true indicating the extender supports preemption.
type FakeFilterPlugin ¶
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 ¶
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 ¶
func (pl *FakeFilterPlugin) Name() string
Name returns name of the plugin.
type FakePermitPlugin ¶
FakePermitPlugin is a test permit plugin.
func (*FakePermitPlugin) Name ¶
func (pl *FakePermitPlugin) Name() string
Name returns name of the plugin.
type FakePreBindPlugin ¶
FakePreBindPlugin is a test prebind plugin.
func (*FakePreBindPlugin) Name ¶
func (pl *FakePreBindPlugin) Name() string
Name returns name of the plugin.
type FakePreFilterAndFilterPlugin ¶
type FakePreFilterAndFilterPlugin struct { *FakePreFilterPlugin *FakeFilterPlugin }
func (FakePreFilterAndFilterPlugin) Name ¶
func (pl FakePreFilterAndFilterPlugin) Name() string
Name returns name of the plugin.
type FakePreFilterPlugin ¶
type FakePreFilterPlugin struct { Result *framework.PreFilterResult Status *framework.Status // contains filtered or unexported fields }
FakePreFilterPlugin is a test filter plugin.
func (*FakePreFilterPlugin) Name ¶
func (pl *FakePreFilterPlugin) Name() string
Name returns name of the plugin.
func (*FakePreFilterPlugin) PreFilter ¶
func (pl *FakePreFilterPlugin) PreFilter(_ context.Context, _ *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
PreFilter invoked at the PreFilter extension point.
func (*FakePreFilterPlugin) PreFilterExtensions ¶
func (pl *FakePreFilterPlugin) PreFilterExtensions() framework.PreFilterExtensions
PreFilterExtensions no extensions implemented by this plugin.
type FakePreScoreAndScorePlugin ¶
type FakePreScoreAndScorePlugin struct {
// contains filtered or unexported fields
}
func (*FakePreScoreAndScorePlugin) Name ¶
func (pl *FakePreScoreAndScorePlugin) Name() string
Name returns name of the plugin.
func (*FakePreScoreAndScorePlugin) ScoreExtensions ¶
func (pl *FakePreScoreAndScorePlugin) ScoreExtensions() framework.ScoreExtensions
type FakeReservePlugin ¶
FakeReservePlugin is a test reserve plugin.
func (*FakeReservePlugin) Name ¶
func (pl *FakeReservePlugin) Name() string
Name returns name of the plugin.
func (*FakeReservePlugin) Reserve ¶
func (pl *FakeReservePlugin) Reserve(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ string) *framework.Status
Reserve invoked at the Reserve extension point.
func (*FakeReservePlugin) Unreserve ¶
func (pl *FakeReservePlugin) Unreserve(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ string)
Unreserve invoked at the Unreserve extension point.
type FalseFilterPlugin ¶
type FalseFilterPlugin struct{}
FalseFilterPlugin is a filter plugin which always return Unschedulable when Filter function is called.
func (*FalseFilterPlugin) Filter ¶
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 ¶
func (pl *FalseFilterPlugin) Name() string
Name returns name of the plugin.
type FitPredicate ¶
FitPredicate is a function type which is used in fake extender.
type LabelSelectorWrapper ¶
type LabelSelectorWrapper struct{ metav1.LabelSelector }
LabelSelectorWrapper wraps a LabelSelector inside.
func MakeLabelSelector ¶
func MakeLabelSelector() *LabelSelectorWrapper
MakeLabelSelector creates a LabelSelector wrapper.
func (*LabelSelectorWrapper) Exists ¶
func (s *LabelSelectorWrapper) Exists(k string) *LabelSelectorWrapper
Exists injects a matchExpression (with an operator Exists) to the inner labelSelector.
func (*LabelSelectorWrapper) In ¶
func (s *LabelSelectorWrapper) In(key string, vals []string) *LabelSelectorWrapper
In injects a matchExpression (with an operator In) to the inner labelSelector.
func (*LabelSelectorWrapper) Label ¶
func (s *LabelSelectorWrapper) Label(k, v string) *LabelSelectorWrapper
Label applies a {k,v} pair to the inner LabelSelector.
func (*LabelSelectorWrapper) NotExist ¶
func (s *LabelSelectorWrapper) NotExist(k string) *LabelSelectorWrapper
NotExist injects a matchExpression (with an operator NotExist) to the inner labelSelector.
func (*LabelSelectorWrapper) NotIn ¶
func (s *LabelSelectorWrapper) NotIn(key string, vals []string) *LabelSelectorWrapper
NotIn injects a matchExpression (with an operator NotIn) to the inner labelSelector.
func (*LabelSelectorWrapper) Obj ¶
func (s *LabelSelectorWrapper) Obj() *metav1.LabelSelector
Obj returns the inner LabelSelector.
type MatchFilterPlugin ¶
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 ¶
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 ¶
func (pl *MatchFilterPlugin) Name() string
Name returns name of the plugin.
type NodeSelectorWrapper ¶
type NodeSelectorWrapper struct{ v1.NodeSelector }
NodeSelectorWrapper wraps a NodeSelector inside.
func MakeNodeSelector ¶
func MakeNodeSelector() *NodeSelectorWrapper
MakeNodeSelector creates a NodeSelector wrapper.
func (*NodeSelectorWrapper) In ¶
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 ¶
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 ¶
func (s *NodeSelectorWrapper) Obj() *v1.NodeSelector
Obj returns the inner NodeSelector.
type NodeWrapper ¶
NodeWrapper wraps a Node inside.
func (*NodeWrapper) Capacity ¶
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 ¶
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 ¶
func (n *NodeWrapper) Label(k, v string) *NodeWrapper
Label applies a {k,v} label pair to the inner node.
func (*NodeWrapper) Name ¶
func (n *NodeWrapper) Name(s string) *NodeWrapper
Name sets `s` as the name of the inner pod.
func (*NodeWrapper) Taints ¶
func (n *NodeWrapper) Taints(taints []v1.Taint) *NodeWrapper
Taints applies taints to the inner node.
func (*NodeWrapper) UID ¶
func (n *NodeWrapper) UID(s string) *NodeWrapper
UID sets `s` as the UID of the inner pod.
type PersistentVolumeClaimWrapper ¶
type PersistentVolumeClaimWrapper struct{ v1.PersistentVolumeClaim }
PersistentVolumeClaimWrapper wraps a PersistentVolumeClaim inside.
func MakePersistentVolumeClaim ¶
func MakePersistentVolumeClaim() *PersistentVolumeClaimWrapper
MakePersistentVolumeClaim creates a PersistentVolumeClaim wrapper.
func (*PersistentVolumeClaimWrapper) AccessModes ¶
func (p *PersistentVolumeClaimWrapper) AccessModes(accessModes []v1.PersistentVolumeAccessMode) *PersistentVolumeClaimWrapper
AccessModes sets `accessModes` as the access modes of the inner PersistentVolumeClaim.
func (*PersistentVolumeClaimWrapper) Annotation ¶
func (p *PersistentVolumeClaimWrapper) Annotation(key, value string) *PersistentVolumeClaimWrapper
Annotation sets a {k,v} pair to the inner PersistentVolumeClaim.
func (*PersistentVolumeClaimWrapper) Name ¶
func (p *PersistentVolumeClaimWrapper) Name(s string) *PersistentVolumeClaimWrapper
Name sets `s` as the name of the inner PersistentVolumeClaim.
func (*PersistentVolumeClaimWrapper) Namespace ¶
func (p *PersistentVolumeClaimWrapper) Namespace(s string) *PersistentVolumeClaimWrapper
Namespace sets `s` as the namespace of the inner PersistentVolumeClaim.
func (*PersistentVolumeClaimWrapper) Obj ¶
func (p *PersistentVolumeClaimWrapper) Obj() *v1.PersistentVolumeClaim
Obj returns the inner PersistentVolumeClaim.
func (*PersistentVolumeClaimWrapper) Resources ¶
func (p *PersistentVolumeClaimWrapper) Resources(resources v1.ResourceRequirements) *PersistentVolumeClaimWrapper
Resources sets `resources` as the resource requirements of the inner PersistentVolumeClaim.
func (*PersistentVolumeClaimWrapper) VolumeName ¶
func (p *PersistentVolumeClaimWrapper) VolumeName(name string) *PersistentVolumeClaimWrapper
VolumeName sets `name` as the volume name of the inner PersistentVolumeClaim.
type PersistentVolumeWrapper ¶
type PersistentVolumeWrapper struct{ v1.PersistentVolume }
PersistentVolumeWrapper wraps a PersistentVolume inside.
func MakePersistentVolume ¶
func MakePersistentVolume() *PersistentVolumeWrapper
MakePersistentVolume creates a PersistentVolume wrapper.
func (*PersistentVolumeWrapper) AccessModes ¶
func (p *PersistentVolumeWrapper) AccessModes(accessModes []v1.PersistentVolumeAccessMode) *PersistentVolumeWrapper
AccessModes sets `accessModes` as the access modes of the inner PersistentVolume.
func (*PersistentVolumeWrapper) Capacity ¶
func (p *PersistentVolumeWrapper) Capacity(capacity v1.ResourceList) *PersistentVolumeWrapper
Capacity sets `capacity` as the resource list of the inner PersistentVolume.
func (*PersistentVolumeWrapper) HostPathVolumeSource ¶
func (p *PersistentVolumeWrapper) HostPathVolumeSource(src *v1.HostPathVolumeSource) *PersistentVolumeWrapper
HostPathVolumeSource sets `src` as the host path volume source of the inner PersistentVolume.
func (*PersistentVolumeWrapper) Name ¶
func (p *PersistentVolumeWrapper) Name(s string) *PersistentVolumeWrapper
Name sets `s` as the name of the inner PersistentVolume.
func (*PersistentVolumeWrapper) Obj ¶
func (p *PersistentVolumeWrapper) Obj() *v1.PersistentVolume
Obj returns the inner PersistentVolume.
type PodAffinityKind ¶
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 PodSchedulingWrapper ¶
type PodSchedulingWrapper struct {
resourcev1alpha2.PodSchedulingContext
}
PodSchedulingWrapper wraps a PodSchedulingContext inside.
func FromPodSchedulingContexts ¶
func FromPodSchedulingContexts(other *resourcev1alpha2.PodSchedulingContext) *PodSchedulingWrapper
FromPodSchedulingContexts creates a PodSchedulingContext wrapper from an existing object.
func MakePodSchedulingContexts ¶
func MakePodSchedulingContexts() *PodSchedulingWrapper
MakePodSchedulingContexts creates a PodSchedulingContext wrapper.
func (*PodSchedulingWrapper) Label ¶
func (wrapper *PodSchedulingWrapper) Label(k, v string) *PodSchedulingWrapper
Label applies a {k,v} label pair to the inner object
func (*PodSchedulingWrapper) Name ¶
func (wrapper *PodSchedulingWrapper) Name(s string) *PodSchedulingWrapper
Name sets `s` as the name of the inner object.
func (*PodSchedulingWrapper) Namespace ¶
func (wrapper *PodSchedulingWrapper) Namespace(s string) *PodSchedulingWrapper
Namespace sets `s` as the namespace of the inner object.
func (*PodSchedulingWrapper) Obj ¶
func (wrapper *PodSchedulingWrapper) Obj() *resourcev1alpha2.PodSchedulingContext
Obj returns the inner object.
func (*PodSchedulingWrapper) OwnerReference ¶
func (wrapper *PodSchedulingWrapper) OwnerReference(name, uid string, gvk schema.GroupVersionKind) *PodSchedulingWrapper
OwnerReference updates the owning controller of the inner object.
func (*PodSchedulingWrapper) PotentialNodes ¶
func (wrapper *PodSchedulingWrapper) PotentialNodes(nodes ...string) *PodSchedulingWrapper
PotentialNodes sets that field of the inner object.
func (*PodSchedulingWrapper) ResourceClaims ¶
func (wrapper *PodSchedulingWrapper) ResourceClaims(statuses ...resourcev1alpha2.ResourceClaimSchedulingStatus) *PodSchedulingWrapper
ResourceClaims sets that field of the inner object.
func (*PodSchedulingWrapper) SelectedNode ¶
func (wrapper *PodSchedulingWrapper) SelectedNode(s string) *PodSchedulingWrapper
SelectedNode sets that field of the inner object.
func (*PodSchedulingWrapper) UID ¶
func (wrapper *PodSchedulingWrapper) UID(s string) *PodSchedulingWrapper
UID sets `s` as the UID of the inner object.
type PodWrapper ¶
PodWrapper wraps a Pod inside.
func (*PodWrapper) Annotation ¶
func (p *PodWrapper) Annotation(key, value string) *PodWrapper
Annotation sets a {k,v} pair to the inner pod annotation.
func (*PodWrapper) Annotations ¶
func (p *PodWrapper) Annotations(annotations map[string]string) *PodWrapper
Annotations sets all {k,v} pair provided by `annotations` to the inner pod annotations.
func (*PodWrapper) Condition ¶
func (p *PodWrapper) Condition(t v1.PodConditionType, s v1.ConditionStatus, r string) *PodWrapper
Condition adds a `condition(Type, Status, Reason)` to .Status.Conditions.
func (*PodWrapper) Conditions ¶
func (p *PodWrapper) Conditions(conditions []v1.PodCondition) *PodWrapper
Conditions sets `conditions` as .status.Conditions of the inner pod.
func (*PodWrapper) Container ¶
func (p *PodWrapper) Container(s string) *PodWrapper
Container appends a container into PodSpec of the inner pod.
func (*PodWrapper) ContainerPort ¶
func (p *PodWrapper) ContainerPort(ports []v1.ContainerPort) *PodWrapper
ContainerPort creates a container with ports valued `ports`, and injects into the inner pod.
func (*PodWrapper) Containers ¶
func (p *PodWrapper) Containers(containers []v1.Container) *PodWrapper
Containers sets `containers` to the PodSpec of the inner pod.
func (*PodWrapper) CreationTimestamp ¶
func (p *PodWrapper) CreationTimestamp(t metav1.Time) *PodWrapper
CreationTimestamp sets the inner pod's CreationTimestamp.
func (*PodWrapper) HostPort ¶
func (p *PodWrapper) HostPort(port int32) *PodWrapper
HostPort creates a container with a hostPort valued `hostPort`, and injects into the inner pod.
func (*PodWrapper) InitReq ¶
func (p *PodWrapper) InitReq(resMap map[v1.ResourceName]string) *PodWrapper
InitReq adds a new init container to the inner pod with given resource map.
func (*PodWrapper) Label ¶
func (p *PodWrapper) Label(k, v string) *PodWrapper
Label sets a {k,v} pair to the inner pod label.
func (*PodWrapper) Labels ¶
func (p *PodWrapper) Labels(labels map[string]string) *PodWrapper
Labels sets all {k,v} pair provided by `labels` to the inner pod labels.
func (*PodWrapper) Lim ¶
func (p *PodWrapper) Lim(limMap map[v1.ResourceName]string) *PodWrapper
Lim adds a new container to the inner pod with given resource map of limits.
func (*PodWrapper) Name ¶
func (p *PodWrapper) Name(s string) *PodWrapper
Name sets `s` as the name of the inner pod.
func (*PodWrapper) Namespace ¶
func (p *PodWrapper) Namespace(s string) *PodWrapper
Namespace sets `s` as the namespace of the inner pod.
func (*PodWrapper) Node ¶
func (p *PodWrapper) Node(s string) *PodWrapper
Node sets `s` as the nodeName of the inner pod.
func (*PodWrapper) NodeAffinityIn ¶
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 ¶
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 ¶
func (p *PodWrapper) NodeSelector(m map[string]string) *PodWrapper
NodeSelector sets `m` as the nodeSelector of the inner pod.
func (*PodWrapper) NominatedNodeName ¶
func (p *PodWrapper) NominatedNodeName(n string) *PodWrapper
NominatedNodeName sets `n` as the .Status.NominatedNodeName of the inner pod.
func (*PodWrapper) Overhead ¶
func (p *PodWrapper) Overhead(rl v1.ResourceList) *PodWrapper
Overhead sets the give ResourceList to the inner pod
func (*PodWrapper) OwnerReference ¶
func (p *PodWrapper) OwnerReference(name string, gvk schema.GroupVersionKind) *PodWrapper
OwnerReference updates the owning controller of the pod.
func (*PodWrapper) PVC ¶
func (p *PodWrapper) PVC(name string) *PodWrapper
PVC creates a Volume with a PVC and injects into the inner pod.
func (*PodWrapper) Phase ¶
func (p *PodWrapper) Phase(phase v1.PodPhase) *PodWrapper
Phase sets `phase` as .status.Phase of the inner pod.
func (*PodWrapper) PodAffinity ¶
func (p *PodWrapper) PodAffinity(topologyKey string, labelSelector *metav1.LabelSelector, kind PodAffinityKind) *PodWrapper
PodAffinity creates a PodAffinity with topology key and label selector and injects into the inner pod.
func (*PodWrapper) PodAffinityExists ¶
func (p *PodWrapper) PodAffinityExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper
PodAffinityExists creates a PodAffinity with the operator "Exists" and injects into the inner pod.
func (*PodWrapper) PodAffinityIn ¶
func (p *PodWrapper) PodAffinityIn(labelKey, topologyKey string, vals []string, kind PodAffinityKind) *PodWrapper
PodAffinityIn creates a PodAffinity with the operator "In" and injects into the inner pod.
func (*PodWrapper) PodAffinityNotExists ¶
func (p *PodWrapper) PodAffinityNotExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper
PodAffinityNotExists creates a PodAffinity with the operator "NotExists" and injects into the inner pod.
func (*PodWrapper) PodAffinityNotIn ¶
func (p *PodWrapper) PodAffinityNotIn(labelKey, topologyKey string, vals []string, kind PodAffinityKind) *PodWrapper
PodAffinityNotIn creates a PodAffinity with the operator "NotIn" and injects into the inner pod.
func (*PodWrapper) PodAntiAffinity ¶
func (p *PodWrapper) PodAntiAffinity(topologyKey string, labelSelector *metav1.LabelSelector, kind PodAffinityKind) *PodWrapper
PodAntiAffinity creates a PodAntiAffinity with topology key and label selector and injects into the inner pod.
func (*PodWrapper) PodAntiAffinityExists ¶
func (p *PodWrapper) PodAntiAffinityExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper
PodAntiAffinityExists creates a PodAntiAffinity with the operator "Exists" and injects into the inner pod.
func (*PodWrapper) PodAntiAffinityIn ¶
func (p *PodWrapper) PodAntiAffinityIn(labelKey, topologyKey string, vals []string, kind PodAffinityKind) *PodWrapper
PodAntiAffinityIn creates a PodAntiAffinity with the operator "In" and injects into the inner pod.
func (*PodWrapper) PodAntiAffinityNotExists ¶
func (p *PodWrapper) PodAntiAffinityNotExists(labelKey, topologyKey string, kind PodAffinityKind) *PodWrapper
PodAntiAffinityNotExists creates a PodAntiAffinity with the operator "NotExists" and injects into the inner pod.
func (*PodWrapper) PodAntiAffinityNotIn ¶
func (p *PodWrapper) PodAntiAffinityNotIn(labelKey, topologyKey string, vals []string, kind PodAffinityKind) *PodWrapper
PodAntiAffinityNotIn creates a PodAntiAffinity with the operator "NotIn" and injects into the inner pod.
func (*PodWrapper) PodResourceClaims ¶
func (p *PodWrapper) PodResourceClaims(podResourceClaims ...v1.PodResourceClaim) *PodWrapper
PodResourceClaims appends PodResourceClaims into PodSpec of the inner pod.
func (*PodWrapper) PreemptionPolicy ¶
func (p *PodWrapper) PreemptionPolicy(policy v1.PreemptionPolicy) *PodWrapper
PreemptionPolicy sets the give preemption policy to the inner pod.
func (*PodWrapper) Priority ¶
func (p *PodWrapper) Priority(val int32) *PodWrapper
Priority sets a priority value into PodSpec of the inner pod.
func (*PodWrapper) Req ¶
func (p *PodWrapper) Req(reqMap map[v1.ResourceName]string) *PodWrapper
Req adds a new container to the inner pod with given resource map of requests.
func (*PodWrapper) Res ¶
func (p *PodWrapper) Res(resMap map[v1.ResourceName]string) *PodWrapper
Res adds a new container to the inner pod with given resource map.
func (*PodWrapper) SchedulerName ¶
func (p *PodWrapper) SchedulerName(s string) *PodWrapper
SchedulerName sets `s` as the scheduler name of the inner pod.
func (*PodWrapper) SchedulingGates ¶
func (p *PodWrapper) SchedulingGates(gates []string) *PodWrapper
SchedulingGates sets `gates` as additional SchedulerGates of the inner pod.
func (*PodWrapper) SpreadConstraint ¶
func (p *PodWrapper) SpreadConstraint(maxSkew int, tpKey string, mode v1.UnsatisfiableConstraintAction, selector *metav1.LabelSelector, minDomains *int32, nodeAffinityPolicy, nodeTaintsPolicy *v1.NodeInclusionPolicy, matchLabelKeys []string) *PodWrapper
SpreadConstraint constructs a TopologySpreadConstraint object and injects into the inner pod.
func (*PodWrapper) StartTime ¶
func (p *PodWrapper) StartTime(t metav1.Time) *PodWrapper
StartTime sets `t` as .status.startTime for the inner pod.
func (*PodWrapper) Terminating ¶
func (p *PodWrapper) Terminating() *PodWrapper
Terminating sets the inner pod's deletionTimestamp to current timestamp.
func (*PodWrapper) Toleration ¶
func (p *PodWrapper) Toleration(key string) *PodWrapper
Toleration creates a toleration (with the operator Exists) and injects into the inner pod.
func (*PodWrapper) UID ¶
func (p *PodWrapper) UID(s string) *PodWrapper
UID sets `s` as the UID of the inner pod.
func (*PodWrapper) Volume ¶
func (p *PodWrapper) Volume(volume v1.Volume) *PodWrapper
Volume creates volume and injects into the inner pod.
func (*PodWrapper) ZeroTerminationGracePeriod ¶
func (p *PodWrapper) ZeroTerminationGracePeriod() *PodWrapper
ZeroTerminationGracePeriod sets the TerminationGracePeriodSeconds of the inner pod to zero.
type PriorityConfig ¶
type PriorityConfig struct { Function PriorityFunc Weight int64 }
PriorityConfig is used in fake extender to perform Prioritize function.
type PriorityFunc ¶
PriorityFunc is a function type which is used in fake extender.
type RegisterPluginFunc ¶
type RegisterPluginFunc func(reg *runtime.Registry, profile *schedulerapi.KubeSchedulerProfile)
RegisterPluginFunc is a function signature used in method RegisterFilterPlugin() to register a Filter Plugin to a given registry.
func RegisterBindPlugin ¶
func RegisterBindPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
RegisterBindPlugin returns a function to register a Bind Plugin to a given registry.
func RegisterFilterPlugin ¶
func RegisterFilterPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
RegisterFilterPlugin returns a function to register a Filter Plugin to a given registry.
func RegisterPermitPlugin ¶
func RegisterPermitPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
RegisterPermitPlugin returns a function to register a Permit Plugin to a given registry.
func RegisterPluginAsExtensions ¶
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 ¶
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 ¶
func RegisterPreBindPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
RegisterPreBindPlugin returns a function to register a PreBind Plugin to a given registry.
func RegisterPreFilterPlugin ¶
func RegisterPreFilterPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
RegisterPreFilterPlugin returns a function to register a PreFilter Plugin to a given registry.
func RegisterPreScorePlugin ¶
func RegisterPreScorePlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
RegisterPreScorePlugin returns a function to register a Score Plugin to a given registry.
func RegisterQueueSortPlugin ¶
func RegisterQueueSortPlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
RegisterQueueSortPlugin returns a function to register a QueueSort Plugin to a given registry.
func RegisterReservePlugin ¶
func RegisterReservePlugin(pluginName string, pluginNewFunc runtime.PluginFactory) RegisterPluginFunc
RegisterReservePlugin returns a function to register a Reserve Plugin to a given registry.
func RegisterScorePlugin ¶
func RegisterScorePlugin(pluginName string, pluginNewFunc runtime.PluginFactory, weight int32) RegisterPluginFunc
RegisterScorePlugin returns a function to register a Score Plugin to a given registry.
type ResourceClaimWrapper ¶
type ResourceClaimWrapper struct{ resourcev1alpha2.ResourceClaim }
ResourceClaimWrapper wraps a ResourceClaim inside.
func FromResourceClaim ¶
func FromResourceClaim(other *resourcev1alpha2.ResourceClaim) *ResourceClaimWrapper
FromResourceClaim creates a ResourceClaim wrapper from some existing object.
func MakeResourceClaim ¶
func MakeResourceClaim() *ResourceClaimWrapper
MakeResourceClaim creates a ResourceClaim wrapper.
func (*ResourceClaimWrapper) Allocation ¶
func (wrapper *ResourceClaimWrapper) Allocation(allocation *resourcev1alpha2.AllocationResult) *ResourceClaimWrapper
Allocation sets the allocation of the inner object.
func (*ResourceClaimWrapper) AllocationMode ¶
func (wrapper *ResourceClaimWrapper) AllocationMode(a resourcev1alpha2.AllocationMode) *ResourceClaimWrapper
AllocationMode sets the allocation mode of the inner object.
func (*ResourceClaimWrapper) DeallocationRequested ¶
func (wrapper *ResourceClaimWrapper) DeallocationRequested(deallocationRequested bool) *ResourceClaimWrapper
DeallocationRequested sets that field of the inner object.
func (*ResourceClaimWrapper) Name ¶
func (wrapper *ResourceClaimWrapper) Name(s string) *ResourceClaimWrapper
Name sets `s` as the name of the inner object.
func (*ResourceClaimWrapper) Namespace ¶
func (wrapper *ResourceClaimWrapper) Namespace(s string) *ResourceClaimWrapper
Namespace sets `s` as the namespace of the inner object.
func (*ResourceClaimWrapper) Obj ¶
func (wrapper *ResourceClaimWrapper) Obj() *resourcev1alpha2.ResourceClaim
Obj returns the inner ResourceClaim.
func (*ResourceClaimWrapper) OwnerReference ¶
func (wrapper *ResourceClaimWrapper) OwnerReference(name, uid string, gvk schema.GroupVersionKind) *ResourceClaimWrapper
OwnerReference updates the owning controller of the object.
func (*ResourceClaimWrapper) ReservedFor ¶
func (wrapper *ResourceClaimWrapper) ReservedFor(consumers ...resourcev1alpha2.ResourceClaimConsumerReference) *ResourceClaimWrapper
ReservedFor sets that field of the inner object.
func (*ResourceClaimWrapper) ResourceClassName ¶
func (wrapper *ResourceClaimWrapper) ResourceClassName(name string) *ResourceClaimWrapper
ResourceClassName sets the resource class name of the inner object.
func (*ResourceClaimWrapper) UID ¶
func (wrapper *ResourceClaimWrapper) UID(s string) *ResourceClaimWrapper
UID sets `s` as the UID of the inner object.
type TrueFilterPlugin ¶
type TrueFilterPlugin struct{}
TrueFilterPlugin is a filter plugin which always return Success when Filter function is called.
func (*TrueFilterPlugin) Filter ¶
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 ¶
func (pl *TrueFilterPlugin) Name() string
Name returns name of the plugin.