defaultassigner

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NameDynamicAssigner is the name of the plugin used in the plugin registry and configurations.
	NameDynamicAssigner = names.DynamicAssigner
)
View Source
const NameStaticAssigner = names.StaticAssigner

NameStaticAssigner is the name of the plugin used in the plugin registry and configurations.

Variables

This section is empty.

Functions

func DynamicDivideReplicas

func DynamicDivideReplicas(sub *appsapi.Subscription, deviations []appsapi.FeedOrder, availableReplicas framework.TargetClusters) (framework.TargetClusters, error)

DynamicDivideReplicas will fill the target replicas of all feeds based on predictor result and deviation. First time scheduling is considered as a special kind of scaling. When the desired replicas in deviation are negative, it means we should try to scale down, otherwise we try to scale up deviation replicas.

func NewDynamicAssigner

func NewDynamicAssigner(_ runtime.Object, handle framework.Handle) (framework.Plugin, error)

NewDynamicAssigner creates a DefaultAssigner.

func NewStaticAssigner added in v0.11.0

func NewStaticAssigner(_ runtime.Object, handle framework.Handle) (framework.Plugin, error)

NewStaticAssigner creates a Default Assigner.

func StaticDivideReplicas

func StaticDivideReplicas(selected *framework.TargetClusters, sub *appsapi.Subscription, clusters []*clusterapi.ManagedCluster, finv *appsapi.FeedInventory) error

StaticDivideReplicas will fill the target replicas of all feeds based on a weight list and feed finv.

Types

type DynamicAssigner

type DynamicAssigner struct {
	// contains filtered or unexported fields
}

DynamicAssigner assigns replicas to clusters.

func (*DynamicAssigner) Assign

Assign assigns subscriptions to clusters using the clusternet client.

func (*DynamicAssigner) Name

func (pl *DynamicAssigner) Name() string

Name returns the name of the plugin.

func (*DynamicAssigner) PreAssign added in v0.11.0

type StaticAssigner

type StaticAssigner struct {
	// contains filtered or unexported fields
}

StaticAssigner assigns replicas to clusters.

func (*StaticAssigner) Assign

Assign assigns subscriptions to clusters using the clusternet client.

func (*StaticAssigner) Name

func (pl *StaticAssigner) Name() string

Name returns the name of the plugin.

Jump to

Keyboard shortcuts

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