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, _ framework.SchedulerFrameworkHandle, ...) (framework.Plugin, error)
- func NewMatchFilterPlugin(_ runtime.Object, _ framework.SchedulerFrameworkHandle, ...) (framework.Plugin, error)
- func NewSchedulerFrameworkHandle(client clientset.Interface, crdClient godelclient.Interface, ...) (framework.SchedulerFrameworkHandle, error)
- func NewSchedulerFrameworkHandleWithPodGroup(client clientset.Interface, crdClient godelclient.Interface, ...) (framework.SchedulerFrameworkHandle, error)
- func NewSchedulerPodFramework(pluginRegistry framework.PluginMap, orderedPluginRegistry framework.PluginList, ...) (framework.SchedulerFramework, error)
- func NewTrueFilterPlugin(_ runtime.Object, _ framework.SchedulerFrameworkHandle, ...) (framework.Plugin, error)
- type FakeFilterPlugin
- type FakePreFilterPlugin
- type FalseFilterPlugin
- type MatchFilterPlugin
- type MockSchedulerFrameworkHandle
- func (mfh *MockSchedulerFrameworkHandle) CRDSharedInformerFactory() crdinformers.SharedInformerFactory
- func (mfh *MockSchedulerFrameworkHandle) CachePreemptionPolicy(deployName string, policyName string)
- func (mfh *MockSchedulerFrameworkHandle) CleanupPreemptionPolicyForPodOwner()
- func (mfh *MockSchedulerFrameworkHandle) ClientSet() clientset.Interface
- func (mfh *MockSchedulerFrameworkHandle) GetFrameworkForPod(pod *v1.Pod) (f framework.SchedulerFramework, err error)
- func (mfh *MockSchedulerFrameworkHandle) GetLoadAwareNodeMetricInfo(nodeName string, resourceType podutil.PodResourceType) *framework.LoadAwareNodeMetricInfo
- func (mfh *MockSchedulerFrameworkHandle) GetLoadAwareNodeUsage(nodeName string, resourceType podutil.PodResourceType) *framework.LoadAwareNodeUsage
- func (mfh *MockSchedulerFrameworkHandle) GetOwnerLabels(ownerType, ownerKey string) map[string]string
- func (mfh *MockSchedulerFrameworkHandle) GetPDBItemList() []framework.PDBItem
- func (mfh *MockSchedulerFrameworkHandle) GetPDBItemListForOwner(ownerType, ownerKey string) (bool, bool, []string)
- func (mfh *MockSchedulerFrameworkHandle) GetPodGroupInfo(podGroupName string) (*schedulingv1a1.PodGroup, error)
- func (mfh *MockSchedulerFrameworkHandle) GetPotentialVictims(node string) []string
- func (mfh *MockSchedulerFrameworkHandle) GetPreemptionFrameworkForPod(_ *v1.Pod) framework.SchedulerPreemptionFramework
- func (mfh *MockSchedulerFrameworkHandle) GetPreemptionPolicy(deployName string) string
- func (mfh *MockSchedulerFrameworkHandle) SchedulerName() string
- func (mfh *MockSchedulerFrameworkHandle) SetPotentialVictims(node string, potentialVictims []string)
- func (mfh *MockSchedulerFrameworkHandle) SharedInformerFactory() informers.SharedInformerFactory
- func (mfh *MockSchedulerFrameworkHandle) SnapshotSharedLister() framework.SharedLister
- func (mfh *MockSchedulerFrameworkHandle) SubCluster() string
- func (mfh *MockSchedulerFrameworkHandle) 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, _ framework.SchedulerFrameworkHandle, _ framework.BinderFrameworkHandle) (framework.Plugin, error)
NewFalseFilterPlugin initializes a FalseFilterPlugin and returns it.
func NewMatchFilterPlugin ¶
func NewMatchFilterPlugin(_ runtime.Object, _ framework.SchedulerFrameworkHandle, _ framework.BinderFrameworkHandle) (framework.Plugin, error)
NewMatchFilterPlugin initializes a MatchFilterPlugin and returns it.
func NewSchedulerFrameworkHandle ¶
func NewSchedulerFrameworkHandle( 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, ) (framework.SchedulerFrameworkHandle, error)
func NewSchedulerFrameworkHandleWithPodGroup ¶
func NewSchedulerFrameworkHandleWithPodGroup( client clientset.Interface, crdClient godelclient.Interface, informerFactory informers.SharedInformerFactory, snapshot *godelcache.Snapshot, podGroupInfoCache map[string]*schedulingv1a1.PodGroup, ) (framework.SchedulerFrameworkHandle, 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, _ framework.SchedulerFrameworkHandle, _ framework.BinderFrameworkHandle) (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 MockSchedulerFrameworkHandle ¶
type MockSchedulerFrameworkHandle struct {
// contains filtered or unexported fields
}
func (*MockSchedulerFrameworkHandle) CRDSharedInformerFactory ¶
func (mfh *MockSchedulerFrameworkHandle) CRDSharedInformerFactory() crdinformers.SharedInformerFactory
func (*MockSchedulerFrameworkHandle) CachePreemptionPolicy ¶
func (mfh *MockSchedulerFrameworkHandle) CachePreemptionPolicy(deployName string, policyName string)
func (*MockSchedulerFrameworkHandle) CleanupPreemptionPolicyForPodOwner ¶
func (mfh *MockSchedulerFrameworkHandle) CleanupPreemptionPolicyForPodOwner()
func (*MockSchedulerFrameworkHandle) ClientSet ¶
func (mfh *MockSchedulerFrameworkHandle) ClientSet() clientset.Interface
func (*MockSchedulerFrameworkHandle) GetFrameworkForPod ¶
func (mfh *MockSchedulerFrameworkHandle) GetFrameworkForPod(pod *v1.Pod) (f framework.SchedulerFramework, err error)
func (*MockSchedulerFrameworkHandle) GetLoadAwareNodeMetricInfo ¶
func (mfh *MockSchedulerFrameworkHandle) GetLoadAwareNodeMetricInfo(nodeName string, resourceType podutil.PodResourceType) *framework.LoadAwareNodeMetricInfo
func (*MockSchedulerFrameworkHandle) GetLoadAwareNodeUsage ¶
func (mfh *MockSchedulerFrameworkHandle) GetLoadAwareNodeUsage(nodeName string, resourceType podutil.PodResourceType) *framework.LoadAwareNodeUsage
func (*MockSchedulerFrameworkHandle) GetOwnerLabels ¶
func (mfh *MockSchedulerFrameworkHandle) GetOwnerLabels(ownerType, ownerKey string) map[string]string
func (*MockSchedulerFrameworkHandle) GetPDBItemList ¶
func (mfh *MockSchedulerFrameworkHandle) GetPDBItemList() []framework.PDBItem
func (*MockSchedulerFrameworkHandle) GetPDBItemListForOwner ¶
func (mfh *MockSchedulerFrameworkHandle) GetPDBItemListForOwner(ownerType, ownerKey string) (bool, bool, []string)
func (*MockSchedulerFrameworkHandle) GetPodGroupInfo ¶
func (mfh *MockSchedulerFrameworkHandle) GetPodGroupInfo(podGroupName string) (*schedulingv1a1.PodGroup, error)
func (*MockSchedulerFrameworkHandle) GetPotentialVictims ¶
func (mfh *MockSchedulerFrameworkHandle) GetPotentialVictims(node string) []string
func (*MockSchedulerFrameworkHandle) GetPreemptionFrameworkForPod ¶
func (mfh *MockSchedulerFrameworkHandle) GetPreemptionFrameworkForPod(_ *v1.Pod) framework.SchedulerPreemptionFramework
func (*MockSchedulerFrameworkHandle) GetPreemptionPolicy ¶
func (mfh *MockSchedulerFrameworkHandle) GetPreemptionPolicy(deployName string) string
func (*MockSchedulerFrameworkHandle) SchedulerName ¶
func (mfh *MockSchedulerFrameworkHandle) SchedulerName() string
func (*MockSchedulerFrameworkHandle) SetPotentialVictims ¶
func (mfh *MockSchedulerFrameworkHandle) SetPotentialVictims(node string, potentialVictims []string)
func (*MockSchedulerFrameworkHandle) SharedInformerFactory ¶
func (mfh *MockSchedulerFrameworkHandle) SharedInformerFactory() informers.SharedInformerFactory
func (*MockSchedulerFrameworkHandle) SnapshotSharedLister ¶
func (mfh *MockSchedulerFrameworkHandle) SnapshotSharedLister() framework.SharedLister
func (*MockSchedulerFrameworkHandle) SubCluster ¶
func (mfh *MockSchedulerFrameworkHandle) SubCluster() string
func (*MockSchedulerFrameworkHandle) SwitchType ¶
func (mfh *MockSchedulerFrameworkHandle) 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.