Documentation ¶
Overview ¶
Package topologyspreadconstraints features a scheduler plugin that enforces the topology spread constraints (if any) defined on a CRP.
Index ¶
- type Option
- type Plugin
- func (p *Plugin) Filter(_ context.Context, state framework.CycleStatePluginReadWriter, ...) (status *framework.Status)
- func (p *Plugin) Name() string
- func (p *Plugin) PostBatch(_ context.Context, _ framework.CycleStatePluginReadWriter, ...) (int, *framework.Status)
- func (p *Plugin) PreFilter(_ context.Context, state framework.CycleStatePluginReadWriter, ...) (status *framework.Status)
- func (p *Plugin) PreScore(_ context.Context, state framework.CycleStatePluginReadWriter, ...) (status *framework.Status)
- func (p *Plugin) Score(_ context.Context, state framework.CycleStatePluginReadWriter, ...) (score *framework.ClusterScore, status *framework.Status)
- func (p *Plugin) SetUpWithFramework(handle framework.Handle)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin is the scheduler plugin that enforces the topology spread constraints (if any) defined on a CRP.
func (*Plugin) Filter ¶
func (p *Plugin) Filter( _ context.Context, state framework.CycleStatePluginReadWriter, _ *placementv1beta1.ClusterSchedulingPolicySnapshot, cluster *clusterv1beta1.MemberCluster, ) (status *framework.Status)
Filter allows the plugin to connect to the Filter extension point in the scheduling framework.
func (*Plugin) PostBatch ¶
func (p *Plugin) PostBatch( _ context.Context, _ framework.CycleStatePluginReadWriter, policy *placementv1beta1.ClusterSchedulingPolicySnapshot, ) (int, *framework.Status)
PostBatch allows the plugin to connect to the PostBatch extension point in the scheduling framework.
Note that the scheduler will not run this extension point in parallel.
func (*Plugin) PreFilter ¶
func (p *Plugin) PreFilter( _ context.Context, state framework.CycleStatePluginReadWriter, policy *placementv1beta1.ClusterSchedulingPolicySnapshot, ) (status *framework.Status)
PreFilter allows the plugin to connect to the PreFilter extension point in the scheduling framework.
Note that the scheduler will not run this extension point in parallel.
func (*Plugin) PreScore ¶
func (p *Plugin) PreScore( _ context.Context, state framework.CycleStatePluginReadWriter, policy *placementv1beta1.ClusterSchedulingPolicySnapshot, ) (status *framework.Status)
PreScore allows the plugin to connect to the PreScore extension point in the scheduling framework.
func (*Plugin) Score ¶
func (p *Plugin) Score( _ context.Context, state framework.CycleStatePluginReadWriter, _ *placementv1beta1.ClusterSchedulingPolicySnapshot, cluster *clusterv1beta1.MemberCluster, ) (score *framework.ClusterScore, status *framework.Status)
Score allows the plugin to connect to the Score extension point in the scheduling framework.
func (*Plugin) SetUpWithFramework ¶
SetUpWithFramework sets up this plugin with a scheduler framework.