tortoise

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateTortoiseAutoscalingPolicyInStatus added in v0.2.0

func UpdateTortoiseAutoscalingPolicyInStatus(tortoise *v1beta3.Tortoise, hpa *v2.HorizontalPodAutoscaler) *v1beta3.Tortoise

UpdateTortoiseAutoscalingPolicyInStatus updates .status.autoscalingPolicy based on the policy in .spec.autoscalingPolicy, and the existing container names in the workload.

Types

type Service

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

func New

func New(c client.Client, recorder record.EventRecorder, rangeOfMinMaxReplicasRecommendationHour int, timeZone string, tortoiseUpdateInterval time.Duration, gatheringDataDuration string) (*Service, error)

func (*Service) AddFinalizer added in v0.0.20

func (s *Service) AddFinalizer(ctx context.Context, tortoise *v1beta3.Tortoise) (*v1beta3.Tortoise, error)

func (*Service) GetTortoise

func (s *Service) GetTortoise(ctx context.Context, namespacedName types.NamespacedName) (*v1beta3.Tortoise, error)

func (*Service) RecordReconciliationFailure added in v0.0.33

func (s *Service) RecordReconciliationFailure(t *v1beta3.Tortoise, err error, now time.Time) *v1beta3.Tortoise

func (*Service) RemoveFinalizer added in v0.0.20

func (s *Service) RemoveFinalizer(ctx context.Context, tortoise *v1beta3.Tortoise) error

func (*Service) ShouldReconcileTortoiseNow

func (s *Service) ShouldReconcileTortoiseNow(tortoise *v1beta3.Tortoise, now time.Time) (bool, time.Duration)

func (*Service) UpdateContainerRecommendationFromVPA added in v0.2.14

func (s *Service) UpdateContainerRecommendationFromVPA(tortoise *v1beta3.Tortoise, vpa *v1.VerticalPodAutoscaler) *v1beta3.Tortoise

func (*Service) UpdateTortoisePhase

func (s *Service) UpdateTortoisePhase(tortoise *v1beta3.Tortoise, now time.Time) *v1beta3.Tortoise

func (*Service) UpdateTortoiseStatus

func (s *Service) UpdateTortoiseStatus(ctx context.Context, originalTortoise *v1beta3.Tortoise, now time.Time, timeRecord bool) (*v1beta3.Tortoise, error)

Jump to

Keyboard shortcuts

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