Documentation ¶
Index ¶
- Constants
- func New() (framework.Plugin, error)
- type ClusterAffinity
- func (p *ClusterAffinity) Filter(_ context.Context, bindingSpec *workv1alpha2.ResourceBindingSpec, ...) *framework.Result
- func (p *ClusterAffinity) Name() string
- func (p *ClusterAffinity) NormalizeScore(ctx context.Context, scores framework.ClusterScoreList) *framework.Result
- func (p *ClusterAffinity) Score(ctx context.Context, spec *workv1alpha2.ResourceBindingSpec, ...) (int64, *framework.Result)
- func (p *ClusterAffinity) ScoreExtensions() framework.ScoreExtensions
Constants ¶
View Source
const (
// Name is the name of the plugin used in the plugin registry and configurations.
Name = "ClusterAffinity"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterAffinity ¶
type ClusterAffinity struct{}
ClusterAffinity is a plugin that checks if a resource selector matches the cluster label.
func (*ClusterAffinity) Filter ¶
func (p *ClusterAffinity) Filter( _ context.Context, bindingSpec *workv1alpha2.ResourceBindingSpec, bindingStatus *workv1alpha2.ResourceBindingStatus, cluster *clusterv1alpha1.Cluster, ) *framework.Result
Filter checks if the cluster matched the placement cluster affinity constraint.
func (*ClusterAffinity) Name ¶
func (p *ClusterAffinity) Name() string
Name returns the plugin name.
func (*ClusterAffinity) NormalizeScore ¶ added in v1.2.0
func (p *ClusterAffinity) NormalizeScore(ctx context.Context, scores framework.ClusterScoreList) *framework.Result
NormalizeScore normalizes the score for each candidate cluster.
func (*ClusterAffinity) Score ¶
func (p *ClusterAffinity) Score(ctx context.Context, spec *workv1alpha2.ResourceBindingSpec, cluster *clusterv1alpha1.Cluster) (int64, *framework.Result)
Score calculates the score on the candidate cluster.
func (*ClusterAffinity) ScoreExtensions ¶ added in v1.2.0
func (p *ClusterAffinity) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.
Click to show internal directories.
Click to hide internal directories.