autorules

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MEXPrometheusAutoScaleT = `` /* 1346-byte string literal not displayed */

If an auto-scale profile is set, we add measurements to track cpu and memory usage for worker nodes only, averaged over the Averaging duration (to avoid usage spikes and dips), and stabilized over the Stabilization duration (to smooth transitions and avoid oscillation).

Notes on the measurements: To avoid measuring cpu/mem from the master node which does not run pods, we sum metrics on nodes without the "NoSchedule" taint: expr: sum(node:node_cpu_utilisation:avg1m unless (kube_node_spec_taint{effect="NoSchedule"} * on(node) kube_node_spec_taint)) Multiplying the vector with itself gets rid of all the other labels except "node", so that "unless" can be used to filter out NoSchedule nodes from node:node_cpu_utilisation:avg

Functions

func GetAutoScaleRules

func GetAutoScaleRules(ctx context.Context, policy *edgeproto.AutoScalePolicy, settings *edgeproto.Settings) (string, error)

func GetAutoUndeployRules

func GetAutoUndeployRules(ctx context.Context, settings edgeproto.Settings, appInstKey *edgeproto.AppInstKey, policy *edgeproto.AutoProvPolicy) *prommgmt.RuleGroup

Types

type AutoScaleArgs

type AutoScaleArgs struct {
	AutoScalePolicy  string
	AveragingSec     string
	StabilizationSec string
}

Jump to

Keyboard shortcuts

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