ehpa

package
v0.5.0-tke.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RsyncPeriod = 15 * time.Second
)

Variables

This section is empty.

Functions

func GetCronMetricSpecsForHPA added in v0.3.0

GetCronMetricSpecsForHPA return a hpa external metric specs from ehpa cron scale specs, this spec will be injected into hpa One ehpa mapping to one cron metric only, even though there are multiple cron specs

Types

type EffectiveHPAController

type EffectiveHPAController struct {
	client.Client
	Scheme      *runtime.Scheme
	RestMapper  meta.RESTMapper
	Recorder    record.EventRecorder
	ScaleClient scale.ScalesGetter
	K8SVersion  *version.Version
	Config      EhpaControllerConfig
}

EffectiveHPAController is responsible for scaling workload's replica based on EffectiveHorizontalPodAutoscaler spec

func (*EffectiveHPAController) GetHPAMetrics

GetHPAMetrics loop metricSpec in EffectiveHorizontalPodAutoscaler and generate metricSpec for HPA

func (*EffectiveHPAController) Reconcile

func (c *EffectiveHPAController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*EffectiveHPAController) SetupWithManager

func (c *EffectiveHPAController) SetupWithManager(mgr ctrl.Manager) error

func (*EffectiveHPAController) UpdateSubstituteIfNeed

type EhpaControllerConfig added in v0.2.0

type EhpaControllerConfig struct {
	PropagationConfig EhpaControllerPropagationConfig
}

type EhpaControllerPropagationConfig added in v0.2.0

type EhpaControllerPropagationConfig struct {
	LabelPrefixes      []string
	AnnotationPrefixes []string
	Labels             []string
	Annotations        []string
}

type HPAObserverController added in v0.4.0

type HPAObserverController struct {
	client.Client
	Scheme     *runtime.Scheme
	RestMapper meta.RESTMapper
	Recorder   record.EventRecorder
}

HPAObserverController is responsible for observer metrics for hpa

func (*HPAObserverController) Reconcile added in v0.4.0

func (c *HPAObserverController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*HPAObserverController) SetupWithManager added in v0.4.0

func (c *HPAObserverController) SetupWithManager(mgr ctrl.Manager) error

type SubstituteController

type SubstituteController struct {
	client.Client
	Scheme      *runtime.Scheme
	RestMapper  meta.RESTMapper
	Recorder    record.EventRecorder
	ScaleClient scale.ScalesGetter
}

SubstituteController is responsible for sync labelSelector to Substitute

func (*SubstituteController) Reconcile

func (c *SubstituteController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*SubstituteController) SetupWithManager

func (c *SubstituteController) SetupWithManager(mgr ctrl.Manager) error

Jump to

Keyboard shortcuts

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