Documentation ¶
Overview ¶
Package resources contains methods for manipulating K8s resources shared between different PA implementations.
Index ¶
- func MakeMetric(ctx context.Context, pa *v1alpha1.PodAutoscaler, metricSvc string, ...) *v1alpha1.Metric
- func MakeMetricsService(pa *pav1alpha1.PodAutoscaler, selector map[string]string) *corev1.Service
- func MakeSKS(pa *pav1alpha1.PodAutoscaler, mode nv1a1.ServerlessServiceOperationMode) *nv1a1.ServerlessService
- func ResolveConcurrency(pa *v1alpha1.PodAutoscaler, config *autoscaler.Config) (target float64, total float64)
- func StableWindow(pa *v1alpha1.PodAutoscaler, config *autoscaler.Config) time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeMetric ¶
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 ¶
func MakeMetricsService(pa *pav1alpha1.PodAutoscaler, selector map[string]string) *corev1.Service
MakeMetricsService constructs a service that can be scraped for metrics.
func MakeSKS ¶
func MakeSKS(pa *pav1alpha1.PodAutoscaler, mode nv1a1.ServerlessServiceOperationMode) *nv1a1.ServerlessService
MakeSKS makes an SKS resource from the PA and operation mode.
func ResolveConcurrency ¶
func ResolveConcurrency(pa *v1alpha1.PodAutoscaler, config *autoscaler.Config) (target float64, total float64)
ResolveConcurrency takes concurrency knobs from multiple locations and resolves them to the final value to be used by the autoscaler. `target` is the target concurrency that we autoscaler will aim for; `total` is the maximum possible concurrency that is permitted on the pod.
func StableWindow ¶
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.