controllers

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MaxScheduleTry = 1000000

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

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

func NewCron

func NewCron() *Cron

func (*Cron) Add

func (c *Cron) Add(namespacedName types.NamespacedName, patchName, tzs string, job cron.Job) error

func (*Cron) ListResourceEntry

func (c *Cron) ListResourceEntry(namespacedName types.NamespacedName) ResourceEntry

func (*Cron) Remove

func (c *Cron) Remove(namespacedName types.NamespacedName, patchName string)

func (*Cron) RemoveResourceEntry

func (c *Cron) RemoveResourceEntry(namespacedName types.NamespacedName)

func (*Cron) Start

func (c *Cron) Start()

func (*Cron) Stop

func (c *Cron) Stop()

type CronContext

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

func (*CronContext) Run

func (cronctx *CronContext) Run()

type CronHPAEvent

type CronHPAEvent = string
const (
	CronHPAEventCreated     CronHPAEvent = "Created"
	CronHPAEventUpdated     CronHPAEvent = "Updated"
	CronHPAEventScheduled   CronHPAEvent = "Scheduled"
	CronHPAEventUnscheduled CronHPAEvent = "Unscheduled"
	CronHPAEventSkipped     CronHPAEvent = "Skipped"
	CronHPAEventNone        CronHPAEvent = ""
)

type CronHorizontalPodAutoscaler

type CronHorizontalPodAutoscaler cronhpav1alpha1.CronHorizontalPodAutoscaler

func (*CronHorizontalPodAutoscaler) ApplyHPAPatch

func (cronhpa *CronHorizontalPodAutoscaler) ApplyHPAPatch(patchName string, hpa *autoscalingv2.HorizontalPodAutoscaler) error

func (*CronHorizontalPodAutoscaler) ClearSchedules

func (*CronHorizontalPodAutoscaler) CreateOrPatchHPA

func (cronhpa *CronHorizontalPodAutoscaler) CreateOrPatchHPA(ctx context.Context, patchName string, currentTime time.Time, reconciler *CronHorizontalPodAutoscalerReconciler) error

func (*CronHorizontalPodAutoscaler) GetCurrentPatchName

func (cronhpa *CronHorizontalPodAutoscaler) GetCurrentPatchName(ctx context.Context, currentTime time.Time) (string, error)

func (*CronHorizontalPodAutoscaler) NewHPA

func (*CronHorizontalPodAutoscaler) ToCompatible

func (*CronHorizontalPodAutoscaler) ToNamespacedName

func (cronhpa *CronHorizontalPodAutoscaler) ToNamespacedName() types.NamespacedName

func (*CronHorizontalPodAutoscaler) UpdateSchedules

func (cronhpa *CronHorizontalPodAutoscaler) UpdateSchedules(ctx context.Context, reconciler *CronHorizontalPodAutoscalerReconciler) error

type CronHorizontalPodAutoscalerReconciler

type CronHorizontalPodAutoscalerReconciler struct {
	client.Client
	Recorder record.EventRecorder
	Cron     *Cron
}

CronHorizontalPodAutoscalerReconciler reconciles a CronHorizontalPodAutoscaler object

func (*CronHorizontalPodAutoscalerReconciler) Reconcile

func (*CronHorizontalPodAutoscalerReconciler) SetupWithManager

func (r *CronHorizontalPodAutoscalerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type CtxValueKey

type CtxValueKey string
var (
	CtxValueName      CtxValueKey = "name"
	CtxValueNamespace CtxValueKey = "namespace"
)

type ResourceEntry

type ResourceEntry map[string]cron.EntryID

Jump to

Keyboard shortcuts

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