clusterlocality

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name of the plugin used in the plugin registry and configurations.
	Name = "ClusterLocality"
)

Variables

This section is empty.

Functions

func New

func New() (framework.Plugin, error)

New instantiates the ClusterLocality plugin.

Types

type ClusterLocality

type ClusterLocality struct{}

ClusterLocality is a score plugin that favors cluster that already have the resource.

func (*ClusterLocality) Name

func (p *ClusterLocality) Name() string

Name returns the plugin name.

func (*ClusterLocality) Score

Score calculates the score on the candidate cluster. If the cluster already have the resource(exists in .spec.Clusters of ResourceBinding or ClusterResourceBinding), then score is 100, otherwise 0.

func (*ClusterLocality) ScoreExtensions

func (p *ClusterLocality) ScoreExtensions() framework.ScoreExtensions

ScoreExtensions of the Score plugin.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL