wrapper

package
v0.0.0-...-33530d5 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Controls whether to turn on the HPA for this workload.
	HPAEnable = "hpa.autoscaling.navigatorcloud.io/enable"
	// minReplicas is the lower limit for the number of replicas to which the autoscaler
	// can scale down.
	HPAMinReplicas = "hpa.autoscaling.navigatorcloud.io/minReplicas"
	// maxReplicas is the upper limit for the number of replicas to which the autoscaler
	// can scale up.
	HPAMaxReplicas = "hpa.autoscaling.navigatorcloud.io/maxReplicas"
	// metrics contains the specifications for which to use to calculate the desired replica
	// count(the maximum replica count across all metrics will be used).
	HPAMetrics = "hpa.autoscaling.navigatorcloud.io/metrics"
	// The scheme of `schedule-jobs` is similar with `crontab`, create HPA resource for the
	// workload regularly.
	HPAScheduleJobs = "hpa.autoscaling.navigatorcloud.io/schedule-jobs"
)
View Source
const (
	CronHPAType = "hpa.autoscaling.navigatorcloud.io/hpa-type"
)

Variables

View Source
var (
	HPADefaultLabels = map[string]string{
		"managed-by": "hpa-operator",
	}
)

Functions

This section is empty.

Types

type CronHPA

type CronHPA interface {
	AddJob(job apis.Job, hpa *v2beta2.HorizontalPodAutoscaler, client client.Client) error
	Start()
	Stop()
	Remove(job apis.Job, hpa *v2beta2.HorizontalPodAutoscaler)
	RemoveByJobKey(jobKey string)
}

func NewCronHPA

func NewCronHPA() CronHPA

type HPAOperator

type HPAOperator interface {
	DoHorizontalPodAutoscaler() (bool, error)
}

func NewHPAOperator

func NewHPAOperator(client client.Client, namespacedName types.NamespacedName, annotations map[string]string,
	kind string, uid types.UID, cronHPA CronHPA) HPAOperator

Jump to

Keyboard shortcuts

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