Documentation ¶
Index ¶
- Constants
- func NewFakeFilterPlugin(failedNodeReturnCodeMap map[string]framework.Code) (framework.Plugin, error)
- func NewFakePreFilterPlugin(status *framework.Status) (framework.Plugin, error)
- func NewFalseFilterPlugin(_ runtime.Object, _ handle.PodFrameworkHandle, _ handle.PodFrameworkHandle) (framework.Plugin, error)
- func NewMatchFilterPlugin(_ runtime.Object, _ handle.PodFrameworkHandle, _ handle.PodFrameworkHandle) (framework.Plugin, error)
- func NewPodFrameworkHandle(client clientset.Interface, crdClient godelclient.Interface, ...) (handle.PodFrameworkHandle, error)
- func NewSchedulerPodFramework(pluginRegistry framework.PluginMap, orderedPluginRegistry framework.PluginList, ...) (framework.SchedulerFramework, error)
- func NewTrueFilterPlugin(_ runtime.Object, _ handle.PodFrameworkHandle, _ handle.PodFrameworkHandle) (framework.Plugin, error)
- type FakeFilterPlugin
- type FakePreFilterPlugin
- type FalseFilterPlugin
- type MatchFilterPlugin
- type MockPodFrameworkHandle
- func (mfh *MockPodFrameworkHandle) CRDSharedInformerFactory() crdinformers.SharedInformerFactory
- func (mfh *MockPodFrameworkHandle) CachePreemptionPolicy(deployName string, policyName string)
- func (mfh *MockPodFrameworkHandle) CleanupPreemptionPolicyForPodOwner()
- func (mfh *MockPodFrameworkHandle) ClientSet() clientset.Interface
- func (mfh *MockPodFrameworkHandle) FindStore(storeName commonstore.StoreName) commonstore.Store
- func (mfh *MockPodFrameworkHandle) GetFrameworkForPod(pod *v1.Pod) (f framework.SchedulerFramework, err error)
- func (mfh *MockPodFrameworkHandle) GetPotentialVictims(node string) []string
- func (mfh *MockPodFrameworkHandle) GetPreemptionFrameworkForPod(_ *v1.Pod) framework.SchedulerPreemptionFramework
- func (mfh *MockPodFrameworkHandle) GetPreemptionPolicy(deployName string) string
- func (mfh *MockPodFrameworkHandle) SchedulerName() string
- func (mfh *MockPodFrameworkHandle) SetPotentialVictims(node string, potentialVictims []string)
- func (mfh *MockPodFrameworkHandle) SharedInformerFactory() informers.SharedInformerFactory
- func (mfh *MockPodFrameworkHandle) SnapshotSharedLister() framework.SharedLister
- func (mfh *MockPodFrameworkHandle) SubCluster() string
- func (mfh *MockPodFrameworkHandle) SwitchType() framework.SwitchType
- type TrueFilterPlugin
Constants ¶
const ErrReasonFake = "Nodes failed the fake plugin"
ErrReasonFake is a fake error message denotes the filter function errored.
const TestSchedulerName = "test-scheduler"
Variables ¶
This section is empty.
Functions ¶
func NewFakeFilterPlugin ¶
func NewFakeFilterPlugin(failedNodeReturnCodeMap map[string]framework.Code) (framework.Plugin, error)
NewFakeFilterPlugin initializes a fakeFilterPlugin and returns it.
func NewFakePreFilterPlugin ¶
// NewFakePreFilterPlugin initializes a fakePreFilterPlugin and returns it.
func NewFalseFilterPlugin ¶
func NewFalseFilterPlugin(_ runtime.Object, _ handle.PodFrameworkHandle, _ handle.PodFrameworkHandle) (framework.Plugin, error)
NewFalseFilterPlugin initializes a FalseFilterPlugin and returns it.
func NewMatchFilterPlugin ¶
func NewMatchFilterPlugin(_ runtime.Object, _ handle.PodFrameworkHandle, _ handle.PodFrameworkHandle) (framework.Plugin, error)
NewMatchFilterPlugin initializes a MatchFilterPlugin and returns it.
func NewPodFrameworkHandle ¶
func NewPodFrameworkHandle( client clientset.Interface, crdClient godelclient.Interface, informerFactory informers.SharedInformerFactory, crdInformerFactory crdinformers.SharedInformerFactory, cache godelcache.SchedulerCache, snapshot *godelcache.Snapshot, pluginRegistry framework.PluginMap, preemptionPluginRegistry framework.PluginMap, orderedPluginRegistry framework.PluginList, basePlugins *framework.PluginCollection, ) (handle.PodFrameworkHandle, error)
func NewSchedulerPodFramework ¶
func NewSchedulerPodFramework(pluginRegistry framework.PluginMap, orderedPluginRegistry framework.PluginList, basePlugins, hardConstraints, softConstraints *framework.PluginCollection) (framework.SchedulerFramework, error)
func NewTrueFilterPlugin ¶
func NewTrueFilterPlugin(_ runtime.Object, _ handle.PodFrameworkHandle, _ handle.PodFrameworkHandle) (framework.Plugin, error)
NewTrueFilterPlugin initializes a TrueFilterPlugin and returns it.
Types ¶
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, 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 FakePreFilterPlugin ¶
FakePreFilterPlugin is a test filter plugin.
func (*FakePreFilterPlugin) Name ¶
func (pl *FakePreFilterPlugin) Name() string
Name returns name of the plugin.
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, 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 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, 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 MockPodFrameworkHandle ¶
type MockPodFrameworkHandle struct {
// contains filtered or unexported fields
}
func (*MockPodFrameworkHandle) CRDSharedInformerFactory ¶
func (mfh *MockPodFrameworkHandle) CRDSharedInformerFactory() crdinformers.SharedInformerFactory
func (*MockPodFrameworkHandle) CachePreemptionPolicy ¶
func (mfh *MockPodFrameworkHandle) CachePreemptionPolicy(deployName string, policyName string)
func (*MockPodFrameworkHandle) CleanupPreemptionPolicyForPodOwner ¶
func (mfh *MockPodFrameworkHandle) CleanupPreemptionPolicyForPodOwner()
func (*MockPodFrameworkHandle) ClientSet ¶
func (mfh *MockPodFrameworkHandle) ClientSet() clientset.Interface
func (*MockPodFrameworkHandle) FindStore ¶
func (mfh *MockPodFrameworkHandle) FindStore(storeName commonstore.StoreName) commonstore.Store
func (*MockPodFrameworkHandle) GetFrameworkForPod ¶
func (mfh *MockPodFrameworkHandle) GetFrameworkForPod(pod *v1.Pod) (f framework.SchedulerFramework, err error)
func (*MockPodFrameworkHandle) GetPotentialVictims ¶
func (mfh *MockPodFrameworkHandle) GetPotentialVictims(node string) []string
func (*MockPodFrameworkHandle) GetPreemptionFrameworkForPod ¶
func (mfh *MockPodFrameworkHandle) GetPreemptionFrameworkForPod(_ *v1.Pod) framework.SchedulerPreemptionFramework
func (*MockPodFrameworkHandle) GetPreemptionPolicy ¶
func (mfh *MockPodFrameworkHandle) GetPreemptionPolicy(deployName string) string
func (*MockPodFrameworkHandle) SchedulerName ¶
func (mfh *MockPodFrameworkHandle) SchedulerName() string
func (*MockPodFrameworkHandle) SetPotentialVictims ¶
func (mfh *MockPodFrameworkHandle) SetPotentialVictims(node string, potentialVictims []string)
func (*MockPodFrameworkHandle) SharedInformerFactory ¶
func (mfh *MockPodFrameworkHandle) SharedInformerFactory() informers.SharedInformerFactory
func (*MockPodFrameworkHandle) SnapshotSharedLister ¶
func (mfh *MockPodFrameworkHandle) SnapshotSharedLister() framework.SharedLister
func (*MockPodFrameworkHandle) SubCluster ¶
func (mfh *MockPodFrameworkHandle) SubCluster() string
func (*MockPodFrameworkHandle) SwitchType ¶
func (mfh *MockPodFrameworkHandle) SwitchType() framework.SwitchType
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, 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.