replicas

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReplicasRecommender

type ReplicasRecommender struct {
	base.BaseRecommender
	WorkloadMinReplicas int64
	PodMinReadySeconds  int64
	PodAvailableRatio   float64
	CpuPercentile       float64
	DefaultMinReplicas  int64
	TargetUtilization   int64
}

func NewReplicasRecommender

func NewReplicasRecommender(recommender apis.Recommender) (*ReplicasRecommender, error)

NewReplicasRecommender create a new replicas recommender.

func (*ReplicasRecommender) CheckDataProviders

func (rr *ReplicasRecommender) CheckDataProviders(ctx *framework.RecommendationContext) error

CheckDataProviders in PrePrepare phase, will create data source provider via your recommendation config.

func (*ReplicasRecommender) CollectData

func (*ReplicasRecommender) Filter

Filter out k8s resources that are not supported by the recommender.

func (*ReplicasRecommender) Name

func (rr *ReplicasRecommender) Name() string

func (*ReplicasRecommender) Observe

Observe enhance the observability.

func (*ReplicasRecommender) Policy

Policy add some logic for result of recommend phase.

func (*ReplicasRecommender) PostProcessing

func (rr *ReplicasRecommender) PostProcessing(ctx *framework.RecommendationContext) error

func (*ReplicasRecommender) PreRecommend

func (*ReplicasRecommender) ProposeMinReplicas

func (rr *ReplicasRecommender) ProposeMinReplicas(workloadCpu float64, requestTotal int64) (int32, error)

ProposeMinReplicas calculate min replicas based on default-min-replicas

func (*ReplicasRecommender) Recommend

Jump to

Keyboard shortcuts

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