Documentation
¶
Index ¶
- Constants
- func DynamicDivideReplicas(sub *appsapi.Subscription, deviations []appsapi.FeedOrder, ...) (framework.TargetClusters, error)
- func NewDynamicAssigner(_ runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func NewStaticAssigner(_ runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func StaticDivideReplicas(selected *framework.TargetClusters, sub *appsapi.Subscription, ...) error
- type DynamicAssigner
- func (pl *DynamicAssigner) Assign(ctx context.Context, state *framework.CycleState, sub *appsapi.Subscription, ...) (framework.TargetClusters, *framework.Status)
- func (pl *DynamicAssigner) Name() string
- func (pl *DynamicAssigner) PreAssign(ctx context.Context, state *framework.CycleState, sub *appsapi.Subscription, ...) *framework.Status
- type StaticAssigner
Constants ¶
const ( // NameDynamicAssigner is the name of the plugin used in the plugin registry and configurations. NameDynamicAssigner = names.DynamicAssigner )
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 ¶
NewDynamicAssigner creates a DefaultAssigner.
func NewStaticAssigner ¶ added in v0.11.0
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 ¶
func (pl *DynamicAssigner) Assign(ctx context.Context, state *framework.CycleState, sub *appsapi.Subscription, finv *appsapi.FeedInventory, availableReplicas framework.TargetClusters) (framework.TargetClusters, *framework.Status)
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
func (pl *DynamicAssigner) PreAssign(ctx context.Context, state *framework.CycleState, sub *appsapi.Subscription, finv *appsapi.FeedInventory, availableReplicas framework.TargetClusters) *framework.Status
type StaticAssigner ¶
type StaticAssigner struct {
// contains filtered or unexported fields
}
StaticAssigner assigns replicas to clusters.
func (*StaticAssigner) Assign ¶
func (pl *StaticAssigner) Assign(ctx context.Context, state *framework.CycleState, sub *appsapi.Subscription, finv *appsapi.FeedInventory, availableReplicas framework.TargetClusters) (framework.TargetClusters, *framework.Status)
Assign assigns subscriptions to clusters using the clusternet client.
func (*StaticAssigner) Name ¶
func (pl *StaticAssigner) Name() string
Name returns the name of the plugin.