Documentation
¶
Index ¶
- func UpdateTortoiseAutoscalingPolicyInStatus(tortoise *v1beta3.Tortoise, hpa *v2.HorizontalPodAutoscaler, now time.Time) *v1beta3.Tortoise
- type Service
- func (s *Service) AddFinalizer(ctx context.Context, tortoise *v1beta3.Tortoise) (*v1beta3.Tortoise, error)
- func (s *Service) GetTortoise(ctx context.Context, namespacedName types.NamespacedName) (*v1beta3.Tortoise, error)
- func (s *Service) ListTortoise(ctx context.Context, namespaceName string) (*v1beta3.TortoiseList, error)
- func (s *Service) RecordReconciliationFailure(t *v1beta3.Tortoise, err error, now time.Time) *v1beta3.Tortoise
- func (s *Service) RemoveFinalizer(ctx context.Context, tortoise *v1beta3.Tortoise) error
- func (s *Service) ShouldReconcileTortoiseNow(tortoise *v1beta3.Tortoise, now time.Time) (bool, time.Duration)
- func (s *Service) UpdateContainerRecommendationFromVPA(tortoise *v1beta3.Tortoise, vpa *v1.VerticalPodAutoscaler, now time.Time) *v1beta3.Tortoise
- func (c *Service) UpdateResourceRequest(ctx context.Context, tortoise *v1beta3.Tortoise, replica int32, now time.Time) (*v1beta3.Tortoise, error)
- func (s *Service) UpdateTortoisePhase(tortoise *v1beta3.Tortoise, now time.Time) *v1beta3.Tortoise
- func (s *Service) UpdateTortoiseStatus(ctx context.Context, originalTortoise *v1beta3.Tortoise, now time.Time, ...) (*v1beta3.Tortoise, error)
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, now time.Time) *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 (*Service) AddFinalizer ¶ added in v0.0.20
func (*Service) GetTortoise ¶
func (*Service) ListTortoise ¶ added in v0.6.1
func (*Service) RecordReconciliationFailure ¶ added in v0.0.33
func (*Service) RemoveFinalizer ¶ added in v0.0.20
func (*Service) ShouldReconcileTortoiseNow ¶
func (*Service) UpdateContainerRecommendationFromVPA ¶ added in v0.2.14
func (*Service) UpdateResourceRequest ¶ added in v0.7.0
func (c *Service) UpdateResourceRequest(ctx context.Context, tortoise *v1beta3.Tortoise, replica int32, now time.Time) ( *v1beta3.Tortoise, error, )
UpdateResourceRequest updates pods' resource requests based on the calculated recommendation. Updated ContainerResourceRequests will be used in the next mutating webhook of Pods. It updates ContainerResourceRequests in the status of the Tortoise, when ALL the following conditions are met:
- UpdateMode is Auto
- Any of the recommended resource request is increased, OR, all the recommended resource request is decreased, but it's been a while (1h) after the last update.
func (*Service) UpdateTortoisePhase ¶
Click to show internal directories.
Click to hide internal directories.