cronfederatedhpa

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ControllerName is the controller name that will be used when reporting events.
	ControllerName = "cronfederatedhpa-controller"
)

Variables

This section is empty.

Functions

func RunCronFederatedHPARule

func RunCronFederatedHPARule(c *CronFederatedHPAJob)

Types

type CronFHPAController

type CronFHPAController struct {
	client.Client // used to operate Cron resources.
	EventRecorder record.EventRecorder

	RateLimiterOptions ratelimiterflag.Options
	CronHandler        *CronHandler
}

CronFHPAController is used to operate CronFederatedHPA.

func (*CronFHPAController) Reconcile

Reconcile performs a full reconciliation for the object referred to by the Request. The Controller will requeue the Request to be processed again if an error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*CronFHPAController) SetupWithManager

func (c *CronFHPAController) SetupWithManager(mgr controllerruntime.Manager) error

SetupWithManager creates a controller and register to controller manager.

type CronFederatedHPAJob

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

func (*CronFederatedHPAJob) ScaleFHPA

func (*CronFederatedHPAJob) ScaleWorkloads

func (c *CronFederatedHPAJob) ScaleWorkloads(cronFHPA *autoscalingv1alpha1.CronFederatedHPA) error

type CronHandler

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

func NewCronHandler

func NewCronHandler(client client.Client, eventRecorder record.EventRecorder) *CronHandler

NewCronHandler creates new cron handler

func (*CronHandler) AddCronExecutorIfNotExist

func (c *CronHandler) AddCronExecutorIfNotExist(cronFHPAKey string)

AddCronExecutorIfNotExist creates the executor for CronFederatedHPA if not exist

func (*CronHandler) CreateCronJobForExecutor

CreateCronJobForExecutor creates the executor for a rule of CronFederatedHPA

func (*CronHandler) CronFHPAScaleTargetRefUpdates

func (c *CronHandler) CronFHPAScaleTargetRefUpdates(cronFHPAKey string, scaleTarget autoscalingv2.CrossVersionObjectReference) bool

CronFHPAScaleTargetRefUpdates checks if the scale target changed

func (*CronHandler) GetRuleNextExecuteTime

func (c *CronHandler) GetRuleNextExecuteTime(cronFHPA *autoscalingv1alpha1.CronFederatedHPA, ruleName string) (time.Time, error)

func (*CronHandler) RuleCronExecutorExists

func (c *CronHandler) RuleCronExecutorExists(cronFHPAKey string,
	ruleName string) (autoscalingv1alpha1.CronFederatedHPARule, bool)

func (*CronHandler) StopCronFHPAExecutor

func (c *CronHandler) StopCronFHPAExecutor(cronFHPAKey string)

StopCronFHPAExecutor stops the executor for specific CronFederatedHPA

func (*CronHandler) StopRuleExecutor

func (c *CronHandler) StopRuleExecutor(cronFHPAKey string, ruleName string)

StopRuleExecutor stops the executor for specific CronFederatedHPA rule

Jump to

Keyboard shortcuts

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