Documentation ¶
Index ¶
- type ReplicasRecommender
- func (rr *ReplicasRecommender) CheckDataProviders(ctx *framework.RecommendationContext) error
- func (rr *ReplicasRecommender) CollectData(ctx *framework.RecommendationContext) error
- func (rr *ReplicasRecommender) Filter(ctx *framework.RecommendationContext) error
- func (rr *ReplicasRecommender) Name() string
- func (rr *ReplicasRecommender) Observe(ctx *framework.RecommendationContext) error
- func (rr *ReplicasRecommender) Policy(ctx *framework.RecommendationContext) error
- func (rr *ReplicasRecommender) PostProcessing(ctx *framework.RecommendationContext) error
- func (rr *ReplicasRecommender) PreRecommend(ctx *framework.RecommendationContext) error
- func (rr *ReplicasRecommender) ProposeMinReplicas(workloadCpu float64, requestTotal int64) (int32, error)
- func (rr *ReplicasRecommender) Recommend(ctx *framework.RecommendationContext) error
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 (rr *ReplicasRecommender) CollectData(ctx *framework.RecommendationContext) error
func (*ReplicasRecommender) Filter ¶
func (rr *ReplicasRecommender) Filter(ctx *framework.RecommendationContext) error
Filter out k8s resources that are not supported by the recommender.
func (*ReplicasRecommender) Name ¶
func (rr *ReplicasRecommender) Name() string
func (*ReplicasRecommender) Observe ¶
func (rr *ReplicasRecommender) Observe(ctx *framework.RecommendationContext) error
Observe enhance the observability.
func (*ReplicasRecommender) Policy ¶
func (rr *ReplicasRecommender) Policy(ctx *framework.RecommendationContext) error
Policy add some logic for result of recommend phase.
func (*ReplicasRecommender) PostProcessing ¶
func (rr *ReplicasRecommender) PostProcessing(ctx *framework.RecommendationContext) error
func (*ReplicasRecommender) PreRecommend ¶
func (rr *ReplicasRecommender) PreRecommend(ctx *framework.RecommendationContext) error
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 ¶
func (rr *ReplicasRecommender) Recommend(ctx *framework.RecommendationContext) error
Click to show internal directories.
Click to hide internal directories.