Documentation ¶
Overview ¶
Package config contains the config for the autoscaler
Index ¶
Constants ¶
View Source
const ( // ConfigName is the name of the config map of the autoscaler. ConfigName = "config-autoscaler" // BucketSize is the size of the buckets of stats we create. // NB: if this is more than 1s, we need to average values in the // metrics buckets. BucketSize = 1 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Feature flags. EnableScaleToZero bool // Target concurrency knobs for different container concurrency configurations. ContainerConcurrencyTargetFraction float64 ContainerConcurrencyTargetDefault float64 // TargetUtilization is used for the metrics other than concurrency. This is not // configurable now. Customers can override it by specifying // autoscaling.knative.dev/targetUtilizationPercentage in Revision annotation. // TODO(yanweiguo): Expose this to config-autoscaler configmap and eventually // deprecate ContainerConcurrencyTargetFraction. TargetUtilization float64 // RPSTargetDefault is the default target value for requests per second. RPSTargetDefault float64 // NB: most of our computations are in floats, so this is float to avoid casting. TargetBurstCapacity float64 // ActivatorCapacity is the number of the concurrent requests an activator // task can accept. This is used in activator subsetting algorithm, to determine // the number of activators per revision. ActivatorCapacity float64 // AllowZeroInitialScale indicates whether InitialScale and // autoscaling.internal.knative.dev/initialScale are allowed to be set to 0. AllowZeroInitialScale bool // InitialScale is the cluster-wide default initial revision size for newly deployed // services. This can be set to 0 iff AllowZeroInitialScale is true. InitialScale int32 // General autoscaler algorithm configuration. MaxScaleUpRate float64 MaxScaleDownRate float64 StableWindow time.Duration PanicWindowPercentage float64 PanicThresholdPercentage float64 ScaleToZeroGracePeriod time.Duration ScaleToZeroPodRetentionPeriod time.Duration PodAutoscalerClass string }
Config defines the tunable autoscaler parameters +k8s:deepcopy-gen=true
func NewConfigFromConfigMap ¶
NewConfigFromConfigMap creates a Config from the supplied ConfigMap
func NewConfigFromMap ¶
NewConfigFromMap creates a Config from the supplied map
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Click to show internal directories.
Click to hide internal directories.