replicas

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0, BSD-2-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReplicasRecommender

func NewReplicasRecommender(recommender apis.Recommender, recommendationRule analysisv1alph1.RecommendationRule) (recommender.Recommender, error)

NewReplicasRecommender create a new replicas recommender.

Types

type PatchReplicas added in v0.8.0

type PatchReplicas struct {
	Spec PatchReplicasSpec `json:"spec,omitempty"`
}

type PatchReplicasSpec added in v0.8.0

type PatchReplicasSpec struct {
	Replicas *int32 `json:"replicas,omitempty"`
}

type ReplicasRecommender

type ReplicasRecommender struct {
	base.BaseRecommender
	WorkloadMinReplicas  int64
	PodMinReadySeconds   int64
	PodAvailableRatio    float64
	CpuPercentile        float64
	MemPercentile        float64
	DefaultMinReplicas   int64
	CPUTargetUtilization float64
	MemTargetUtilization float64
}

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) GetMinReplicas added in v0.9.0

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(resourceUsage float64, requestTotal int64, targetUtilization float64) (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