hpa

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReplicasRecommendation added in v0.0.18

func GetReplicasRecommendation(recommendations []autoscalingv1beta3.ReplicasRecommendation, now time.Time) (int32, error)

GetReplicasRecommendation finds the corresponding recommendations.

func HasHorizontal added in v0.1.0

func HasHorizontal(tortoise *autoscalingv1beta3.Tortoise) bool

Types

type Service added in v0.0.5

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

func New

func New(c client.Client, recorder record.EventRecorder, replicaReductionFactor float64, upperTargetResourceUtilization, tortoiseHPATargetUtilizationMaxIncrease int, tortoiseHPATargetUtilizationUpdateInterval time.Duration) *Service

func (*Service) ChangeHPAFromTortoiseRecommendation added in v0.0.5

func (c *Service) ChangeHPAFromTortoiseRecommendation(tortoise *autoscalingv1beta3.Tortoise, hpa *v2.HorizontalPodAutoscaler, now time.Time, recordMetrics bool) (*v2.HorizontalPodAutoscaler, *autoscalingv1beta3.Tortoise, error)

func (*Service) CreateHPA added in v0.0.13

func (*Service) DeleteHPACreatedByTortoise added in v0.0.20

func (c *Service) DeleteHPACreatedByTortoise(ctx context.Context, tortoise *autoscalingv1beta3.Tortoise) error

func (*Service) GetHPAOnTortoise added in v0.0.5

func (c *Service) GetHPAOnTortoise(ctx context.Context, tortoise *autoscalingv1beta3.Tortoise) (*v2.HorizontalPodAutoscaler, error)

func (*Service) GetHPAOnTortoiseSpec added in v0.2.0

func (c *Service) GetHPAOnTortoiseSpec(ctx context.Context, tortoise *autoscalingv1beta3.Tortoise) (*v2.HorizontalPodAutoscaler, error)

func (*Service) InitializeHPA added in v0.0.20

func (c *Service) InitializeHPA(ctx context.Context, tortoise *autoscalingv1beta3.Tortoise, replicaNum int32, now time.Time) (*autoscalingv1beta3.Tortoise, error)

func (*Service) RecordHPATargetUtilizationUpdate added in v0.1.0

func (s *Service) RecordHPATargetUtilizationUpdate(tortoise *autoscalingv1beta3.Tortoise, now time.Time) *autoscalingv1beta3.Tortoise

func (*Service) UpdateHPAFromTortoiseRecommendation added in v0.0.5

func (c *Service) UpdateHPAFromTortoiseRecommendation(ctx context.Context, tortoise *autoscalingv1beta3.Tortoise, now time.Time) (*v2.HorizontalPodAutoscaler, *autoscalingv1beta3.Tortoise, error)

func (*Service) UpdateHPASpecFromTortoiseAutoscalingPolicy added in v0.0.37

func (c *Service) UpdateHPASpecFromTortoiseAutoscalingPolicy(ctx context.Context, tortoise *autoscalingv1beta3.Tortoise, replicaNum int32, now time.Time) (*autoscalingv1beta3.Tortoise, error)

func (*Service) UpdatingHPATargetUtilizationAllowed added in v0.1.0

func (s *Service) UpdatingHPATargetUtilizationAllowed(tortoise *autoscalingv1beta3.Tortoise, now time.Time) (*autoscalingv1beta3.Tortoise, bool)

Jump to

Keyboard shortcuts

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