Skip to main content

Values

Values define the scaling behavior of targeted workloads, specifying how and when they should be scaled up or down. They can be set at any scope and therefore can be set via their respective environment variables, cli arguments, namespace annotations and workload annotations

note

The default values shown below are only set on the default scope.

Order

Some of the values have a specific order in which they are evaluated. This means that some values take precedence over others.

Exclusion

Exclusion contains all values which exclude the workload (e.g. Exclude, Exclude Until, Grace Period).

If any of these values exclude the workload, it will not be scaled.

Scaling

Scaling includes all values which influence the state of Scaling the workload should be in (e.g. Force Downtime, Force Uptime, Downscale Period, Downtime, Upscale Period, Uptime).

If Force Downtime or Force Uptime is true/matching during scaling their respective scaling will be used. Otherwise the Downscale Period, Downtime, Upscale Period and Uptime values are evaluated.

note

Currently if Downscale Period and Upscale Period or Force Downtime and Force Uptime is set, and both of either match the same time the workload will result in an error during scaling, basically skipping scaling on the workload. This is NOT final intended behavior and you should not rely on this. This might change in the future to be seen as an parsing incompatibility instead of an runtime one. If this gets changed this would result in misconfigured workloads to not being scaled at all, instead erroring during scaling.

Value Groups

Some values within a scope set/define very similar properties (e.g. Force Downtime and Force Uptime; Downscale Period, Downtime, Upscale Period and Uptime)

These values are not all handled separately when choosing which scope to take the values from. Instead if one of them is set in a scope, the other values will be taken from the same scope.

Incompatibilities between values normally only occur between values in the same value group and therefore the values on that same scope.

Below is a diagram showing the process of a value group being evaluated.

Rows where the action is:

  • × are not taken into account
  • « is the row the value was taken from
  • ↑ are empty and are not taken into account
Force UptimeForce DowntimeAction
Default--×
Environmentfalsetrue×
CLI-false×
Namespacetrue-« (any set)
Workload--↑ (none set)
Resulttrue-

List Of Values

Here is a list of all values that can be set on the Downscaler.

Downscale Period

Downtime

Upscale Period

Uptime

Exclude

Exclude Until

Force Uptime

Force Downtime

Downscale Replicas

Grace Period

Scale Children

  • Type: boolean
  • Description: Enables the downscaler to immediately scale child resources of the targeted workload. By default, only the main workload is scaled, which may leave child resources, such as Jobs created by a CronJob, running to completion if the child kind is not included inside the included-resource argument
  • Default: false
  • Where to set: CLI Scope, Namespace Scope, Workload Scope

Incompatibilities

Parsing Incompatibility

Parsing incompatibilities covers most of the downscalers incompatibilities. This currently includes the Incompatible with field shown above, which marks the incompatibility of two values being set in the same scope.

These incompatibilities are easy to catch, since they get shown every scan.

Runtime Incompatibility

These are incompatibilities we at least currently cannot check for during parsing. This currently only affects timespan values that have the same order/priority within the scope and are setting different scaling states when matching like Downscale Period and Upscale Period or Force Downtime and Force Uptime.

We have strongly tried to make these incompatibilities not cause unexpected behavior, opting for just printing an error and ignoring the workload that scan cycle.

What can't be changed is that these will be hard to notice and find the cause for, since depending on the configuration causing this and the scan interval it could happen that this configuration error only shows up every few years.

Avoiding these should be relatively simple, by reading the documentation and making sure not to overlap timespans between values like Downscale Period and Upscale Period.