ehpa

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func GetPredictionMetricName

func GetPredictionMetricName(Name v1.ResourceName) (string, error)

GetPredictionMetricName return metric name used by prediction

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 HPAReplicasController

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

HPAReplicasController is responsible for monitor and export replicas for hpa

func (*HPAReplicasController) Reconcile

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

func (*HPAReplicasController) SetupWithManager

func (c *HPAReplicasController) 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