Migrating From Py-Kube-Downscaler
In most cases it's very simple to migrate and step 3 and 4 can be skipped.
Step 1:
Uninstall the py-kube-downscaler
helm uninstall py-kube-downscaler
Step 2:
Adjust any old values.yaml files to the new structure.
Step 3:
Make sure all non-official automations support the breaking changes.
You can skip this if you didn't have external automations for the downscaler.
Step 4:
Make sure all timestamps are RFC3339. To make this easier you could also just run the downscaler and see if it gives an error.
Since only some edge cases of the ISO 8601 timestamp format are not compatible you can likely skip this step. Should the downscaler error because of this you can still change them afterwards.
Step 5:
Now you're ready to install the Downscaler. For that you can follow our Installation Guide.
Features
Incompatibility
Some values are now incompatible with each other. This makes it easier to debug unwanted behavior from misconfiguration.
See the breaking changes entry for more information.
Duration Units
Instead of just integer seconds you can now also use duration strings with units. This makes it more intuitive to configure.
Uniform Timestamps
The downscaler now uses RFC3339 timestamps exclusively. This means that you will not have to juggle with multiple timestamp formats.
See the breaking changes entry for more information.
Scopes
The scaling values are now ordered into scopes. This makes it easier to understand where the values are taken from.
See the breaking changes entry for more information.
Explicit Include
Added the --explicit-include
cli argument.
This is a simple way to exclude all workloads by default and only add those you want to have scaled.
Comfort Spaces
Lists now allow for spaces in-between the entries.
This allows for lists to be more readable since the entries are separated.
Reverse Relative Timespans
Reverse Timespans can now overlap into the "next day" (20:00-08:00
)
This is a faster and less verbose way of matching the opposite of an up/downtime.
Actual Exclusion
Excluding a workload now will ignore scaling the workload, instead of forcing it into uptime. This means that what happens when excluding a workload is more intuitive.
See the breaking changes entry for more information.
Workload Errors
Configuration errors on workloads are now shown as error events on the workload. This makes it so you don't have to have access to the downscalers console just to see whats wrong with your configuration.
Auto Exclude ScaledObject Scaled Workloads
The Workloads scaled by scaledobjects are automatically excluded to avoid conflicts during scaling.
This currently only happens when scaled object scaling is enabled via --include-resources
Leader Election
Leader election is now available making it possible to have multiple replicas running redundantly without causing conflicts.
More Workload Types
The downscaler can now also scale:
Multiple Timespans in Force* Time
Force uptime and force downtime now allow multiple timespans as their value instead of just one.
Timespans in Exclude
The Exclude value now allows timespans as a value, this allows for more controlled time-based exclusion.
Breaking Changes
From Features
This is a collection of breaking changes caused by a feature:
Feature | Breaking Changes | Severity |
---|---|---|
Incompatibility | Will now error out and skip scaling if misconfigured | low - might cause some workloads not to be scaled |
Actual Exclusion | Excluded workloads will no longer be scaled up | low - if you relied on this quirk |
Scopes | Scaling value order is now consistent | medium - could result in other values setting scaling |
Uniform Timestamps | RFC3339 timestamps are now used exclusively | medium - some workloads might need to be updated |
New Structure of values.yaml
Some fields of the values.yaml file have been restructured.
The following fields would have to be adjusted in an old values.yaml file from the py-kube-downscaler:
constrainedDownscaler
is now not needed anymoreconfigMapName
is now underconfigMap.name
extraConfig
is now underconfigMap.extraConfig