Documentation ¶
Overview ¶
Package sameplacementaffinity features a scheduler plugin that filters out any cluster that has been already scheduled/bounded to the resource placement and prefers the same cluster which has an obsolete binding.
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) 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 same placement affinity and anti-affinity. "Affinity" means a scheduler prefers the cluster which has an obsolete binding of the same placement in order to minimize interruption between different scheduling runs. "Anti-Affinity" means a scheduler filters out the cluster which has been already scheduled/bounded as two placements cannot be scheduled on a cluster.
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) Score ¶ added in v0.6.7
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.