podautoscaler

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2016 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package podautoscaler contains logic for autoscaling number of pods based on metrics observed.

Index

Constants

View Source
const (
	HpaCustomMetricsTargetAnnotationName = "alpha/target.custom-metrics.podautoscaler.kubernetes.io"
	HpaCustomMetricsStatusAnnotationName = "alpha/status.custom-metrics.podautoscaler.kubernetes.io"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HorizontalController

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

func (*HorizontalController) Run

func (a *HorizontalController) Run(stopCh <-chan struct{})

type ReplicaCalculator added in v1.5.0

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

func NewReplicaCalculator added in v1.5.0

func NewReplicaCalculator(metricsClient metricsclient.MetricsClient, podsGetter unversionedcore.PodsGetter) *ReplicaCalculator

func (*ReplicaCalculator) GetMetricReplicas added in v1.5.0

func (c *ReplicaCalculator) GetMetricReplicas(currentReplicas int32, targetUtilization float64, metricName string, namespace string, selector labels.Selector) (replicaCount int32, utilization float64, timestamp time.Time, err error)

GetMetricReplicas calculates the desired replica count based on a target resource utilization percentage of the given resource for pods matching the given selector in the given namespace, and the current replica count

func (*ReplicaCalculator) GetResourceReplicas added in v1.5.0

func (c *ReplicaCalculator) GetResourceReplicas(currentReplicas int32, targetUtilization int32, resource api.ResourceName, namespace string, selector labels.Selector) (replicaCount int32, utilization int32, timestamp time.Time, err error)

GetResourceReplicas calculates the desired replica count based on a target resource utilization percentage of the given resource for pods matching the given selector in the given namespace, and the current replica count

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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