resources

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package resources contains methods for manipulating K8s resources shared between different PA implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeMetric added in v0.7.0

func MakeMetric(ctx context.Context, pa *v1alpha1.PodAutoscaler, metricSvc string,
	config *autoscaler.Config) *v1alpha1.Metric

MakeMetric constructs a Metric resource from a PodAutoscaler

func MakeMetricsService added in v0.7.0

func MakeMetricsService(pa *pav1alpha1.PodAutoscaler, selector map[string]string) *corev1.Service

MakeMetricsService constructs a service that can be scraped for metrics.

func MakeSKS

MakeSKS makes an SKS resource from the PA and operation mode.

func ResolveMetricTarget added in v0.9.0

func ResolveMetricTarget(pa *v1alpha1.PodAutoscaler, config *autoscaler.Config) (target float64, total float64)

ResolveMetricTarget takes scaling metric knobs from multiple locations and resolves them to the final value to be used by the autoscaler. `target` is the target value of scaling metric that we autoscaler will aim for; `total` is the maximum possible value of scaling metric that is permitted on the pod.

func StableWindow added in v0.8.0

func StableWindow(pa *v1alpha1.PodAutoscaler, config *autoscaler.Config) time.Duration

StableWindow returns the stable window for the revision from PA, if set, or systemwide default.

Types

This section is empty.

Directories

Path Synopsis
Package names contains methods for manipulating K8s resources' names shared between different PA implementations.
Package names contains methods for manipulating K8s resources' names shared between different PA implementations.

Jump to

Keyboard shortcuts

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