kubernetes/test/integration/scheduler/plugins/plugins_test.go

var initRegistryAndConfig

// newPlugin returns a plugin factory with specified Plugin.
func newPlugin(plugin framework.Plugin) frameworkruntime.PluginFactory {}

type PreEnqueuePlugin

type PreFilterPlugin

type ScorePlugin

func (sp *ScorePlugin) deepCopy() *ScorePlugin {}

type ScoreWithNormalizePlugin

func (sp *ScoreWithNormalizePlugin) deepCopy() *ScoreWithNormalizePlugin {}

type FilterPlugin

func (fp *FilterPlugin) deepCopy() *FilterPlugin {}

type PostFilterPlugin

type ReservePlugin

type PreScorePlugin

type PreBindPlugin

func (pp *PreBindPlugin) set(fail, reject, succeed bool) {}

func (pp *PreBindPlugin) deepCopy() *PreBindPlugin {}

type BindPlugin

func (bp *BindPlugin) deepCopy() *BindPlugin {}

type PostBindPlugin

func (pp *PostBindPlugin) deepCopy() *PostBindPlugin {}

type PermitPlugin

func (pp *PermitPlugin) deepCopy() *PermitPlugin {}

const enqueuePluginName

const prefilterPluginName

const postfilterPluginName

const scorePluginName

const scoreWithNormalizePluginName

const filterPluginName

const preScorePluginName

const reservePluginName

const preBindPluginName

const postBindPluginName

const permitPluginName

var _

var _

var _

var _

var _

var _

var _

var _

var _

var _

var _

var _

var _

func (ep *PreEnqueuePlugin) Name() string {}

func (ep *PreEnqueuePlugin) PreEnqueue(ctx context.Context, p *v1.Pod) *framework.Status {}

// Name returns name of the score plugin.
func (sp *ScorePlugin) Name() string {}

// Score returns the score of scheduling a pod on a specific node.
func (sp *ScorePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status) {}

func (sp *ScorePlugin) ScoreExtensions() framework.ScoreExtensions {}

// Name returns name of the score plugin.
func (sp *ScoreWithNormalizePlugin) Name() string {}

// Score returns the score of scheduling a pod on a specific node.
func (sp *ScoreWithNormalizePlugin) Score(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (int64, *framework.Status) {}

func (sp *ScoreWithNormalizePlugin) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {}

func (sp *ScoreWithNormalizePlugin) ScoreExtensions() framework.ScoreExtensions {}

// Name returns name of the plugin.
func (fp *FilterPlugin) Name() string {}

// Filter is a test function that returns an error or nil, depending on the
// value of "failFilter".
func (fp *FilterPlugin) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status {}

// Name returns name of the plugin.
func (rp *ReservePlugin) Name() string {}

// Reserve is a test function that increments an intenral counter and returns
// an error or nil, depending on the value of "failReserve".
func (rp *ReservePlugin) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status {}

// Unreserve is a test function that increments an internal counter and emits
// an event to a channel. While Unreserve implementations should normally be
// idempotent, we relax that requirement here for testing purposes.
func (rp *ReservePlugin) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) {}

// Name returns name of the plugin.
func (*PreScorePlugin) Name() string {}

// PreScore is a test function.
func (pfp *PreScorePlugin) PreScore(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, _ []*framework.NodeInfo) *framework.Status {}

// Name returns name of the plugin.
func (pp *PreBindPlugin) Name() string {}

// PreBind is a test function that returns (true, nil) or errors for testing.
func (pp *PreBindPlugin) PreBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status {}

const bindPluginAnnotation

func (bp *BindPlugin) Name() string {}

func (bp *BindPlugin) Bind(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) *framework.Status {}

// Name returns name of the plugin.
func (pp *PostBindPlugin) Name() string {}

// PostBind is a test function, which counts the number of times called.
func (pp *PostBindPlugin) PostBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) {}

// Name returns name of the plugin.
func (pp *PreFilterPlugin) Name() string {}

// Extensions returns the PreFilterExtensions interface.
func (pp *PreFilterPlugin) PreFilterExtensions() framework.PreFilterExtensions {}

// PreFilter is a test function that returns (true, nil) or errors for testing.
func (pp *PreFilterPlugin) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) {}

// Name returns name of the plugin.
func (pp *PostFilterPlugin) Name() string {}

func (pp *PostFilterPlugin) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, _ framework.NodeToStatusReader) (*framework.PostFilterResult, *framework.Status) {}

// Name returns name of the plugin.
func (pp *PermitPlugin) Name() string {}

// Permit implements the permit test plugin.
func (pp *PermitPlugin) Permit(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (*framework.Status, time.Duration) {}

// allowAllPods allows all waiting pods.
func (pp *PermitPlugin) allowAllPods() {}

// rejectAllPods rejects all waiting pods.
func (pp *PermitPlugin) rejectAllPods() {}

// TestPreFilterPlugin tests invocation of prefilter plugins.
func TestPreFilterPlugin(t *testing.T) {}

// TestPostFilterPlugin tests invocation of postFilter plugins.
func TestPostFilterPlugin(t *testing.T) {}

// TestScorePlugin tests invocation of score plugins.
func TestScorePlugin(t *testing.T) {}

// TestNormalizeScorePlugin tests invocation of normalize score plugins.
func TestNormalizeScorePlugin(t *testing.T) {}

// TestReservePlugin tests invocation of reserve plugins.
func TestReservePluginReserve(t *testing.T) {}

// TestPrebindPlugin tests invocation of prebind plugins.
func TestPrebindPlugin(t *testing.T) {}

// TestUnReserveReservePlugins tests invocation of the Unreserve operation in
// reserve plugins through failures in execution points such as pre-bind. Also
// tests that the order of invocation of Unreserve operation is executed in the
// reverse order of invocation of the Reserve operation.
func TestUnReserveReservePlugins(t *testing.T) {}

// TestUnReservePermitPlugins tests unreserve of Permit plugins.
func TestUnReservePermitPlugins(t *testing.T) {}

// TestUnReservePreBindPlugins tests unreserve of Prebind plugins.
func TestUnReservePreBindPlugins(t *testing.T) {}

// TestUnReserveBindPlugins tests unreserve of Bind plugins.
func TestUnReserveBindPlugins(t *testing.T) {}

type pluginInvokeEvent

func TestBindPlugin(t *testing.T) {}

// TestPostBindPlugin tests invocation of postbind plugins.
func TestPostBindPlugin(t *testing.T) {}

// TestPermitPlugin tests invocation of permit plugins.
func TestPermitPlugin(t *testing.T) {}

// TestMultiplePermitPlugins tests multiple permit plugins returning wait for a same pod.
func TestMultiplePermitPlugins(t *testing.T) {}

// TestPermitPluginsCancelled tests whether all permit plugins are cancelled when pod is rejected.
func TestPermitPluginsCancelled(t *testing.T) {}

// TestCoSchedulingWithPermitPlugin tests invocation of permit plugins.
func TestCoSchedulingWithPermitPlugin(t *testing.T) {}

// TestFilterPlugin tests invocation of filter plugins.
func TestFilterPlugin(t *testing.T) {}

// TestPreScorePlugin tests invocation of pre-score plugins.
func TestPreScorePlugin(t *testing.T) {}

// TestPreEnqueuePlugin tests invocation of enqueue plugins.
func TestPreEnqueuePlugin(t *testing.T) {}

// TestPreemptWithPermitPlugin tests preempt with permit plugins.
// It verifies how waitingPods behave in different scenarios:
// - when waitingPods get preempted
//   - they should be removed from internal waitingPods map, but not physically deleted
//   - it'd trigger moving unschedulable Pods, but not the waitingPods themselves
//
// - when waitingPods get deleted externally, it'd trigger moving unschedulable Pods
func TestPreemptWithPermitPlugin(t *testing.T) {}

const jobPluginName

var _

var _

type JobPlugin

func (j *JobPlugin) Name() string {}

func (j *JobPlugin) PreFilter(_ context.Context, _ *framework.CycleState, p *v1.Pod) (*framework.PreFilterResult, *framework.Status) {}

func (j *JobPlugin) PreFilterExtensions() framework.PreFilterExtensions {}

func (j *JobPlugin) PostBind(_ context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) {}

// This test simulates a typical spark job workflow.
//   - N executor pods are created, but kept pending due to missing the driver pod
//   - when the driver pod gets created and scheduled, proactively move the executors to activeQ
//     and thus accelerate the entire job workflow.
func TestActivatePods(t *testing.T) {}

var _

var _

var _

var _

const schedulingGatesPluginWithEvents

const schedulingGatesPluginWOEvents

type SchedulingGatesPluginWithEvents

func (pl *SchedulingGatesPluginWithEvents) Name() string {}

func (pl *SchedulingGatesPluginWithEvents) PreEnqueue(ctx context.Context, p *v1.Pod) *framework.Status {}

func (pl *SchedulingGatesPluginWithEvents) EventsToRegister(_ context.Context) ([]framework.ClusterEventWithHint, error) {}

type SchedulingGatesPluginWOEvents

func (pl *SchedulingGatesPluginWOEvents) Name() string {}

func (pl *SchedulingGatesPluginWOEvents) PreEnqueue(ctx context.Context, p *v1.Pod) *framework.Status {}

func (pl *SchedulingGatesPluginWOEvents) EventsToRegister(_ context.Context) ([]framework.ClusterEventWithHint, error) {}

// This test helps to verify registering nil events for PreEnqueue plugin works as expected.
func TestPreEnqueuePluginEventsToRegister(t *testing.T) {}